WordPress at a glance
filter is not described

attachment_thumbnail_args filter-hook . WP 3.9.0

Filters the parameters for the attachment thumbnail creation.

Usage

add_filter( 'attachment_thumbnail_args', 'filter_function_name_2257', 10, 3 );
function filter_function_name_2257( $image_attachment, $metadata, $uploaded ){
	// filter...

	return $image_attachment;
}
$image_attachment(array)
An array of parameters to create the thumbnail.
$metadata(array)
Current attachment metadata.
$uploaded(array)

Information about the newly-uploaded file.

  • file(string)
    Filename of the newly-uploaded file.

  • url(string)
    URL of the uploaded file.

  • type(string)
    File type.

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

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

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

wp_generate_attachment_metadata()
attachment_thumbnail_args
wp-admin/includes/image.php 544
$image_attachment = apply_filters( 'attachment_thumbnail_args', $image_attachment, $metadata, $uploaded );

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

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