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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31857 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Helen Hou-Sandi 2015-03-22 11:02:00 +00:00
parent e0e4780c9d
commit 9822d05f72
1 changed files with 1 additions and 8 deletions

View File

@ -340,14 +340,7 @@ foreach ( $columns as $column_name => $column_display_name ) {
<?php echo $att_title; ?></a>
<?php };
_media_states( $post ); ?></strong>
<p>
<?php
if ( preg_match( '/^.*?\.(\w+)$/', get_attached_file( $post->ID ), $matches ) )
echo esc_html( strtoupper( $matches[1] ) );
else
echo strtoupper( str_replace( 'image/', '', get_post_mime_type() ) );
?>
</p>
<p class="filename"><?php echo wp_basename( $post->guid ); ?></p>
<?php
echo $this->row_actions( $this->_get_row_actions( $post, $att_title ) );
?>