wp_constrain_dimensions Wordpress function


Description:

Calculates the new dimensions for a downsampled image.


Syntax:


Arguments:

(int) $current_width Current width of the image.
(int) $current_height Current height of the image.
(int) $max_width Optional. Maximum wanted width.
(int) $max_height Optional. Maximum wanted height.


Return Type:

(array) First item is the width, the second item is the height.


Define At:

wp-includes/media.php


Wordpress Reference URL:

http://codex.wordpress.org/Function_Reference/wp_constrain_dimensions


0 Flares Facebook 0 Google+ 0 0 Flares ×
Posted in: Wordpress functions
0 Flares Facebook 0 Pin It Share 0 Google+ 0 0 Flares ×