mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-06 07:36:58 +00:00
Better feedback on publishing of future posts and pages. Fixes #10711 based on patch from scribu.
git-svn-id: https://develop.svn.wordpress.org/trunk@11897 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
+10
-4
@@ -40,10 +40,16 @@ function redirect_post($post_ID = '') {
|
||||
$location = 'sidebar.php?a=b';
|
||||
} elseif ( ( isset($_POST['save']) || isset($_POST['publish']) ) ) {
|
||||
if ( isset( $_POST['publish'] ) ) {
|
||||
if ( 'pending' == get_post_status( $post_ID ) )
|
||||
$location = add_query_arg( 'message', 8, get_edit_post_link( $post_ID, 'url' ) );
|
||||
else
|
||||
$location = add_query_arg( 'message', 6, get_edit_post_link( $post_ID, 'url' ) );
|
||||
switch ( get_post_status( $post_ID ) ) {
|
||||
case 'pending':
|
||||
$location = add_query_arg( 'message', 8, get_edit_post_link( $post_ID, 'url' ) );
|
||||
break;
|
||||
case 'future':
|
||||
$location = add_query_arg( 'message', 9, get_edit_post_link( $post_ID, 'url' ) );
|
||||
break;
|
||||
default:
|
||||
$location = add_query_arg( 'message', 6, get_edit_post_link( $post_ID, 'url' ) );
|
||||
}
|
||||
} else {
|
||||
$location = add_query_arg( 'message', 1, get_edit_post_link( $post_ID, 'url' ) );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user