Make WordPress Core

Ticket #6165: 6165.b.diff

File 6165.b.diff, 1.3 KB (added by mdawaffe, 17 years ago)

even better

  • wp-admin/edit.php

     
    3434$title = __('Posts');
    3535$parent_file = 'edit.php';
    3636wp_enqueue_script('admin-forms');
    37 if ( 1 == $_GET['c'] )
     37
     38list($post_stati, $avail_post_stati) = wp_edit_posts_query();
     39
     40if ( 1 == count($posts) && is_singular() )
    3841        wp_enqueue_script( 'admin-comments' );
    3942require_once('admin-header.php');
    4043
    41 list($post_stati, $avail_post_stati) = wp_edit_posts_query();
    42 
    4344if ( !isset( $_GET['paged'] ) )
    4445        $_GET['paged'] = 1;
    4546
     
    139140<input type="submit" value="<?php _e('Delete'); ?>" name="deleteit" class="button-secondary delete" />
    140141<?php wp_nonce_field('bulk-posts'); ?>
    141142<?php
    142 if ( !isset( $_GET['p'] ) ) {
     143if ( !is_singular() ) {
    143144$arc_query = "SELECT DISTINCT YEAR(post_date) AS yyear, MONTH(post_date) AS mmonth FROM $wpdb->posts WHERE post_type = 'post' ORDER BY post_date DESC";
    144145
    145146$arc_result = $wpdb->get_results( $arc_query );
     
    195196
    196197<?php
    197198
    198 if ( 1 == count($posts) && isset( $_GET['p'] ) ) :
     199if ( 1 == count($posts) && is_singular() ) :
    199200
    200201        $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $id AND comment_approved != 'spam' ORDER BY comment_date");
    201202        if ( $comments ) :