Filter hook 'image_resize_dimensions'

in WP Core File wp-includes/media.php at line 564

Description

Filters whether to preempt calculating the image resize dimensions. Returning a non-null value from the filter will effectively short-circuit image_resize_dimensions(), returning that value instead.

Occurrences

Filename Line Number
wp-includes/media.php 564

Parameters

Type Name Description
null|mixed $null Whether to preempt output of the resize dimensions.
int $orig_w Original width in pixels.
int $orig_h Original height in pixels.
int $dest_w New width in pixels.
int $dest_h New height in pixels.
bool|array $crop Whether to crop image to specified width and height or resize. An array can specify positioning of the crop area. Default false.

PHP Doc

/**
	 * Filters whether to preempt calculating the image resize dimensions.
	 *
	 * Returning a non-null value from the filter will effectively short-circuit
	 * image_resize_dimensions(), returning that value instead.
	 *
	 * @since 3.4.0
	 *
	 * @param null|mixed $null   Whether to preempt output of the resize dimensions.
	 * @param int        $orig_w Original width in pixels.
	 * @param int        $orig_h Original height in pixels.
	 * @param int        $dest_w New width in pixels.
	 * @param int        $dest_h New height in pixels.
	 * @param bool|array $crop   Whether to crop image to specified width and height or resize.
	 *                           An array can specify positioning of the crop area. Default false.
	 */