Docs: Add two simple usage examples to the DocBlock for wp_redirect()
.
See #32246. git-svn-id: https://develop.svn.wordpress.org/trunk@37863 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b36a6b44ed
commit
8a7a62bb11
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user