Ticket #10263: get_intermediate_sizes.patch
File get_intermediate_sizes.patch, 1.8 KB (added by , 16 years ago) |
---|
-
wp-includes/media.php
486 486 } 487 487 488 488 /** 489 * Get the available image sizes 490 * @since 2.8.1 491 * @return array Returns a filtered array of image size strings 492 */ 493 function get_intermediate_sizes() 494 { 495 return apply_filters('intermediate_image_sizes', array('thumbnail', 'medium', 'large')); 496 } 497 498 /** 489 499 * Retrieve an image to represent an attachment. 490 500 * 491 501 * A mime icon for files, thumbnail or intermediate size for images. -
wp-includes/post.php
2613 2613 } 2614 2614 2615 2615 // remove intermediate images if there are any 2616 $sizes = apply_filters('intermediate_image_sizes', array('thumbnail', 'medium', 'large'));2616 $sizes = get_intermediate_sizes(); 2617 2617 foreach ( $sizes as $size ) { 2618 2618 if ( $intermediate = image_get_intermediate_size($postid, $size) ) { 2619 2619 $intermediate_file = apply_filters('wp_delete_file', $intermediate['path']); -
wp-admin/includes/image.php
105 105 $metadata['file'] = $file; 106 106 107 107 // make thumbnails and other intermediate sizes 108 $sizes = array('thumbnail', 'medium', 'large'); 109 $sizes = apply_filters('intermediate_image_sizes', $sizes); 108 $sizes = get_intermediate_sizes(); 110 109 111 110 foreach ($sizes as $size) { 112 111 $resized = image_make_intermediate_size( $full_path_file, get_option("{$size}_size_w"), get_option("{$size}_size_h"), get_option("{$size}_crop") );