将后非图像附件字段检索到edito表单字段。
原型
media_post_single_attachment_fields_to_edit( array $form_fields, WP_Post $post )
参数
$form_fields
(array)
(Required)
一系列附件表单字段。
$post
(WP_Post)
(Required)
WP_Post附件对象。
返回值
(array)
已过滤的附件表单字段。
源文件
路径:wp-admin/includes/media.php
<?php
...
function media_post_single_attachment_fields_to_edit( $form_fields, $post ) {
unset($form_fields['image_url']);
return $form_fields;
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/media_post_single_attachment_fields_to_edit/