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



wp_constrain_dimensions › WordPress过滤钩子

Since4.1.0
已弃用n/a
› apply_filters( 'wp_constrain_dimensions', array( $w, $h )
参数: (5)
  • () dimensions { An array of width and height values. @type int $0 The width in pixels. @type int $1 The height in pixels. }
    Required: Yes
  • () current_width The current width of the image.
    Required: Yes
  • () current_height The current height of the image.
    Required: Yes
  • () max_width The maximum width permitted.
    Required: Yes
  • () max_height The maximum height permitted.
    Required: Yes
定义在:
文档:

Filters dimensions to constrain down-sampled images to.





源码

return apply_filters( 'wp_constrain_dimensions', array( $w, $h ), $current_width, $current_height, $max_width, $max_height );