Changeset 35479 for trunk/src/wp-includes/media.php
- Timestamp:
- 10/31/2015 08:49:26 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/media.php
r35465 r35479 15 15 * values are 'thumb' or 'thumbnail' for the given thumbnail size or defaults at 16 16 * 128 width and 96 height in pixels. Also supported for the string value is 17 * 'medium' and 'full'. The 'full' isn't actually supported, but any value other17 * 'medium', 'medium_large' and 'full'. The 'full' isn't actually supported, but any value other 18 18 * than the supported will result in the content_width size or 500 if that is 19 19 * not set. … … 61 61 $max_width = intval(get_option('medium_size_w')); 62 62 $max_height = intval(get_option('medium_size_h')); 63 // if no width is set, default to the theme content width if available 63 64 } 65 elseif ( $size == 'medium_large' ) { 66 $max_width = intval( get_option( 'medium_large_size_w' ) ); 67 $max_height = intval( get_option( 'medium_large_size_h' ) ); 68 69 if ( intval( $content_width ) > 0 ) { 70 $max_width = min( intval( $content_width ), $max_width ); 71 } 64 72 } 65 73 elseif ( $size == 'large' ) { … … 72 80 $max_width = intval(get_option('large_size_w')); 73 81 $max_height = intval(get_option('large_size_h')); 74 if ( intval($content_width) > 0 ) 82 if ( intval($content_width) > 0 ) { 75 83 $max_width = min( intval($content_width), $max_width ); 84 } 76 85 } elseif ( isset( $_wp_additional_image_sizes ) && count( $_wp_additional_image_sizes ) && in_array( $size, array_keys( $_wp_additional_image_sizes ) ) ) { 77 86 $max_width = intval( $_wp_additional_image_sizes[$size]['width'] ); … … 707 716 function get_intermediate_image_sizes() { 708 717 global $_wp_additional_image_sizes; 709 $image_sizes = array('thumbnail', 'medium', ' large'); // Standard sizes718 $image_sizes = array('thumbnail', 'medium', 'medium_large', 'large'); // Standard sizes 710 719 if ( isset( $_wp_additional_image_sizes ) && count( $_wp_additional_image_sizes ) ) 711 720 $image_sizes = array_merge( $image_sizes, array_keys( $_wp_additional_image_sizes ) ); … … 717 726 * 718 727 * @param array $image_sizes An array of intermediate image sizes. Defaults 719 * are 'thumbnail', 'medium', ' large'.728 * are 'thumbnail', 'medium', 'medium_large', 'large'. 720 729 */ 721 730 return apply_filters( 'intermediate_image_sizes', $image_sizes );
Note: See TracChangeset
for help on using the changeset viewer.