Un motore di ricerca WordPress per sviluppatori e autori di temi



_image_get_preview_ratio ›

Da2.9.0
Deprecaton/a
_image_get_preview_ratio ( $w, $h )
Parametri: (2)
  • (int) $w Image width in pixels.
    Richiesto:
  • (int) $h Image height in pixels.
    Richiesto:
Ritorna:
  • (float|int) Image preview ratio.
Definito a:
Codex:

Image preview ratio. Internal use only.



Sorgenti

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