Changeset 15504
- Timestamp:
- 08/18/2010 04:30:27 PM (15 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-comments.php
r15496 r15504 226 226 $link = add_query_arg( 'comment_status', $status, $link ); 227 227 if ( $post_id ) 228 $link = add_query_arg( 'p ost_ID', absint( $post_id ), $link );228 $link = add_query_arg( 'p', absint( $post_id ), $link ); 229 229 /* 230 230 // I toyed with this, but decided against it. Leaving it in here in case anyone thinks it is a good idea. ~ Mark … … 253 253 <input type="hidden" name="mode" value="<?php echo esc_attr($mode); ?>" /> 254 254 <?php if ( $post_id ) : ?> 255 <input type="hidden" name="p ost_ID" value="<?php echo esc_attr( intval( $post_id ) ); ?>" />255 <input type="hidden" name="p" value="<?php echo esc_attr( intval( $post_id ) ); ?>" /> 256 256 <?php endif; ?> 257 257 <input type="hidden" name="comment_status" value="<?php echo esc_attr($comment_status); ?>" /> … … 281 281 <input type="hidden" name="page" value="<?php echo esc_attr($page); ?>" /> 282 282 <input type="hidden" name="per_page" value="<?php echo esc_attr($comments_per_page); ?>" /> 283 <input type="hidden" name="p ost_ID" value="<?php echo esc_attr( $post_id ); ?>" />283 <input type="hidden" name="p" value="<?php echo esc_attr( $post_id ); ?>" /> 284 284 <input type="hidden" name="comment_type" value="<?php echo esc_attr( $comment_type ); ?>" /> 285 285 <?php wp_nonce_field( 'add-comment', '_ajax_nonce', false ); ?> -
trunk/wp-admin/includes/default-list-tables.php
r15502 r15504 556 556 <?php 557 557 $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 ); 571 560 ?> 572 561 </div></td> … … 1217 1206 <div class="post-com-count-wrapper"> 1218 1207 <?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 ?> 1234 1212 </div> 1235 1213 </td> … … 1966 1944 global $post_id, $comment_status, $mode; 1967 1945 1968 $post_id = isset( $_REQUEST['p ost_ID'] ) ? absint( $_REQUEST['post_ID'] ) : 0;1946 $post_id = isset( $_REQUEST['p'] ) ? absint( $_REQUEST['p'] ) : 0; 1969 1947 1970 1948 $mode = ( empty( $_REQUEST['mode'] ) ) ? 'detail' : $_REQUEST['mode']; … … 2339 2317 echo '<div class="response-links"><span class="post-com-count-wrapper">'; 2340 2318 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 ); 2354 2320 echo '</span> '; 2355 2321 echo "<a href='" . get_permalink( $post->ID ) . "'>#</a>"; -
trunk/wp-admin/includes/list-table.php
r15496 r15504 267 267 </div> 268 268 <?php 269 } 270 271 /** Display a comment count bubble 272 * 273 * 274 * @since 3.1.0 275 * @access protected 276 * 277 * @param int $post_id 278 * @param int $pending_comments 279 */ 280 function comments_bubble( $post_id, $pending_comments ) { 281 $pending_phrase = sprintf( __( '%s pending' ), number_format( $pending_comments ) ); 282 283 if ( $pending_comments ) 284 echo '<strong>'; 285 286 $link = "<a href='edit-comments.php?p=$post->ID' title='$pending_phrase' class='post-com-count'><span class='comment-count'>%s</span></a>"; 287 288 comments_number( 289 sprintf( $link, /* translators: comment count link */ _x( '0', 'comment count' ) ), 290 sprintf( $link, /* translators: comment count link */ _x( '1', 'comment count' ) ), 291 sprintf( $link, /* translators: comment count link: % will be substituted by comment count */ _x( '%', 'comment count' ) ) 292 ); 293 294 if ( $pending_comments ) 295 echo '</strong>'; 269 296 } 270 297
Note: See TracChangeset
for help on using the changeset viewer.