Make WordPress Core

Ticket #26951: 26951.patch

File 26951.patch, 588 bytes (added by mordauk, 11 years ago)

Adds has_image_size()

  • wp-includes/media.php

     
    191191}
    192192
    193193/**
     194 * Check if an image size exists
     195 *
     196 * @since 3.9.0
     197 *
     198 * @param string $name The image size name.
     199 * @return bool True if it exists, false if not.
     200 */
     201function has_image_size( $name = '' ) {
     202        global $_wp_additional_image_sizes;
     203
     204        return isset( $_wp_additional_image_sizes[$name] );
     205}
     206
     207/**
    194208 * Registers an image size for the post thumbnail
    195209 *
    196210 * @since 2.9.0