Ticket #16226: 16226.2.diff
File 16226.2.diff, 1.5 KB (added by , 14 years ago) |
---|
-
wp-includes/media.php
169 169 // we have the actual image size, but might need to further constrain it if content_width is narrower 170 170 list( $width, $height ) = image_constrain_size_for_editor( $width, $height, $size ); 171 171 172 $img_url = dirname($img_url) . '/' . urlencode(basename($img_url)); 173 172 174 return array( $img_url, $width, $height, $is_intermediate ); 173 175 } 174 176 return false; … … 565 567 $data = $imagedata['sizes'][$size]; 566 568 // include the full filesystem path of the intermediate file 567 569 if ( empty($data['path']) && !empty($data['file']) ) { 568 $file_url = wp_get_attachment_url($post_id); 570 $file_url = wp_get_attachment_url($post_id); // What's this here for? and why is the return of this block of code completely different to the 2 above documented returns? 569 571 $data['path'] = path_join( dirname($imagedata['file']), $data['file'] ); 570 572 $data['url'] = path_join( dirname($file_url), $data['file'] ); 571 573 } -
wp-includes/post.php
3832 3832 3833 3833 $url = apply_filters( 'wp_get_attachment_url', $url, $post->ID ); 3834 3834 3835 if ( $url ) 3836 $url = dirname($url) . '/' . urlencode(basename($url)); // encode the filename 3837 3835 3838 if ( 'attachment' != $post->post_type || empty( $url ) ) 3836 3839 return false; 3837 3840