Make WordPress Core

Ticket #48421: 48421.diff

File 48421.diff, 1009 bytes (added by azaozz, 5 years ago)
  • src/wp-includes/post.php

     
    71787178 *
    71797179 * @since 5.3.0
    71807180 *
    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.
    71827183 * @return string|false Path to the original image file or false if the attachment is not an image.
    71837184 */
    7184 function wp_get_original_image_path( $attachment_id ) {
     7185function wp_get_original_image_path( $attachment_id, $unfiltered = false ) {
    71857186        if ( ! wp_attachment_is_image( $attachment_id ) ) {
    71867187                return false;
    71877188        }
    71887189
    71897190        $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 );
    71917192
    71927193        if ( empty( $image_meta['original_image'] ) ) {
    71937194                $original_image = $image_file;