Make WordPress Core

Changeset 7248


Ignore:
Timestamp:
03/11/2008 08:26:10 PM (17 years ago)
Author:
ryan
Message:

Fix AJAX comment ops for single pages. Props mdawaffe. fixes #6165

File:
1 edited

Legend:

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

    r7184 r7248  
    3535$parent_file = 'edit.php';
    3636wp_enqueue_script('admin-forms');
    37 if ( 1 == $_GET['c'] )
    38     wp_enqueue_script( 'admin-comments' );
    39 require_once('admin-header.php');
    4037
    4138$post_stati  = array(   //  array( adj, noun )
     
    5451    $post_status_q .= '&perm=readable';
    5552}
     53
     54$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";
     55
     56$query_str = apply_filters('manage_pages_query', $query_str);
     57wp($query_str);
     58
     59if ( is_singular() )
     60    wp_enqueue_script( 'admin-comments' );
     61require_once('admin-header.php');
    5662
    5763?>
     
    123129
    124130<?php
    125 $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";
    126 
    127 $query_str = apply_filters('manage_pages_query', $query_str);
    128 wp($query_str);
    129131
    130132$all = !( $h2_search || $post_status_q );
     
    165167<?php
    166168
    167 if ( 1 == count($posts) && isset( $_GET['page_id'] ) ) :
     169if ( 1 == count($posts) && is_singular() ) :
    168170
    169171    $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $id AND comment_approved != 'spam' ORDER BY comment_date");
Note: See TracChangeset for help on using the changeset viewer.