WordPress.org

Make WordPress Core

Changeset 31857


Ignore:
Timestamp:
03/22/2015 11:02:00 AM (6 years ago)
Author:
helen
Message:

Media: Show filename instead of extension in the list table.

This helps differentiate between files with the same or similar image or icon. Extension shows as a part of the filename, and so is not separately needed anymore.

fixes #30943.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-media-list-table.php

    r31619 r31857  
    341341            <?php };
    342342            _media_states( $post ); ?></strong>
    343             <p>
    344 <?php
    345             if ( preg_match( '/^.*?\.(\w+)$/', get_attached_file( $post->ID ), $matches ) )
    346                 echo esc_html( strtoupper( $matches[1] ) );
    347             else
    348                 echo strtoupper( str_replace( 'image/', '', get_post_mime_type() ) );
    349 ?>
    350             </p>
     343            <p class="filename"><?php echo wp_basename( $post->guid ); ?></p>
    351344<?php
    352345        echo $this->row_actions( $this->_get_row_actions( $post, $att_title ) );
Note: See TracChangeset for help on using the changeset viewer.