media_post_single_attachment_fields_to_edit() WordPress Function
This function allows you to add custom fields to the default WordPress media attachment fields. This can be useful for adding extra data to an attachment, such as copyright information or a link to the original file.
media_post_single_attachment_fields_to_edit( array $form_fields, WP_Post $post ) #
Retrieves the post non-image attachment fields to edit form fields.
Contents
Parameters
Return
(array) Filtered attachment form fields.
Source
File: wp-admin/includes/media.php
function media_post_single_attachment_fields_to_edit( $form_fields, $post ) { unset( $form_fields['image_url'] ); return $form_fields; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
2.8.0 | Introduced. |