Make WordPress Core

Changeset 37863


Ignore:
Timestamp:
06/26/2016 07:45:31 AM (8 years ago)
Author:
DrewAPicture
Message:

Docs: Add two simple usage examples to the DocBlock for wp_redirect().

See #32246.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/pluggable.php

    r37704 r37863  
    11271127/**
    11281128 * Redirects to another page.
     1129 *
     1130 * Note: wp_redirect() does not exit automatically, and should almost always be
     1131 * followed by a call to `exit;`:
     1132 *
     1133 *     wp_redirect( $url );
     1134 *     exit;
     1135 *
     1136 * Exiting can also be selectively manipulated by using wp_redirect() as a conditional
     1137 * in conjunction with the {@see 'wp_redirect'} and {@see 'wp_redirect_location'} hooks:
     1138 *
     1139 *     if ( wp_redirect( $url ) {
     1140 *         exit;
     1141 *     }
    11291142 *
    11301143 * @since 1.5.1
Note: See TracChangeset for help on using the changeset viewer.