WordPress.org

Make WordPress Core

Ticket #23292: 23292.diff

File 23292.diff, 526 bytes (added by DrewAPicture, 5 years ago)

filter

  • wp-includes/media.php

     
    16011601        else
    16021602                list( $type, $subtype ) = array( $attachment->post_mime_type, '' );
    16031603
    1604         $attachment_url = wp_get_attachment_url( $attachment->ID );
     1604        $attachment_url = apply_filters( 'wp_prepare_attachment_url', wp_get_attachment_url( $attachment->ID ), $attachment );
    16051605
    16061606        $response = array(
    16071607                'id'          => $attachment->ID,