Make WordPress Core

Ticket #6165: 6165-pages.diff

File 6165-pages.diff, 1.6 KB (added by mdawaffe, 17 years ago)

for pages

  • wp-admin/edit-pages.php

     
    3434$title = __('Pages');
    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 )
    4239                'publish' => array(__('Published'), __('Published pages'), __('Published (%s)')),
     
    5451        $post_status_q .= '&perm=readable';
    5552}
    5653
     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');
     62
    5763?>
    5864<div class="wrap">
    5965<form id="posts-filter" action="" method="get">
     
    122128<br style="clear:both;" />
    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";
    126131
    127 $query_str = apply_filters('manage_pages_query', $query_str);
    128 wp($query_str);
    129 
    130132$all = !( $h2_search || $post_status_q );
    131133
    132134if ($posts) {
     
    164166
    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");
    170172        if ( $comments ) :