Index: edit-pages.php
===================================================================
--- edit-pages.php (revision 257)
+++ edit-pages.php (working copy)
@@ -1,103 +1,228 @@
- array(__('Published'), __('Published pages')),
- 'draft' => array(__('Draft'), __('Draft pages')),
- 'private' => array(__('Private'), __('Private pages'))
- );
-
-
-$post_status_label = __('Pages');
-$post_status_q = '';
-if ( isset($_GET['post_status']) && in_array( $_GET['post_status'], array_keys($post_stati) ) ) {
- $post_status_label = $post_stati[$_GET['post_status']][1];
- $post_status_q = '&post_status=' . $_GET['post_status'];
-}
-
-?>
-
-
+
+
display_name ));
+}
+printf( _c( '%1$s%2$s%3$s|You can reorder these: 1: Pages, 2: by {s}, 3: matching {s}' ), $post_status_label, $h2_author, $h2_search );
+?>
+
+
+
+
+
+
+
+
+
+
+
+ |
+ |
+ |
+ |
+ |
+
+
+
+get_results("SELECT `post_title`, `ID`, `guid`, `post_author`, `post_modified` FROM `wp_posts` WHERE `post_type` = 'page' ORDER BY `wp_posts`.`ID` DESC", ARRAY_A);
+$size = sizeof($pages);//total number of pages in the database
+
+$numAdminPagesfull =$size/$numPagesPerPage;//get the total number of full admin pages
+$numAdminPages = (int)$numAdminPagesfull;//get rid of the fraction if there is one
+$fraction = false;//initally set this to false
+
+//if they are not equal, then the number of pages is not divisble by the $numPagesPerPage
+if($numAdminPages != $numAdminPagesfull){
+$numPagesLastPage = ($numAdminPagesfull-$numAdminPages)*$numPagesPerPage;//this gets the number of posts on the last page
+$numAdminPages++;//increase it so we know how many pages there are
+$fraction = true;//so we know that there arent the full number of pages on the last page
+}
+
+if (isset($_POST['pageNum'])){
+ $adminPage = $_POST['pageNum'];
+ unset($_POST['pageNum']);
+ if (isset($_POST['back'])){
+ unset($_POST['back']);
+ $adminPage--;
+ }else if (isset($_POST['next'])){
+ unset($_POST['next']);
+ $adminPage++;
+ }
+ }else{
+ $adminPage = 1;
+}
+//if thre is a fraction, and on the last page, then do it differently
+if ($fraction && $adminPage == $numAdminPages){
+$lowernum = ($adminPage-1)*$numPagesPerPage;
+$uppernum = $lowernum + $numPagesLastPage;
+}else{
+//else, get the adminpage and multiply it by the number of pages per page
+$lowernum = ($adminPage-1)*$numPagesPerPage;
+$uppernum = $adminPage*$numPagesPerPage;
+}
+
+$displayPages ="";//empty this
+for ($i = $lowernum; $i < $uppernum; $i++){
+$displayPages[] = $pages[$i];//add the pages to the displayPage
+}
+//give it to the function to display the pages info on the page
+page_rows_modified($displayPages);
+}
+?>
+
+
+
+
+
+
+
+Displaying pages '.$lowernum.' to '.$uppernum.' of total '. $size.' pages.';
+ ?>
+
+
+
+
+
1){
+ //if not on the first page, add a button to scroll back a page
+ ?>
+
+
+
+
+
+
+
+
+ probably shouldnt be used
+}?>
+
+
+
+
+
+
Index: includes/template.php
===================================================================
--- includes/template.php (revision 257)
+++ includes/template.php (working copy)
@@ -199,6 +199,34 @@
if ( $hierarchy ) page_rows( $id, $level + 1, $pages );
}
}
+//added by Jason Manion
+function page_rows_modified($pages = 0) {
+ global $wpdb, $class;
+
+ if ( empty($pages) || $pages == 0 )
+ return false;
+
+ foreach ( $pages as $post) {
+
+ $title = wp_specialchars($post['post_title']);
+ $id = $post['ID'];
+ $class = ('alternate' == $class ) ? '' : 'alternate';
+ $link = $post['guid'];
+ $authorid = $post['post_author'];
+?>
+
+ |
+ |
+ |
+ |
+ |
+ " . __( 'Edit' ) . ""; } ?> |
+ " . __( 'Delete' ) . ""; } ?> |
+
+
+