Make WordPress Core


Ignore:
Timestamp:
02/27/2008 11:57:00 PM (18 years ago)
Author:
ryan
Message:

fix new-fangled multi widgets. Props mdawaffe. see #6022

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-pages.php

    r7057 r7077  
    123123<?php
    124124$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";
     125if ( !empty($_GET['p']) ) {
     126    $query_str .= "p=
     127}
    125128$query_str = apply_filters('manage_pages_query', $query_str);
    126129wp($query_str);
     
    161164</div>
    162165
     166<?php
     167if ( 1 == count($posts) && isset( $_GET['p'] ) ) {
     168
     169    $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $id AND comment_approved != 'spam' ORDER BY comment_date");
     170    if ($comments) {
     171        // Make sure comments, post, and post_author are cached
     172        update_comment_cache($comments);
     173        $post = get_post($id);
     174        $authordata = get_userdata($post->post_author);
     175    ?>
     176<h3 id="comments"><?php _e('Comments') ?></h3>
     177<ol id="the-comment-list" class="list:comment commentlist">
     178<?php
     179        $i = 0;
     180        foreach ( $comments as $comment ) {
     181            _wp_comment_list_item( $comment->comment_ID, ++$i );
     182        }
     183    echo '</ol>';
     184    } // end if comments
     185?>
     186<?php } ?>
     187
    163188</div>
    164189
Note: See TracChangeset for help on using the changeset viewer.