Make WordPress Core


Ignore:
Timestamp:
09/15/2015 02:49:12 AM (10 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-admin/includes/media.php

    r34003 r34163  
    13691369    $toggle_off = __( 'Hide' );
    13701370
    1371     $filename = esc_html( wp_basename( $post->guid ) );
     1371    $file = get_attached_file( $post->ID );
     1372    $filename = esc_html( wp_basename( $file ) );
    13721373    $title = esc_attr( $post->post_title );
    13731374
Note: See TracChangeset for help on using the changeset viewer.