WordPress at a glance
filter is not described

attachment_fields_to_save filter-hook . WP 2.5.0

Filters the attachment fields to be saved.

Usage

add_filter( 'attachment_fields_to_save', 'filter_function_name_6112', 10, 2 );
function filter_function_name_6112( $post, $attachment ){
	// filter...

	return $post;
}
$post(array)
An array of post data.
$attachment(array)
An array of attachment metadata.

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

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

Где вызывается хук

media_upload_form_handler()
attachment_fields_to_save
wp_ajax_save_attachment_compat()
attachment_fields_to_save
edit_post()
attachment_fields_to_save
wp-admin/includes/media.php 762
$post = apply_filters( 'attachment_fields_to_save', $post, $attachment );
wp-admin/includes/ajax-actions.php 3119
$post = apply_filters( 'attachment_fields_to_save', $post, $attachment_data );
wp-admin/includes/post.php 401
$translated = apply_filters( 'attachment_fields_to_save', $translated, $attachment_data );

Где используется хук в ядре WP

wp-admin/includes/admin-filters.php 34
add_filter( 'attachment_fields_to_save', 'image_attachment_fields_to_save', 10, 2 );