Un motore di ricerca WordPress per sviluppatori e autori di temi



has_image_size ›

Da3.9.0
Deprecaton/a
has_image_size ( $name )
Parametri:
  • (string) $name The image size to check.
    Richiesto:
Ritorna:
  • (bool) True if the image size exists, false if not.
Definito a:
Codex:

Check if an image size exists.



Sorgenti

function has_image_size( $name ) {
	$sizes = wp_get_additional_image_sizes();
	return isset( $sizes[ $name ] );
}