image_attachment_fields_to_save()WP 2.5.0

Устарела с версии 6.0.0. Больше не поддерживается и может быть удалена. Рекомендуется заменить эту функцию на аналог.

Was used to filter input from media_upload_form_handler() and to assign a default post_title from the file name if none supplied.

Хуков нет.

Возвращает

Массив. Attachment post object converted to an array.

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

image_attachment_fields_to_save( $post, $attachment );
$post(массив) (обязательный)
The WP_Post attachment object converted to an array.
$attachment(массив) (обязательный)
An array of attachment metadata.

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

С версии 2.5.0 Введена.
Устарела с 6.0.0

Код image_attachment_fields_to_save() WP 6.5.2

function image_attachment_fields_to_save( $post, $attachment ) {
	_deprecated_function( __FUNCTION__, '6.0.0' );

	return $post;
}