Make WordPress Core


Ignore:
Timestamp:
01/08/2010 08:51:12 AM (14 years ago)
Author:
westi
Message:

Introduce a single function for getting all the intermediate image sizes to be used both when adding attachements and deleting. Fixes #10263 props scribu.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/image.php

    r12584 r12659  
    103103        // make thumbnails and other intermediate sizes
    104104        global $_wp_additional_image_sizes;
    105         $temp_sizes = array('thumbnail', 'medium', 'large'); // Standard sizes
    106         if ( isset( $_wp_additional_image_sizes ) && count( $_wp_additional_image_sizes ) )
    107             $temp_sizes = array_merge( $temp_sizes, array_keys( $_wp_additional_image_sizes ) );
    108 
    109         $temp_sizes = apply_filters( 'intermediate_image_sizes', $temp_sizes );
    110 
    111         foreach ( $temp_sizes as $s ) {
     105
     106        foreach ( get_intermediate_image_sizes() as $s ) {
    112107            $sizes[$s] = array( 'width' => '', 'height' => '', 'crop' => FALSE );
    113108            if ( isset( $_wp_additional_image_sizes[$s]['width'] ) )
Note: See TracChangeset for help on using the changeset viewer.