Show comments when viewing a page in Manage Pages. fixes #6022

git-svn-id: https://develop.svn.wordpress.org/trunk@7078 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-02-28 00:13:09 +00:00
parent 007bcbb057
commit 8e03708f05
2 changed files with 3 additions and 5 deletions

View File

@ -122,9 +122,7 @@ endif;
<?php <?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"; $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); $query_str = apply_filters('manage_pages_query', $query_str);
wp($query_str); wp($query_str);
@ -164,7 +162,7 @@ if ($posts) {
</div> </div>
<?php <?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"); $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $id AND comment_approved != 'spam' ORDER BY comment_date");
if ($comments) { if ($comments) {

View File

@ -405,7 +405,7 @@ foreach ($posts_columns as $column_name=>$column_display_name) {
$pending_phrase = sprintf( __('%s pending'), number_format( $left ) ); $pending_phrase = sprintf( __('%s pending'), number_format( $left ) );
if ( $left ) if ( $left )
echo '<strong>'; echo '<strong>';
comments_number("<a href='edit-pages.php?p=$id&amp;c=1' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('0') . '</span></a>', "<a href='edit-pages.php?p=$id&amp;c=1' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('1') . '</span></a>', "<a href='edit-pages.php?p=$id&amp;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&amp;c=1' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('0') . '</span></a>', "<a href='edit-pages.php?page_id=$id&amp;c=1' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('1') . '</span></a>', "<a href='edit-pages.php?page_id=$id&amp;c=1' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('%') . '</span></a>');
if ( $left ) if ( $left )
echo '</strong>'; echo '</strong>';
?> ?>