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:
Peter Westwood
2009-09-01 21:15:20 +00:00
parent 6b5f25507e
commit 0811d99fbd
4 changed files with 24 additions and 8 deletions
+10 -4
View File
@@ -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' ) );
}