mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Dedicated drafts page
git-svn-id: http://svn.automattic.com/wordpress/trunk@8992 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
677f7ca342
commit
e1484dccfd
7
wp-admin/edit-post-drafts.php
Normal file
7
wp-admin/edit-post-drafts.php
Normal file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
$locked_post_status = 'draft';
|
||||
$_GET['post_status'] = 'draft';
|
||||
|
||||
require_once('edit.php');
|
||||
|
||||
?>
|
@ -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>
|
||||
|
||||
|
@ -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' );
|
||||
|
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user