From b9b969f12a888f8205b94c5689b5f79d39d3d5de Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Sun, 22 Nov 2009 22:30:27 +0000 Subject: [PATCH] Allow plugins to change the redirect on post/page publishing/submitting. Fixes #10929 props johnjosephbachir and johnbillion. git-svn-id: https://develop.svn.wordpress.org/trunk@12260 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/page.php | 2 +- wp-admin/post.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/page.php b/wp-admin/page.php index f0b139cacf..30d550d59b 100644 --- a/wp-admin/page.php +++ b/wp-admin/page.php @@ -64,7 +64,7 @@ function redirect_page($page_ID) { $location = add_query_arg( 'message', 1, get_edit_post_link( $page_ID, 'url' ) ); } - wp_redirect($location); + wp_redirect( apply_filters( 'redirect_page_location', $location, $page_ID ) ); } if (isset($_POST['deletepost'])) diff --git a/wp-admin/post.php b/wp-admin/post.php index a8fe8bf296..8670110303 100644 --- a/wp-admin/post.php +++ b/wp-admin/post.php @@ -69,7 +69,7 @@ function redirect_post($post_ID = '') { $location = add_query_arg( 'message', 4, get_edit_post_link( $post_ID, 'url' ) ); } - wp_redirect( $location ); + wp_redirect( apply_filters( 'redirect_post_location', $location, $post_ID ) ); } if ( isset( $_POST['deletepost'] ) )