- } elseif ( ( isset($_POST['save']) || isset($_POST['publish']) ) && ( empty($referredby) || $referredby == $referer || 'redo' != $referredby ) ) {
- if ( isset($_POST['_wp_original_http_referer']) && strpos( $_POST['_wp_original_http_referer'], '/wp-admin/post.php') === false && strpos( $_POST['_wp_original_http_referer'], '/wp-admin/post-new.php') === false )
- $location = add_query_arg( array(
- '_wp_original_http_referer' => urlencode( stripslashes( $_POST['_wp_original_http_referer'] ) ),
- 'message' => 1
- ), get_edit_post_link( $post_ID, 'url' ) );
- else {
- 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' ) );
- } else {
- $location = add_query_arg( 'message', 7, get_edit_post_link( $post_ID, 'url' ) );
- }
+ } 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' ) );
+ } else {
+ $location = add_query_arg( 'message', 1, get_edit_post_link( $post_ID, 'url' ) );