PHP Cross Reference of WordPress Subversion HEAD |
| [ Index ] [ Classes ] [ Functions ] [ Variables ] [ Constants ] |
[Summary view] [Print] [Text view]
1 <?php 2 require_once ('admin.php'); 3 $title = __('Pages'); 4 $parent_file = 'edit.php'; 5 wp_enqueue_script( 'wp-lists' ); 6 require_once ('admin-header.php'); 7 8 $post_stati = array( // array( adj, noun ) 9 'publish' => array(__('Published'), __('Published pages')), 10 'draft' => array(__('Draft'), __('Draft pages')), 11 'private' => array(__('Private'), __('Private pages')) 12 ); 13 14 15 $post_status_label = __('Pages'); 16 $post_status_q = ''; 17 if ( isset($_GET['post_status']) && in_array( $_GET['post_status'], array_keys($post_stati) ) ) { 18 $post_status_label = $post_stati[$_GET['post_status']][1]; 19 $post_status_q = '&post_status=' . $_GET['post_status']; 20 } 21 22 ?> 23 <script> 24 /* <![CDATA[ */ 25 jQuery(function($){$('#the-list').wpList();}); 26 /* ]]> */ 27 </script> 28 <div class="wrap"> 29 <h2><?php 30 // Use $_GET instead of is_ since they can override each other 31 $h2_search = isset($_GET['s']) && $_GET['s'] ? ' ' . sprintf(__('matching “%s”'), wp_specialchars( stripslashes( $_GET['s'] ) ) ) : ''; 32 $h2_author = ''; 33 if ( isset($_GET['author']) && $_GET['author'] ) { 34 $author_user = get_userdata( (int) $_GET['author'] ); 35 $h2_author = ' ' . sprintf(__('by %s'), wp_specialchars( $author_user->display_name )); 36 } 37 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 ); 38 ?></h2> 39 40 <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> 41 42 <form name="searchform" id="searchform" action="" method="get"> 43 <fieldset><legend><?php _e('Search Terms…') ?></legend> 44 <input type="text" name="s" id="s" value="<?php echo attribute_escape( stripslashes( $_GET['s'] ) ); ?>" size="17" /> 45 </fieldset> 46 47 48 <fieldset><legend><?php _e('Page Type…'); ?></legend> 49 <select name='post_status'> 50 <option<?php selected( @$_GET['post_status'], 0 ); ?> value='0'><?php _e('Any'); ?></option> 51 <?php foreach ( $post_stati as $status => $label ) : ?> 52 <option<?php selected( @$_GET['post_status'], $status ); ?> value='<?php echo $status; ?>'><?php echo $label[0]; ?></option> 53 <?php endforeach; ?> 54 </select> 55 </fieldset> 56 57 <?php $editable_ids = get_editable_user_ids( $user_ID ); if ( $editable_ids && count( $editable_ids ) > 1 ) : ?> 58 59 <fieldset><legend><?php _e('Author…'); ?></legend> 60 <?php wp_dropdown_users( array('include' => $editable_ids, 'show_option_all' => __('Any'), 'name' => 'author', 'selected' => isset($_GET['author']) ? $_GET['author'] : 0) ); ?> 61 </fieldset> 62 63 <?php endif; ?> 64 65 <input type="submit" id="post-query-submit" value="<?php _e('Filter »'); ?>" class="button" /> 66 </form> 67 68 <br style="clear:both;" /> 69 70 <?php 71 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"); 72 73 $all = !( $h2_search || $post_status_q ); 74 75 if ($posts) { 76 ?> 77 <table class="widefat"> 78 <thead> 79 <tr> 80 <th scope="col" style="text-align: center"><?php _e('ID') ?></th> 81 <th scope="col"><?php _e('Title') ?></th> 82 <th scope="col"><?php _e('Owner') ?></th> 83 <th scope="col"><?php _e('Updated') ?></th> 84 <th scope="col" colspan="3" style="text-align: center"><?php _e('Action'); ?></th> 85 </tr> 86 </thead> 87 <tbody id="the-list" class="list:page"> 88 <?php page_rows(0, 0, $posts, $all); ?> 89 </tbody> 90 </table> 91 92 <div id="ajax-response"></div> 93 94 <?php 95 } else { 96 ?> 97 <p><?php _e('No pages found.') ?></p> 98 <?php 99 } // end if ($posts) 100 ?> 101 102 <h3><a href="page-new.php"><?php _e('Create New Page »'); ?></a></h3> 103 104 </div> 105 106 <?php include ('admin-footer.php'); ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated Thu Dec 6 06:47:08 2007 for RedAlt XRefs | Cross-referenced by PHPXref 0.6 and RedAlt |