diff --git a/wp-admin/edit-attachment-rows.php b/wp-admin/edit-attachment-rows.php index bcf65df7dc..df00d5d101 100644 --- a/wp-admin/edit-attachment-rows.php +++ b/wp-admin/edit-attachment-rows.php @@ -19,14 +19,11 @@
\n\t\n"; // Hack! -$class = ( $i_post > 15 || 'alternate' == $class) ? '' : 'alternate'; +while (have_posts()) : the_post(); +$class = 'alternate' == $class ? '' : 'alternate'; global $current_user; $post_owner = ( $current_user->ID == $post->post_author ? 'self' : 'other' ); ?> diff --git a/wp-admin/edit-post-rows.php b/wp-admin/edit-post-rows.php index a3aac87e70..fe35557deb 100644 --- a/wp-admin/edit-post-rows.php +++ b/wp-admin/edit-post-rows.php @@ -19,12 +19,11 @@ 15 || 'alternate' == $class) ? '' : 'alternate'; +while (have_posts()) : the_post(); +$class = 'alternate' == $class ? '' : 'alternate'; global $current_user; $post_owner = ( $current_user->ID == $post->post_author ? 'self' : 'other' ); ?> diff --git a/wp-admin/edit.php b/wp-admin/edit.php index 80346b1888..24e231af62 100644 --- a/wp-admin/edit.php +++ b/wp-admin/edit.php @@ -126,7 +126,7 @@ endif; $page_links = paginate_links( array( 'base' => add_query_arg( 'paged', '%#%' ), 'format' => '', - 'total' => ceil($wp_query->found_posts / 15), + 'total' => $wp_query->max_num_pages, 'current' => $_GET['paged'] )); diff --git a/wp-admin/upload.php b/wp-admin/upload.php index 90bd179966..89a3404b19 100644 --- a/wp-admin/upload.php +++ b/wp-admin/upload.php @@ -33,10 +33,7 @@ $title = __('Media Library'); $parent_file = 'edit.php'; wp_enqueue_script( 'admin-forms' ); -if ( isset($_GET['paged']) && $start = ( intval($_GET['paged']) - 1 ) * 15 ) - add_filter( 'post_limits', $limit_filter = create_function( '$a', "return 'LIMIT $start, 15';" ) ); list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query(); -$wp_query->max_num_pages = ceil( $wp_query->found_posts / 15 ); // We grab 20 but only show 15 ( 5 more for ajax extra ) if ( is_singular() ) wp_enqueue_script( 'admin-comments' ); @@ -128,7 +125,7 @@ endif; $page_links = paginate_links( array( 'base' => add_query_arg( 'paged', '%#%' ), 'format' => '', - 'total' => ceil($wp_query->found_posts / 15), + 'total' => $wp_query->max_num_pages, 'current' => $_GET['paged'] ));