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:
parent
4bb5d76abc
commit
bc54176af0
|
@ -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 ) );
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue