函数原型
media_single_attachment_fields_to_edit( array $form_fields, WP_Post $post ): array
函数描述
Retrieves the single non-image attachment fields to edit form fields.
是否弃用
未弃用
函数参数
-
$form_fields
array
Required - An array of attachment form fields.
-
$post
WP_Post
Required - The WP_Post attachment object.
函数返回值
array Filtered attachment form fields.
函数位置
File: wp-admin/includes/media.php.
函数源码
function media_single_attachment_fields_to_edit( $form_fields, $post ) {
unset( $form_fields['url'], $form_fields['align'], $form_fields['image-size'] );
return $form_fields;
}
源码链接
变更日志
| Version | Description |
|---|---|
| 2.5.0 | Introduced. |

