WordPress开发者和主题制作者的搜索引擎



has_image_size ›

Since3.9.0
已弃用n/a
has_image_size ( $name )
参数:
  • (string) $name The image size to check.
    Required: Yes
返回:
  • (bool) True if the image size exists, false if not.
定义在:
文档:

Check if an image size exists.



源码

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