Make WordPress Core


Ignore:
Timestamp:
06/16/2008 09:08:49 PM (16 years ago)
Author:
mdawaffe
Message:

crazyhorse: merge with trunk [8072:8102]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/crazyhorse/wp-admin/edit-pages.php

    r7998 r8103  
    118118
    119119<div class="tablenav">
     120
     121<?php
     122$pagenum = absint( $_GET['pagenum'] );
     123if ( empty($pagenum) )
     124    $pagenum = 1;
     125if( !$per_page || $pre_page < 0 )
     126    $per_page = 20;
     127
     128$num_pages = ceil(count($posts) / $per_page);
     129$page_links = paginate_links( array(
     130    'base' => add_query_arg( 'pagenum', '%#%' ),
     131    'format' => '',
     132    'total' => $num_pages,
     133    'current' => $pagenum
     134));
     135
     136if ( $page_links )
     137    echo "<div class='tablenav-pages'>$page_links</div>";
     138?>
    120139
    121140<div class="alignleft">
     
    152171  </thead>
    153172  <tbody>
    154   <?php page_rows($posts); ?>
     173  <?php page_rows($posts, $pagenum, $per_page); ?>
    155174  </tbody>
    156175</table>
     
    170189
    171190<div class="tablenav">
     191<?php
     192if ( $page_links )
     193    echo "<div class='tablenav-pages'>$page_links</div>";
     194?>
    172195<br class="clear" />
    173196</div>
Note: See TracChangeset for help on using the changeset viewer.