Dedicated drafts page

git-svn-id: http://svn.automattic.com/wordpress/trunk@8992 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-09-26 21:53:26 +00:00
parent 677f7ca342
commit e1484dccfd
4 changed files with 11 additions and 2 deletions

View File

@ -0,0 +1,7 @@
<?php
$locked_post_status = 'draft';
$_GET['post_status'] = 'draft';
require_once('edit.php');
?>

View File

@ -157,6 +157,7 @@ if ( is_single() ) {
<form id="posts-filter" action="" method="get">
<ul class="subsubsub">
<?php
if ( empty($locked_post_status) ) :
$status_links = array();
$num_posts = wp_count_posts( 'post', 'readable' );
$class = empty( $_GET['post_status'] ) ? ' class="current"' : '';
@ -177,6 +178,7 @@ foreach ( $post_stati as $status => $label ) {
}
echo implode( ' |</li>', $status_links ) . '</li>';
unset( $status_links );
endif;
?>
</ul>

View File

@ -43,7 +43,7 @@ $menu[0] = array( __('Dashboard'), 'read', 'index.php' );
$menu[5] = array( __('Posts'), 'edit_posts', 'edit.php', 'wp-menu-open' );
$submenu['edit.php'][5] = array( __('Write'), 'edit_posts', 'post-new.php' );
//$submenu['edit.php'][10] = array( __('Drafts'), 'edit_posts', 'edit.php?post_status=draft' );
$submenu['edit.php'][10] = array( __('Drafts'), 'edit_posts', 'edit-post-drafts.php' );
$submenu['edit.php'][15] = array( __('View All'), 'edit_posts', 'edit.php' );
$submenu['edit.php'][20] = array( __('Tags'), 'manage_categories', 'edit-tags.php' );
$submenu['edit.php'][25] = array( __('Categories'), 'manage_categories', 'categories.php' );

View File

@ -61,7 +61,7 @@ function redirect_post($post_ID = '') {
} elseif (!empty($referredby) && $referredby != $referer) {
$location = $_POST['referredby'];
$location = remove_query_arg('_wp_original_http_referer', $location);
if ( false !== strpos($location, 'edit.php') )
if ( false !== strpos($location, 'edit.php') || false !== strpos($location, 'edit-post-drafts.php') )
$location = add_query_arg('posted', $post_ID, $location);
elseif ( false !== strpos($location, 'wp-admin') )
$location = "post-new.php?posted=$post_ID";