Make WordPress Core


Ignore:
Timestamp:
09/15/2015 02:49:12 AM (9 years ago)
Author:
wonderboymusic
Message:

Don't ever use the guid value when retrieving URLs for media, use wp_get_attachment_url(). Use get_attached_file() for path to file.

Fixes #33386.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/media.php

    r34134 r34163  
    11761176    <# } #>
    11771177    <div class="wp-playlist-caption">
    1178         <span class="wp-playlist-item-meta wp-playlist-item-title"><?php 
     1178        <span class="wp-playlist-item-meta wp-playlist-item-title"><?php
    11791179            /* translators: playlist item title */
    11801180            printf( _x( '&#8220;%s&#8221;', 'playlist item title' ), '{{ data.title }}' );
     
    20772077        return array();
    20782078
    2079     $filename = basename($attachment->guid);
     2079    $file = get_attached_file( $attachment->ID );
     2080    $filename = basename( $file );
    20802081
    20812082    $objects = array('attachment');
Note: See TracChangeset for help on using the changeset viewer.