Show comments when viewing a page in Manage Pages. fixes #6022
git-svn-id: http://svn.automattic.com/wordpress/trunk@7078 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d0dfa68b6a
commit
3880d93370
|
@ -122,9 +122,7 @@ endif;
|
|||
|
||||
<?php
|
||||
$query_str = "post_type=page&orderby=menu_order title&what_to_show=posts$post_status_q&posts_per_page=-1&posts_per_archive_page=-1&order=asc";
|
||||
if ( !empty($_GET['p']) ) {
|
||||
$query_str .= "p=
|
||||
}
|
||||
|
||||
$query_str = apply_filters('manage_pages_query', $query_str);
|
||||
wp($query_str);
|
||||
|
||||
|
@ -164,7 +162,7 @@ if ($posts) {
|
|||
</div>
|
||||
|
||||
<?php
|
||||
if ( 1 == count($posts) && isset( $_GET['p'] ) ) {
|
||||
if ( 1 == count($posts) && isset( $_GET['page_id'] ) ) {
|
||||
|
||||
$comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $id AND comment_approved != 'spam' ORDER BY comment_date");
|
||||
if ($comments) {
|
||||
|
|
|
@ -405,7 +405,7 @@ foreach ($posts_columns as $column_name=>$column_display_name) {
|
|||
$pending_phrase = sprintf( __('%s pending'), number_format( $left ) );
|
||||
if ( $left )
|
||||
echo '<strong>';
|
||||
comments_number("<a href='edit-pages.php?p=$id&c=1' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('0') . '</span></a>', "<a href='edit-pages.php?p=$id&c=1' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('1') . '</span></a>', "<a href='edit-pages.php?p=$id&c=1' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('%') . '</span></a>');
|
||||
comments_number("<a href='edit-pages.php?page_id=$id&c=1' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('0') . '</span></a>', "<a href='edit-pages.php?page_id=$id&c=1' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('1') . '</span></a>', "<a href='edit-pages.php?page_id=$id&c=1' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('%') . '</span></a>');
|
||||
if ( $left )
|
||||
echo '</strong>';
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue