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.


git-svn-id: https://develop.svn.wordpress.org/trunk@34163 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2015-09-15 02:49:12 +00:00
parent 337451b099
commit 577fea566a
8 changed files with 22 additions and 10 deletions
+2 -1
View File
@@ -1368,7 +1368,8 @@ function get_media_item( $attachment_id, $args = null ) {
$toggle_on = __( 'Show' );
$toggle_off = __( 'Hide' );
$filename = esc_html( wp_basename( $post->guid ) );
$file = get_attached_file( $post->ID );
$filename = esc_html( wp_basename( $file ) );
$title = esc_attr( $post->post_title );
$post_mime_types = get_post_mime_types();