wpseek.com
A WordPress-centric search engine for devs and theme authors



media_single_attachment_fields_to_edit › WordPress Function

Since2.5.0
Deprecatedn/a
media_single_attachment_fields_to_edit ( $form_fields, $post )
Parameters: (2)
  • (array) $form_fields An array of attachment form fields.
    Required: Yes
  • (WP_Post) $post The WP_Post attachment object.
    Required: Yes
Returns:
  • (array) Filtered attachment form fields.
Defined at:
Codex:

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



Source

function media_single_attachment_fields_to_edit( $form_fields, $post ) {
	unset( $form_fields['url'], $form_fields['align'], $form_fields['image-size'] );
	return $form_fields;
}