media_single_attachment_fields_to_edit

函数


media_single_attachment_fields_to_edit ( $form_fields, $post )
参数
  • (array)
    $form_fields
    An array of attachment form fields.
    Required:
  • (WP_Post)
    $post
    The WP_Post attachment object.
    Required:
返回值
  • (array) Filtered attachment form fields.
定义位置
  • wp-admin/includes/media.php
    , line 1319
引入
2.5.0
弃用

Retrieves the single non-image attachment fields to edit form fields.

function media_single_attachment_fields_to_edit( $form_fields, $post ) {
	unset( $form_fields['url'], $form_fields['align'], $form_fields['image-size'] );
	return $form_fields;
}