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



_image_get_preview_ratio ›

Desde2.9.0
Obsoleton/a
_image_get_preview_ratio ( $w, $h )
Parâmetros: (2)
  • (int) $w Image width in pixels.
    Required: Yes
  • (int) $h Image height in pixels.
    Required: Yes
Retorna:
  • (float|int) Image preview ratio.
Definido em:
Codex:

Image preview ratio. Internal use only.



Fonte

function _image_get_preview_ratio( $w, $h ) {
	$max = max( $w, $h );
	return $max > 400 ? ( 400 / $max ) : 1;
}