media_single_attachment_fields_to_edit()
Retrieves the single non-image attachment fields to edit form fields.
Хуков нет.
Возвращает
Массив
. Filtered attachment form fields.
Использование
media_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.5.0 | Введена. |
Код media_single_attachment_fields_to_edit() media single attachment fields to edit WP 6.7.1
function media_single_attachment_fields_to_edit( $form_fields, $post ) { unset( $form_fields['url'], $form_fields['align'], $form_fields['image-size'] ); return $form_fields; }