Use get_attached_file() in attachment_submitbox_metadata().

Props kitchin.
Fixes #33386.


git-svn-id: https://develop.svn.wordpress.org/trunk@34171 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2015-09-15 04:17:38 +00:00
parent c0d850878a
commit c95d6b3ec8

View File

@ -2787,7 +2787,8 @@ function edit_form_image_editor( $post ) {
function attachment_submitbox_metadata() { function attachment_submitbox_metadata() {
$post = get_post(); $post = get_post();
$filename = esc_html( wp_basename( $post->guid ) ); $file = get_attached_file( $post->ID );
$filename = esc_html( wp_basename( $file ) );
$media_dims = ''; $media_dims = '';
$meta = wp_get_attachment_metadata( $post->ID ); $meta = wp_get_attachment_metadata( $post->ID );
@ -2822,7 +2823,6 @@ function attachment_submitbox_metadata() {
</div> </div>
<?php <?php
$file = get_attached_file( $post->ID );
$file_size = false; $file_size = false;
if ( isset( $meta['filesize'] ) ) if ( isset( $meta['filesize'] ) )