Summery Summery
Check if an image size exists.
Syntax Syntax
Parameters Parameters
- $name
-
(Required) The image size to check.
Return Return
(bool) True if the image size exists, false if not.
Source Source
File: wp-includes/media.php
function has_image_size( $name ) { $sizes = wp_get_additional_image_sizes(); return isset( $sizes[ $name ] ); }
Advertisement
Changelog Changelog
Version | Description |
---|---|
3.9.0 | Introduced. |