Ticket #48421: 48421.diff
File 48421.diff, 1009 bytes (added by , 5 years ago) |
---|
-
src/wp-includes/post.php
7178 7178 * 7179 7179 * @since 5.3.0 7180 7180 * 7181 * @param int $attachment_id Attachment ID. 7181 * @param int $attachment_id Attachment ID. 7182 * @param bool $unfiltered Optional. Passed through to `get_attached_file()`. Default false. 7182 7183 * @return string|false Path to the original image file or false if the attachment is not an image. 7183 7184 */ 7184 function wp_get_original_image_path( $attachment_id ) {7185 function wp_get_original_image_path( $attachment_id, $unfiltered = false ) { 7185 7186 if ( ! wp_attachment_is_image( $attachment_id ) ) { 7186 7187 return false; 7187 7188 } 7188 7189 7189 7190 $image_meta = wp_get_attachment_metadata( $attachment_id ); 7190 $image_file = get_attached_file( $attachment_id );7191 $image_file = get_attached_file( $attachment_id, $unfiltered ); 7191 7192 7192 7193 if ( empty( $image_meta['original_image'] ) ) { 7193 7194 $original_image = $image_file;