wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



wp_shrink_dimensions › WordPress Function

Od2.0.0
Przestarzały3.0.0
wp_shrink_dimensions ( $width, $height, $wmax = 128, $hmax = 96 )
Parametry: (4)
  • (int) $width Current width of the image
    Wymagane: Tak
  • (int) $height Current height of the image
    Wymagane: Tak
  • (int) $wmax Maximum wanted width
    Wymagane: Nie
    Domyślny: 128
  • (int) $hmax Maximum wanted height
    Wymagane: Nie
    Domyślny: 96
Zobacz:
Powrót:
  • (array) Shrunk dimensions (width, height).
Zdefiniowane na:
Codex:

Calculates the new dimensions for a downsampled image.



Źródło

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 );
}