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.

Built from https://develop.svn.wordpress.org/trunk@31857


git-svn-id: http://core.svn.wordpress.org/trunk@31836 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Helen Hou-Sandí 2015-03-22 11:02:29 +00:00
parent 4bb5d76abc
commit bc54176af0
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 echo $att_title; ?></a>
<?php }; <?php };
_media_states( $post ); ?></strong> _media_states( $post ); ?></strong>
<p> <p class="filename"><?php echo wp_basename( $post->guid ); ?></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>
<?php <?php
echo $this->row_actions( $this->_get_row_actions( $post, $att_title ) ); echo $this->row_actions( $this->_get_row_actions( $post, $att_title ) );
?> ?>