media_post_single_attachment_fields_to_edit()WP 2.8.0

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

Хуков нет.

Возвращает

Массив. Filtered attachment form fields.

Использование

media_post_single_attachment_fields_to_edit( $form_fields, $post );
$form_fields(массив) (обязательный)
An array of attachment form fields.
$post(WP_Post) (обязательный)
The WP_Post attachment object.

Список изменений

С версии 2.8.0 Введена.

Код media_post_single_attachment_fields_to_edit() WP 6.4.3

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