Add Pages->Drafts

git-svn-id: http://svn.automattic.com/wordpress/trunk@9038 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-09-30 17:51:50 +00:00
parent eef17ba0a5
commit ec4ce0db91
3 changed files with 13 additions and 3 deletions

View File

@ -0,0 +1,8 @@
<?php
$locked_post_status = 'draft';
$_GET['post_status'] = 'draft';
require_once('admin.php');
$title = __('View Draft Pages');
require_once('edit-pages.php');
?>

View File

@ -65,7 +65,8 @@ if ( isset($_GET['action']) && ( -1 != $_GET['action'] || -1 != $_GET['action2']
exit;
}
$title = __('Pages');
if ( empty($title) )
$title = __('View All Pages');
$parent_file = 'edit.php';
wp_enqueue_script('admin-forms');
wp_enqueue_script('inline-edit');
@ -142,7 +143,7 @@ endif; ?>
<?php
$avail_post_stati = get_available_post_statuses('page');
if ( empty($locked_post_status) ) :
$status_links = array();
$num_posts = wp_count_posts('page', 'readable');
$class = empty($_GET['post_status']) ? ' class="current"' : '';
@ -161,6 +162,7 @@ foreach ( $post_stati as $status => $label ) {
}
echo implode(' |</li>', $status_links) . '</li>';
unset($status_links);
endif;
?>
</ul>

View File

@ -42,7 +42,7 @@ $menu[15] = array( __('Links'), 'manage_links', 'link-add.php' );
$menu[20] = array( __('Pages'), 'edit_pages', 'page-new.php' );
$submenu['page-new.php'][5] = array( __('Write'), 'edit_pages', 'page-new.php' );
//$submenu['page-new.php'][10] = array( __('Drafts'), 'edit_pages', 'edit-pages.php?post_status=draft' );
$submenu['page-new.php'][10] = array( __('Drafts'), 'edit_pages', 'edit-page-drafts.php' );
$submenu['page-new.php'][15] = array( __('View All'), 'edit_pages', 'edit-pages.php' );
$menu[25] = array( __('Comments'), 'edit_posts', 'edit-comments.php' );