Use attachment title instead of filename, unless it is empty

git-svn-id: https://develop.svn.wordpress.org/trunk@7533 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith
2008-03-26 21:00:21 +00:00
parent bfc779927b
commit f7c21d131d
3 changed files with 5 additions and 3 deletions
+3 -1
View File
@@ -644,10 +644,12 @@ function get_media_item( $attachment_id, $args = null ) {
$toggle_links = '';
}
$display_title = ( !empty( $title ) ) ? $title : $filename; // $title shouldn't ever be empty, but just in case
$item = "
$type
$toggle_links
<div class='filename new'>$filename</div>
<div class='filename new'>$display_title</div>
<table class='slidetoggle describe $class'>
<tbody class='media-item-info'>
<tr>