WordPress.org

Make WordPress Core

Ticket #6264: 6264.diff

File 6264.diff, 2.8 KB (added by mdawaffe, 10 years ago)
  • wp-admin/edit-post-rows.php

     
    1919        </thead>
    2020        <tbody>
    2121<?php
    22 $i_post = 0;
    2322if ( have_posts() ) {
    2423$bgcolor = '';
    2524add_filter('the_title','wp_specialchars');
    26 while (have_posts()) : the_post(); $i_post++;
    27 $class = ( $i_post > 15 || 'alternate' == $class) ? '' : 'alternate';
     25while (have_posts()) : the_post();
     26$class = 'alternate' == $class ? '' : 'alternate';
    2827global $current_user;
    2928$post_owner = ( $current_user->ID == $post->post_author ? 'self' : 'other' );
    3029?>
  • wp-admin/edit-attachment-rows.php

     
    1919        </thead>
    2020        <tbody id="the-list" class="list:post">
    2121<?php
    22 $i_post = 0;
    2322if ( have_posts() ) {
    2423$bgcolor = '';
    2524add_filter('the_title','wp_specialchars');
    26 while (have_posts()) : the_post(); $i_post++;
    27 if ( 16 == $i_post )
    28         echo "\t</tbody>\n\t<tbody id='the-extra-list' class='list:post' style='display: none'>\n"; // Hack!
    29 $class = ( $i_post > 15 || 'alternate' == $class) ? '' : 'alternate';
     25while (have_posts()) : the_post();
     26$class = 'alternate' == $class ? '' : 'alternate';
    3027global $current_user;
    3128$post_owner = ( $current_user->ID == $post->post_author ? 'self' : 'other' );
    3229?>
  • wp-admin/upload.php

     
    3333$parent_file = 'edit.php';
    3434wp_enqueue_script( 'admin-forms' );
    3535
    36 if ( isset($_GET['paged']) && $start = ( intval($_GET['paged']) - 1 ) * 15 )
    37         add_filter( 'post_limits', $limit_filter = create_function( '$a', "return 'LIMIT $start, 15';" ) );
    3836list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query();
    39 $wp_query->max_num_pages = ceil( $wp_query->found_posts / 15 ); // We grab 20 but only show 15 ( 5 more for ajax extra )
    4037
    4138if ( is_singular() )
    4239        wp_enqueue_script( 'admin-comments' );
     
    128125$page_links = paginate_links( array(
    129126        'base' => add_query_arg( 'paged', '%#%' ),
    130127        'format' => '',
    131         'total' => ceil($wp_query->found_posts / 15),
     128        'total' => $wp_query->max_num_pages,
    132129        'current' => $_GET['paged']
    133130));
    134131
  • wp-admin/edit.php

     
    126126$page_links = paginate_links( array(
    127127        'base' => add_query_arg( 'paged', '%#%' ),
    128128        'format' => '',
    129         'total' => ceil($wp_query->found_posts / 15),
     129        'total' => $wp_query->max_num_pages,
    130130        'current' => $_GET['paged']
    131131));
    132132