Use attachment title instead of filename, unless it is empty
git-svn-id: http://svn.automattic.com/wordpress/trunk@7533 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
740f33ea4b
commit
feece21b1f
|
@ -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>
|
||||
|
|
|
@ -53,7 +53,7 @@ function autosave_saved_new(response) {
|
|||
var tempID = jQuery('#post_ID').val();
|
||||
var postID = parseInt( res.responses[0].id );
|
||||
autosave_update_post_ID( postID );
|
||||
if ( tempID < 0 ) // update media buttons
|
||||
if ( tempID < 0 && postID > 0) // update media buttons
|
||||
jQuery('#media-buttons a').each(function(){
|
||||
this.href = this.href.replace(tempID, postID);
|
||||
});
|
||||
|
|
|
@ -47,7 +47,7 @@ class WP_Scripts {
|
|||
'broken' => __('An unidentified error has occurred.')
|
||||
) );
|
||||
|
||||
$this->add( 'autosave', '/wp-includes/js/autosave.js', array('schedule', 'wp-ajax-response'), '20080326' );
|
||||
$this->add( 'autosave', '/wp-includes/js/autosave.js', array('schedule', 'wp-ajax-response'), '20080326b' );
|
||||
|
||||
$this->add( 'wp-ajax', '/wp-includes/js/wp-ajax.js', array('prototype'), '20070306');
|
||||
$this->localize( 'wp-ajax', 'WPAjaxL10n', array(
|
||||
|
|
Loading…
Reference in New Issue