attachment_fields_to_edit
apply_filters( ‘attachment_fields_to_edit’, array $form_fields , WP_Post $post )
筛选挂钩:筛选要编辑的附件字段。
Filter Hook: Filters the attachment fields to edit.
参数(Parameters)
参数 | 类型 | 说明 |
---|---|---|
$form_fields | (array) | 附件表单字段的数组。 |
$post | (WP_Post) | WP_Post附件对象。 |
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
2.5.0 | wp-admin/includes/media.php:1476 | 2 | 0 |
笔记(Notes)
这是向附件添加自定义字段的方法:
attachment_fields_to_edit 为WP2原创文章,链接:https://www.wp2.cn/hook/attachment_fields_to_edit/