Uses
Uses | Description |
---|---|
wp-includes/media.php: wp_get_additional_image_sizes() | Retrieve additional image sizes. |
Check if an image size exists.
(string) (Required) The image size to check.
(bool) True if the image size exists, false if not.
File: wp-includes/media.php
function has_image_size( $name ) { $sizes = wp_get_additional_image_sizes(); return isset( $sizes[ $name ] ); }
Version | Description |
---|---|
3.9.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/has_image_size