diff --git a/src/wp-includes/pluggable.php b/src/wp-includes/pluggable.php index d590b449e0..8b643598ac 100644 --- a/src/wp-includes/pluggable.php +++ b/src/wp-includes/pluggable.php @@ -1127,6 +1127,19 @@ if ( !function_exists('wp_redirect') ) : /** * Redirects to another page. * + * Note: wp_redirect() does not exit automatically, and should almost always be + * followed by a call to `exit;`: + * + * wp_redirect( $url ); + * exit; + * + * Exiting can also be selectively manipulated by using wp_redirect() as a conditional + * in conjunction with the {@see 'wp_redirect'} and {@see 'wp_redirect_location'} hooks: + * + * if ( wp_redirect( $url ) { + * exit; + * } + * * @since 1.5.1 * * @global bool $is_IIS