media_single_attachment_fields_to_edit()
Retrieves the single non-image attachment fields to edit form fields.
No Hooks.
Return
Array
. Filtered attachment form fields.
Usage
media_single_attachment_fields_to_edit( $form_fields, $post );
- $form_fields(array) (required)
- An array of attachment form fields.
- $post(WP_Post) (required)
- The WP_Post attachment object.
Changelog
Since 2.5.0 | Introduced. |
media_single_attachment_fields_to_edit() media single attachment fields to edit code WP 6.8
function media_single_attachment_fields_to_edit( $form_fields, $post ) { unset( $form_fields['url'], $form_fields['align'], $form_fields['image-size'] ); return $form_fields; }