A WordPress-centric search engine for devs and theme authors



wp_constrain_dimensions ›

Since4.1.0
Deprecatedn/a
apply_filters( 'wp_constrain_dimensions', array( $w, $h )
Parameters: (5)
  • (array) $dimensions The image width and height.
    Required: Yes
  • (int) $current_width The current width of the image.
    Required: Yes
  • (int) $current_height The current height of the image.
    Required: Yes
  • (int) $max_width The maximum width permitted.
    Required: Yes
  • (int) $max_height The maximum height permitted.
    Required: Yes
Defined at:
Codex:

Filters dimensions to constrain down-sampled images to.





Source

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