Make WordPress Core


Ignore:
Timestamp:
11/21/2012 01:05:44 PM (12 years ago)
Author:
nacin
Message:

Have media-new.php return simple rows of basic attachment data, with an 'Edit' link next to each taking them to post.php (in a new window). Not ideal, but this is largely a fallback screen at this point.

This is bolted on to existing code, the vast majority of which is destined to be ripped out in 3.6 once things settle.

see #22083.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/media.php

    r22749 r22755  
    10561056    global $redir_tab;
    10571057
     1058    echo "<a class='toggle describe-toggle-on' href='#'>$toggle_on</a>";
     1059
    10581060    if ( ( $attachment_id = intval( $attachment_id ) ) && $thumb_url = wp_get_attachment_image_src( $attachment_id, 'thumbnail', true ) )
    10591061        $thumb_url = $thumb_url[0];
    10601062    else
    10611063        $thumb_url = false;
     1064
     1065    $display_title = ( !empty( $title ) ) ? $title : $filename; // $title shouldn't ever be empty, but just in case
     1066    $display_title = $show_title ? "<div class='filename new'><span class='title'>" . wp_html_excerpt( $display_title, 60 ) . "</span></div>" : '';
     1067
     1068    echo "<p><a href='$attachment_url' target='_blank'><img class='thumbnail' src='$thumb_url' alt='' /></a></p>";
    10621069
    10631070    $post = get_post( $attachment_id );
Note: See TracChangeset for help on using the changeset viewer.