Ticket #8268: image_downsize.diff
File image_downsize.diff, 862 bytes (added by , 12 years ago) |
---|
-
wp-includes/media.php
125 125 */ 126 126 function image_downsize($id, $size = 'medium') { 127 127 128 // plugins can use this to provide resize services 129 if ( $out = apply_filters('image_downsize', false, $id, $size) ) 130 return $out; 131 128 132 if ( !wp_attachment_is_image($id) ) 129 133 return false; 130 134 … … 133 137 $width = $height = 0; 134 138 $is_intermediate = false; 135 139 136 // plugins can use this to provide resize services137 if ( $out = apply_filters('image_downsize', false, $id, $size) )138 return $out;139 140 140 // try for a new style intermediate size 141 141 if ( $intermediate = image_get_intermediate_size($id, $size) ) { 142 142 $img_url = str_replace(basename($img_url), $intermediate['file'], $img_url);