Changeset 12659
- Timestamp:
- 01/08/2010 08:51:12 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/image.php
r12584 r12659 103 103 // make thumbnails and other intermediate sizes 104 104 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 ) { 112 107 $sizes[$s] = array( 'width' => '', 'height' => '', 'crop' => FALSE ); 113 108 if ( isset( $_wp_additional_image_sizes[$s]['width'] ) ) -
trunk/wp-includes/media.php
r12524 r12659 505 505 } 506 506 return $data; 507 } 508 509 /** 510 * Get the available image sizes 511 * @since 3.0 512 * @return array Returns a filtered array of image size strings 513 */ 514 function get_intermediate_image_sizes() { 515 global $_wp_additional_image_sizes; 516 $image_sizes = array('thumbnail', 'medium', 'large'); // Standard sizes 517 if ( isset( $_wp_additional_image_sizes ) && count( $_wp_additional_image_sizes ) ) 518 $image_sizes = array_merge( $image_sizes, array_keys( $_wp_additional_image_sizes ) ); 519 520 return apply_filters( 'intermediate_image_sizes', $image_sizes ); 507 521 } 508 522 -
trunk/wp-includes/post.php
r12652 r12659 2947 2947 2948 2948 // remove intermediate and backup images if there are any 2949 $sizes = apply_filters('intermediate_image_sizes', array('thumbnail', 'medium', 'large')); 2950 foreach ( $sizes as $size ) { 2949 foreach ( get_intermediate_image_sizes() as $size ) { 2951 2950 if ( $intermediate = image_get_intermediate_size($post_id, $size) ) { 2952 2951 $intermediate_file = apply_filters('wp_delete_file', $intermediate['path']);
Note: See TracChangeset
for help on using the changeset viewer.