From b912aa201289bd1c9d442c058ce03b3d489185b9 Mon Sep 17 00:00:00 2001 From: westi 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: http://svn.automattic.com/wordpress/trunk@12260 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 f0b139cac..30d550d59 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 a8fe8bf29..867011030 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'] ) )