Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




wp_shrink_dimensions [ WordPress Function ]

wp_shrink_dimensions ( $width, $height, $wmax = 128, $hmax = 96 )
Parameters:
  • (int) $width Current width of the image
  • (int) $height Current height of the image
  • (int) $wmax Maximum wanted width
  • (int) $hmax Maximum wanted height
Returns:
  • (mixed) Array(height,width) of shrunk dimensions.
Defined at:



Calculates the new dimensions for a downsampled image.

Source


<?php
function wp_shrink_dimensions$width$height$wmax 128$hmax 96 ) {
    
_deprecated_function__FUNCTION__'3.0''wp_constrain_dimensions()' );
    return 
wp_constrain_dimensions$width$height$wmax$hmax );
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics