WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
фильтр не описан

big_image_size_threshold хук-фильтр . WP 5.3.0

Filters the "BIG image" threshold value.

If the original image width or height is above the threshold, it will be scaled down. The threshold is used as max width and max height. The scaled down image will be used as the largest available size, including the _wp_attached_file post meta value.

Returning false from the filter callback will disable the scaling.


add_filter( 'big_image_size_threshold', 'filter_function_name_3526', 10, 4 );
function filter_function_name_3526( $threshold, $imagesize, $file, $attachment_id ){
	// filter...

	return $threshold;
The threshold value in pixels.
По умолчанию: 2560

Indexed array of the image width and height in pixels.

  • $0 (число)
    The image width.

  • $1 (число)
    The image height.
Full path to the uploaded image file.
Attachment post ID.

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

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

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

wp-admin/includes/image.php 271
$threshold = (int) apply_filters( 'big_image_size_threshold', 2560, $imagesize, $file, $attachment_id );

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

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