mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-09 07:00:01 +00:00
In wp_prepare_attachment_for_js()
, when setting filename
, call wp_basename()
on the result of get_attached_file()
, not WP_Post->guid
. guid
can be set to the result get_permalink()
, which is not a file path.
Props daxelrod. Fixes #32531. Built from https://develop.svn.wordpress.org/trunk@32914 git-svn-id: http://core.svn.wordpress.org/trunk@32885 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f61501f57f
commit
3b88c839f9
@ -2720,7 +2720,7 @@ function wp_prepare_attachment_for_js( $attachment ) {
|
||||
$response = array(
|
||||
'id' => $attachment->ID,
|
||||
'title' => $attachment->post_title,
|
||||
'filename' => wp_basename( $attachment->guid ),
|
||||
'filename' => wp_basename( get_attached_file( $attachment->ID ) ),
|
||||
'url' => $attachment_url,
|
||||
'link' => get_attachment_link( $attachment->ID ),
|
||||
'alt' => get_post_meta( $attachment->ID, '_wp_attachment_image_alt', true ),
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.3-alpha-32913';
|
||||
$wp_version = '4.3-alpha-32914';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
x
Reference in New Issue
Block a user