Make WordPress Core


Ignore:
Timestamp:
02/27/2008 12:46:27 AM (18 years ago)
Author:
ryan
Message:

Don't load wp-lists on pages that don't need it. Props mdawaffe. fixes #6011

File:
1 edited

Legend:

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

    r7046 r7057  
    3434$title = __('Posts');
    3535$parent_file = 'edit.php';
    36 wp_enqueue_script( 'admin-posts' );
    3736wp_enqueue_script('admin-forms');
    3837if ( 1 == $_GET['c'] )
     
    4039require_once('admin-header.php');
    4140
    42 add_filter( 'post_limits', $limit_filter = create_function( '$a', '$b = split(" ",$a); if ( !isset($b[2]) ) return $a; $start = intval(trim($b[1])) / 20 * 15; if ( !is_int($start) ) return $a; return "LIMIT $start, 20";' ) );
    4341list($post_stati, $avail_post_stati) = wp_edit_posts_query();
    44 $wp_query->max_num_pages = ceil( $wp_query->found_posts / 15 ); // We grab 20 but only show 15 ( 5 more for ajax extra )
    4542
    4643if ( !isset( $_GET['paged'] ) )
     
    180177</form>
    181178
    182 <form action="" method="post" id="get-extra-posts" class="add:the-extra-list:" style="display:none">
    183     <?php wp_nonce_field( 'add-post', '_ajax_nonce', false ); ?>
    184 </form>
    185 
    186179<div id="ajax-response"></div>
    187180
Note: See TracChangeset for help on using the changeset viewer.