Make WordPress Core


Ignore:
Timestamp:
08/18/2010 04:30:27 PM (14 years ago)
Author:
scribu
Message:

introduce WP_List_Table::comments_bubble(); revert to edit-comments.php?p=123. See #14579

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/default-list-tables.php

    r15502 r15504  
    556556            <?php
    557557                $pending_comments = isset( $this->comment_pending_count[$post->ID] ) ? $this->comment_pending_count[$post->ID] : 0;
    558                 $pending_phrase = sprintf( __( '%s pending' ), number_format( $pending_comments ) );
    559                 if ( $pending_comments )
    560                     echo '<strong>';
    561                 comments_number(
    562                     "<a href='edit-comments.php?post_ID=$post->ID' title='$pending_phrase' class='post-com-count'><span class='comment-count'>"
    563                     . /* translators: comment count link */ _x( '0', 'comment count' ) . '</span></a>',
    564                     "<a href='edit-comments.php?post_ID=$post->ID' title='$pending_phrase' class='post-com-count'><span class='comment-count'>"
    565                     . /* translators: comment count link */ _x( '1', 'comment count' ) . '</span></a>',
    566                     "<a href='edit-comments.php?post_ID=$post->ID' title='$pending_phrase' class='post-com-count'><span class='comment-count'>"
    567                     . /* translators: comment count link: % will be substituted by comment count */ _x( '%', 'comment count' ) . '</span></a>'
    568                 );
    569                 if ( $pending_comments )
    570                     echo '</strong>';
     558
     559                $this->comments_bubble( $post->ID, $pending_comments );
    571560            ?>
    572561            </div></td>
     
    12171206            <div class="post-com-count-wrapper">
    12181207<?php
    1219         $left = get_pending_comments_num( $post->ID );
    1220         $pending_phrase = sprintf( __( '%s pending' ), number_format( $left ) );
    1221         if ( $left )
    1222             echo '<strong>';
    1223         comments_number(
    1224             "<a href='edit-comments.php?post_ID=$id' title='$pending_phrase' class='post-com-count'><span class='comment-count'>"
    1225             . /* translators: comment count link */ _x( '0', 'comment count' ) . '</span></a>',
    1226             "<a href='edit-comments.php?post_ID=$id' title='$pending_phrase' class='post-com-count'><span class='comment-count'>"
    1227             . /* translators: comment count link */ _x( '1', 'comment count' ) . '</span></a>',
    1228             "<a href='edit-comments.php?post_ID=$id' title='$pending_phrase' class='post-com-count'><span class='comment-count'>"
    1229             . /* translators: comment count link: % will be substituted by comment count */ _x( '%', 'comment count' ) . '</span></a>'
    1230         );
    1231         if ( $left )
    1232             echo '</strong>';
    1233         ?>
     1208        $pending_comments = get_pending_comments_num( $post->ID );
     1209
     1210        $this->comments_bubble( $post->ID, $pending_comments );
     1211?>
    12341212            </div>
    12351213        </td>
     
    19661944        global $post_id, $comment_status, $mode;
    19671945
    1968         $post_id = isset( $_REQUEST['post_ID'] ) ? absint( $_REQUEST['post_ID'] ) : 0;
     1946        $post_id = isset( $_REQUEST['p'] ) ? absint( $_REQUEST['p'] ) : 0;
    19691947
    19701948        $mode = ( empty( $_REQUEST['mode'] ) ) ? 'detail' : $_REQUEST['mode'];
     
    23392317                        echo '<div class="response-links"><span class="post-com-count-wrapper">';
    23402318                        echo $post_link . '<br />';
    2341                         $pending_phrase = esc_attr( sprintf( __( '%s pending' ), number_format( $pending_comments ) ) );
    2342                         if ( $pending_comments )
    2343                             echo '<strong>';
    2344                         comments_number(
    2345                             "<a href='edit-comments.php?post_ID=$post->ID' title='$pending_phrase' class='post-com-count'><span class='comment-count'>"
    2346                             . /* translators: comment count link */ _x( '0', 'comment count' ) . '</span></a>',
    2347                             "<a href='edit-comments.php?post_ID=$post->ID' title='$pending_phrase' class='post-com-count'><span class='comment-count'>"
    2348                             . /* translators: comment count link */ _x( '1', 'comment count' ) . '</span></a>',
    2349                             "<a href='edit-comments.php?post_ID=$post->ID' title='$pending_phrase' class='post-com-count'><span class='comment-count'>"
    2350                             . /* translators: comment count link: % will be substituted by comment count */ _x( '%', 'comment count' ) . '</span></a>'
    2351                         );
    2352                         if ( $pending_comments )
    2353                             echo '</strong>';
     2319                        $this->comments_bubble( $post->ID, $pending_comments );
    23542320                        echo '</span> ';
    23552321                        echo "<a href='" . get_permalink( $post->ID ) . "'>#</a>";
Note: See TracChangeset for help on using the changeset viewer.