Changeset 5575 for trunk/wp-admin/edit-pages.php
- Timestamp:
- 05/28/2007 06:34:06 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/edit-pages.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-pages.php
r5361 r5575 5 5 wp_enqueue_script( 'listman' ); 6 6 require_once('admin-header.php'); 7 8 $post_stati = array( // array( adj, noun ) 9 'draft' => array(__('Draft'), __('Draft pages')), 10 'future' => array(__('Future dated'), __('Future dated pages')), 11 'private' => array(__('Private'), __('Private pages')), 12 'publish' => array(__('Published'), __('Published pages')) 13 ); 14 15 16 $post_status_label = _c('Pages|manage pages header'); 17 $post_listing_pageable = true; 18 if ( isset($_GET['post_status']) && in_array( $_GET['post_status'], array_keys($post_stati) ) ) { 19 $post_status_label = $post_stati[$_GET['post_status']][1]; 20 $post_listing_pageable = false; 21 $post_status_q = '&post_status=' . $_GET['post_status']; 22 if ( 'publish' == $_GET['post_status'] ); 23 $post_listing_pageable = true; 24 } 25 7 26 ?> 8 27 9 28 <div class="wrap"> 10 <h2><?php _e('Page Management'); ?></h2> 29 30 <h2><?php 31 // Use $_GET instead of is_ since they can override each other 32 $h2_search = isset($_GET['s']) && $_GET['s'] ? ' ' . sprintf(__('matching “%s”'), wp_specialchars( stripslashes( $_GET['s'] ) ) ) : ''; 33 printf( _c( '%1$s%2$s|manage pages header' ), $post_status_label, $h2_search ); 34 ?></h2> 35 11 36 <p><?php _e('Pages are like posts except they live outside of the normal blog chronology and can be hierarchical. You can use pages to organize and manage any amount of content.'); ?> <a href="page-new.php"><?php _e('Create a new page »'); ?></a></p> 12 37 13 38 <form name="searchform" id="searchform" action="" method="get"> 14 <fieldset> 15 <legend><?php _e('Search Pages…') ?></legend> 16 <input type="text" name="s" id="s" value="<?php if (isset($_GET['s'])) echo attribute_escape($_GET['s']); ?>" size="17" /> 17 <input type="submit" name="submit" value="<?php _e('Search') ?>" /> 39 <fieldset><legend><?php _e('Search Terms…') ?></legend> 40 <input type="text" name="s" id="s" value="<?php echo attribute_escape( stripslashes( $_GET['s'] ) ); ?>" size="17" /> 18 41 </fieldset> 42 43 44 <fieldset><legend><?php _e('Page Type…'); ?></legend> 45 <select name='post_status'> 46 <option<?php selected( @$_GET['post_status'], 0 ); ?> value='0'><?php _e('Any'); ?></option> 47 <?php foreach ( $post_stati as $status => $label ) : ?> 48 <option<?php selected( @$_GET['post_status'], $status ); ?> value='<?php echo $status; ?>'><?php echo $label[0]; ?></option> 49 <?php endforeach; ?> 50 </select> 51 </fieldset> 52 53 <input type="submit" id="post-query-submit" value="<?php _e('Go »'); ?>" class="button" /> 19 54 </form> 20 55 … … 22 57 23 58 <?php 24 wp( 'post_type=page&orderby=menu_order&what_to_show=posts&posts_per_page=-1&posts_per_archive_page=-1&order=asc');59 wp("post_type=page&orderby=menu_order&what_to_show=posts$post_status_q&posts_per_page=-1&posts_per_archive_page=-1&order=asc"); 25 60 26 61 if ( $_GET['s'] ) … … 42 77 </thead> 43 78 <tbody id="the-list"> 44 <?php 45 page_rows(0, 0, $posts, $all); 46 ?> 79 <?php page_rows(0, 0, $posts, $all); ?> 47 80 </tbody> 48 81 </table> … … 53 86 } else { 54 87 ?> 55 <p><?php _e('No pages yet.') ?></p>88 <p><?php _e('No pages found.') ?></p> 56 89 <?php 57 90 } // end if ($posts)
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)