wpseek.com
WordPress开发者和主题制作者的搜索引擎



image_resize_dimensions › WordPress过滤钩子

Since3.4.0
已弃用n/a
› apply_filters( 'image_resize_dimensions', null, $orig_w, $orig_h, $dest_w, $dest_h, $crop )
参数: (6)
  • () null Whether to preempt output of the resize dimensions.
    Required: Yes
  • () orig_w Original width in pixels.
    Required: Yes
  • () orig_h Original height in pixels.
    Required: Yes
  • () dest_w New width in pixels.
    Required: Yes
  • () dest_h New height in pixels.
    Required: Yes
  • () 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
定义在:
文档:

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.




源码

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