Open View/Preview post in a new window from the link in the Saved/Updated message, cleanup messages code, add Draft updated for Pages.

git-svn-id: https://develop.svn.wordpress.org/trunk@12020 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2009-10-11 00:37:26 +00:00
parent 77749a6009
commit 2dc1de999c
4 changed files with 87 additions and 42 deletions

View File

@@ -40,7 +40,6 @@ function redirect_post($post_ID = '') {
$location = 'sidebar.php?a=b';
} elseif ( isset($_POST['save']) || isset($_POST['publish']) ) {
$status = get_post_status( $post_ID );
$link = get_edit_post_link( $post_ID, 'url' );
if ( isset( $_POST['publish'] ) ) {
switch ( $status ) {
@@ -57,7 +56,7 @@ function redirect_post($post_ID = '') {
$message = 'draft' == $status ? 10 : 1;
}
$location = add_query_arg( 'message', $message, $link );
$location = add_query_arg( 'message', $message, get_edit_post_link( $post_ID, 'url' ) );
} elseif ( isset($_POST['addmeta']) && $_POST['addmeta'] ) {
$location = add_query_arg( 'message', 2, wp_get_referer() );
$location = explode('#', $location);