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



has_image_size ›

Desde3.9.0
Obsoleton/a
has_image_size ( $name )
Parâmetros:
  • (string) $name The image size to check.
    Required: Yes
Retorna:
  • (bool) True if the image size exists, false if not.
Definido em:
Codex:

Check if an image size exists.



Fonte

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