Remove remnants of infinite posts features. Props mdawaffe. fixes #6264
git-svn-id: http://svn.automattic.com/wordpress/trunk@7359 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
da5b4ca357
commit
d3fbaa1d66
|
@ -19,14 +19,11 @@
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="the-list" class="list:post">
|
<tbody id="the-list" class="list:post">
|
||||||
<?php
|
<?php
|
||||||
$i_post = 0;
|
|
||||||
if ( have_posts() ) {
|
if ( have_posts() ) {
|
||||||
$bgcolor = '';
|
$bgcolor = '';
|
||||||
add_filter('the_title','wp_specialchars');
|
add_filter('the_title','wp_specialchars');
|
||||||
while (have_posts()) : the_post(); $i_post++;
|
while (have_posts()) : the_post();
|
||||||
if ( 16 == $i_post )
|
$class = 'alternate' == $class ? '' : 'alternate';
|
||||||
echo "\t</tbody>\n\t<tbody id='the-extra-list' class='list:post' style='display: none'>\n"; // Hack!
|
|
||||||
$class = ( $i_post > 15 || 'alternate' == $class) ? '' : 'alternate';
|
|
||||||
global $current_user;
|
global $current_user;
|
||||||
$post_owner = ( $current_user->ID == $post->post_author ? 'self' : 'other' );
|
$post_owner = ( $current_user->ID == $post->post_author ? 'self' : 'other' );
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -19,12 +19,11 @@
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
$i_post = 0;
|
|
||||||
if ( have_posts() ) {
|
if ( have_posts() ) {
|
||||||
$bgcolor = '';
|
$bgcolor = '';
|
||||||
add_filter('the_title','wp_specialchars');
|
add_filter('the_title','wp_specialchars');
|
||||||
while (have_posts()) : the_post(); $i_post++;
|
while (have_posts()) : the_post();
|
||||||
$class = ( $i_post > 15 || 'alternate' == $class) ? '' : 'alternate';
|
$class = 'alternate' == $class ? '' : 'alternate';
|
||||||
global $current_user;
|
global $current_user;
|
||||||
$post_owner = ( $current_user->ID == $post->post_author ? 'self' : 'other' );
|
$post_owner = ( $current_user->ID == $post->post_author ? 'self' : 'other' );
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -126,7 +126,7 @@ endif;
|
||||||
$page_links = paginate_links( array(
|
$page_links = paginate_links( array(
|
||||||
'base' => add_query_arg( 'paged', '%#%' ),
|
'base' => add_query_arg( 'paged', '%#%' ),
|
||||||
'format' => '',
|
'format' => '',
|
||||||
'total' => ceil($wp_query->found_posts / 15),
|
'total' => $wp_query->max_num_pages,
|
||||||
'current' => $_GET['paged']
|
'current' => $_GET['paged']
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
|
@ -33,10 +33,7 @@ $title = __('Media Library');
|
||||||
$parent_file = 'edit.php';
|
$parent_file = 'edit.php';
|
||||||
wp_enqueue_script( 'admin-forms' );
|
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();
|
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() )
|
if ( is_singular() )
|
||||||
wp_enqueue_script( 'admin-comments' );
|
wp_enqueue_script( 'admin-comments' );
|
||||||
|
@ -128,7 +125,7 @@ endif;
|
||||||
$page_links = paginate_links( array(
|
$page_links = paginate_links( array(
|
||||||
'base' => add_query_arg( 'paged', '%#%' ),
|
'base' => add_query_arg( 'paged', '%#%' ),
|
||||||
'format' => '',
|
'format' => '',
|
||||||
'total' => ceil($wp_query->found_posts / 15),
|
'total' => $wp_query->max_num_pages,
|
||||||
'current' => $_GET['paged']
|
'current' => $_GET['paged']
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue