mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-13 05:10:18 +00:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user