WordPress.org

Make WordPress Core

Ticket #23267: 23267.patch

File 23267.patch, 1.0 KB (added by SergeyBiryukov, 15 months ago)
  • wp-admin/includes/media.php

     
    23492349function attachment_submitbox_metadata() { 
    23502350        $post = get_post(); 
    23512351 
    2352         $filename = esc_html( basename( $post->guid ) ); 
     2352        $filename = esc_html( wp_basename( $post->guid ) ); 
    23532353 
    23542354        $media_dims = ''; 
    23552355        $meta = wp_get_attachment_metadata( $post->ID ); 
  • wp-includes/media.php

     
    13261326        $response = array( 
    13271327                'id'          => $attachment->ID, 
    13281328                'title'       => $attachment->post_title, 
    1329                 'filename'    => basename( $attachment->guid ), 
     1329                'filename'    => wp_basename( $attachment->guid ), 
    13301330                'url'         => $attachment_url, 
    13311331                'link'        => get_attachment_link( $attachment->ID ), 
    13321332                'alt'         => get_post_meta( $attachment->ID, '_wp_attachment_image_alt', true ),