Revert accidental changes to admin/includes/media.php in [22755]. see #22083.

git-svn-id: http://core.svn.wordpress.org/trunk@22759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2012-11-21 14:04:24 +00:00
parent c901a4825e
commit 75c464671d

View File

@ -1055,18 +1055,11 @@ function get_media_items( $post_id, $errors ) {
function get_media_item( $attachment_id, $args = null ) { function get_media_item( $attachment_id, $args = null ) {
global $redir_tab; global $redir_tab;
echo "<a class='toggle describe-toggle-on' href='#'>$toggle_on</a>";
if ( ( $attachment_id = intval( $attachment_id ) ) && $thumb_url = wp_get_attachment_image_src( $attachment_id, 'thumbnail', true ) ) if ( ( $attachment_id = intval( $attachment_id ) ) && $thumb_url = wp_get_attachment_image_src( $attachment_id, 'thumbnail', true ) )
$thumb_url = $thumb_url[0]; $thumb_url = $thumb_url[0];
else else
$thumb_url = false; $thumb_url = false;
$display_title = ( !empty( $title ) ) ? $title : $filename; // $title shouldn't ever be empty, but just in case
$display_title = $show_title ? "<div class='filename new'><span class='title'>" . wp_html_excerpt( $display_title, 60 ) . "</span></div>" : '';
echo "<p><a href='$attachment_url' target='_blank'><img class='thumbnail' src='$thumb_url' alt='' /></a></p>";
$post = get_post( $attachment_id ); $post = get_post( $attachment_id );
$current_post_id = !empty( $_GET['post_id'] ) ? (int) $_GET['post_id'] : 0; $current_post_id = !empty( $_GET['post_id'] ) ? (int) $_GET['post_id'] : 0;