Make WordPress Core

Ticket #26768: 26768.diff

File 26768.diff, 700 bytes (added by markoheijnen, 11 years ago)
  • wp-includes/media.php

    diff --git wp-includes/media.php wp-includes/media.php
    index f063e8e..b6a4eb9 100644
    function add_image_size( $name, $width = 0, $height = 0, $crop = false ) { 
    191191}
    192192
    193193/**
     194 * Removed a new image size
     195 *
     196 * @since 3.9.0
     197 *
     198 * @param string $name The image size name.
     199 * @return bool false on failure, true on success.
     200 */
     201function remove_image_size( $name ) {
     202        global $_wp_additional_image_sizes;
     203
     204        if( isset( $_wp_additional_image_sizes[$name] ) ) {
     205                unset( $_wp_additional_image_sizes[$name] );
     206                return true;
     207        }
     208
     209        return false;
     210}
     211
     212/**
    194213 * Registers an image size for the post thumbnail
    195214 *
    196215 * @since 2.9.0