Make WordPress Core


Ignore:
Timestamp:
03/11/2008 09:09:07 PM (19 years ago)
Author:
ryan
Message:

Fix comment bubble links for attachments and pages. Props mdawaffe. fixes #6169

File:
1 edited

Legend:

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

    r7231 r7251  
    305305        $posts_columns['date'] = _c('Date Added|media column header');
    306306        $posts_columns['parent'] = _c('Appears with|media column header');
     307        $posts_columns['comments'] = '<div class="vers"><img alt="Comments" src="images/comment-grey-bubble.png" /></div>';
    307308        $posts_columns['location'] = _c('Location|media column header');
    308309        $posts_columns = apply_filters('manage_media_columns', $posts_columns);
     
    600601        $the_comment_status = wp_get_comment_status($comment->comment_ID);
    601602        $class = ('unapproved' == $the_comment_status) ? 'unapproved' : '';
    602         $post_link = '<a href="edit.php?p=' . $comment->comment_post_ID . '">' . get_the_title($comment->comment_post_ID) . '</a>';
     603        if ( 'attachment' == $post->post_type )
     604                $post_link = "<a href='upload.php?attachment_id=$post->ID'>";
     605        elseif ( 'page' == $post->post_type )
     606                $post_link = "<a href='edit-pages.php?page_id=$post->ID'>";
     607        else
     608                $post_link = "<a href='edit.php?p=$post->ID'>";
     609        $post_link .= get_the_title($comment->comment_post_ID) . '</a>';
    603610        $author_url = get_comment_author_url();
    604611        if ( 'http://' == $author_url )
Note: See TracChangeset for help on using the changeset viewer.