2 require_once('admin.php');
4 $parent_file = 'edit.php';
5 wp_enqueue_script( 'listman' );
6 require_once('admin-header.php');
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'))
15 $post_status_label = __('Pages');
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'];
27 // Use $_GET instead of is_ since they can override each other
28 $h2_search = isset($_GET['s']) && $_GET['s'] ? ' ' . sprintf(__('matching “%s”'), wp_specialchars( stripslashes( $_GET['s'] ) ) ) : '';
30 if ( isset($_GET['author']) && $_GET['author'] ) {
31 $author_user = get_userdata( (int) $_GET['author'] );
32 $h2_author = ' ' . sprintf(__('by %s'), wp_specialchars( $author_user->display_name ));
34 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 );
37 <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>
39 <form name="searchform" id="searchform" action="" method="get">
40 <fieldset><legend><?php _e('Search Terms…') ?></legend>
41 <input type="text" name="s" id="s" value="<?php echo attribute_escape( stripslashes( $_GET['s'] ) ); ?>" size="17" />
45 <fieldset><legend><?php _e('Page Type…'); ?></legend>
46 <select name='post_status'>
47 <option<?php selected( @$_GET['post_status'], 0 ); ?> value='0'><?php _e('Any'); ?></option>
48 <?php foreach ( $post_stati as $status => $label ) : ?>
49 <option<?php selected( @$_GET['post_status'], $status ); ?> value='<?php echo $status; ?>'><?php echo $label[0]; ?></option>
54 <?php $editable_ids = get_editable_user_ids( $user_ID ); if ( $editable_ids && count( $editable_ids ) > 1 ) : ?>
56 <fieldset><legend><?php _e('Author…'); ?></legend>
57 <?php wp_dropdown_users( array('include' => $editable_ids, 'show_option_all' => __('Any'), 'name' => 'author', 'selected' => isset($_GET['author']) ? $_GET['author'] : 0) ); ?>
62 <input type="submit" id="post-query-submit" value="<?php _e('Filter »'); ?>" class="button" />
65 <br style="clear:both;" />
68 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");
70 $all = !( $h2_search || $post_status_q );
74 <table class="widefat">
77 <th scope="col" style="text-align: center"><?php _e('ID') ?></th>
78 <th scope="col"><?php _e('Title') ?></th>
79 <th scope="col"><?php _e('Owner') ?></th>
80 <th scope="col"><?php _e('Updated') ?></th>
81 <th scope="col" colspan="3" style="text-align: center"><?php _e('Action'); ?></th>
85 <?php page_rows(0, 0, $posts, $all); ?>
89 <div id="ajax-response"></div>
94 <p><?php _e('No pages found.') ?></p>
99 <h3><a href="page-new.php"><?php _e('Create New Page »'); ?></a></h3>
103 <?php include('admin-footer.php'); ?>