wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



wp_shrink_dimensions › WordPress Function

Depuis2.0.0
Dépréciée3.0.0
wp_shrink_dimensions ( $width, $height, $wmax = 128, $hmax = 96 )
Paramètres: (4)
  • (int) $width Current width of the image
    Requis: Oui
  • (int) $height Current height of the image
    Requis: Oui
  • (int) $wmax Maximum wanted width
    Requis: Non
    Défaut: 128
  • (int) $hmax Maximum wanted height
    Requis: Non
    Défaut: 96
Voir:
Retourne:
  • (array) Shrunk dimensions (width, height).
Défini(e) dans:
Codex:

Calculates the new dimensions for a downsampled image.



Source

function wp_shrink_dimensions( $width, $height, $wmax = 128, $hmax = 96 ) {
	_deprecated_function( __FUNCTION__, '3.0.0', 'wp_constrain_dimensions()' );
	return wp_constrain_dimensions( $width, $height, $wmax, $hmax );
}