wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



wp_shrink_dimensions › WordPress Function

Desde2.0.0
Obsoleto3.0.0
wp_shrink_dimensions ( $width, $height, $wmax = 128, $hmax = 96 )
Parâmetros: (4)
  • (int) $width Current width of the image
    Required: Yes
  • (int) $height Current height of the image
    Required: Yes
  • (int) $wmax Maximum wanted width
    Required: No
    Padrão: 128
  • (int) $hmax Maximum wanted height
    Required: No
    Padrão: 96
Ver:
Retorna:
  • (array) Shrunk dimensions (width, height).
Definido em:
Codex:

Calculates the new dimensions for a downsampled image.



Fonte

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