media_post_single_attachment_fields_to_edit( array $form_fields, WP_Post $post ): array

In this article

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

Parameters

$form_fieldsarrayrequired
An array of attachment form fields.
$postWP_Postrequired
The WP_Post attachment object.

Return

array Filtered attachment form fields.

Source

function media_post_single_attachment_fields_to_edit( $form_fields, $post ) {
	unset( $form_fields['image_url'] );
	return $form_fields;
}

Changelog

VersionDescription
2.8.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.