A WordPress-centric search engine for devs and theme authors



image_resize_dimensions ›

Since3.4.0
Deprecatedn/a
apply_filters( 'image_resize_dimensions', null, $orig_w, $orig_h, $dest_w, $dest_h, $crop )
Parameters: (6)
  • (null|mixed) $null Whether to preempt output of the resize dimensions.
    Required: Yes
  • (int) $orig_w Original width in pixels.
    Required: Yes
  • (int) $orig_h Original height in pixels.
    Required: Yes
  • (int) $dest_w New width in pixels.
    Required: Yes
  • (int) $dest_h New height in pixels.
    Required: Yes
  • (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.
    Required: Yes
Defined at:
Codex:

Filters whether to preempt calculating the image resize dimensions.

Passing a non-null value to the filter will effectively short-circuit image_resize_dimensions(), returning that value instead.





Source

$output = apply_filters( 'image_resize_dimensions', null, $orig_w, $orig_h, $dest_w, $dest_h, $crop );