Changeset 42143 for trunk/src/wp-includes/pluggable.php
- Timestamp:
- 11/10/2017 01:43:07 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/pluggable.php
r41704 r42143 1169 1169 * 1170 1170 * Exiting can also be selectively manipulated by using wp_redirect() as a conditional 1171 * in conjunction with the {@see 'wp_redirect'} and {@see 'wp_redirect_location'} hooks:1171 * in conjunction with the {@see 'wp_redirect'} and {@see 'wp_redirect_location'} filters: 1172 1172 * 1173 1173 * if ( wp_redirect( $url ) ) { … … 1179 1179 * @global bool $is_IIS 1180 1180 * 1181 * @param string $location The path to redirect to.1182 * @param int $status Status code to use.1183 * @return bool False if $location is not provided, true otherwise.1181 * @param string $location The path or URL to redirect to. 1182 * @param int $status Optional. HTTP response status code to use. Default '302' (Moved Temporarily). 1183 * @return bool False if the redirect was cancelled, true otherwise. 1184 1184 */ 1185 1185 function wp_redirect($location, $status = 302) { … … 1191 1191 * @since 2.1.0 1192 1192 * 1193 * @param string $location The path to redirect to.1194 * @param int $status Status code to use.1193 * @param string $location The path or URL to redirect to. 1194 * @param int $status The HTTP response status code to use. 1195 1195 */ 1196 1196 $location = apply_filters( 'wp_redirect', $location, $status ); 1197 1197 1198 1198 /** 1199 * Filters the redirect status code.1199 * Filters the redirect HTTP response status code to use. 1200 1200 * 1201 1201 * @since 2.3.0 1202 1202 * 1203 * @param int $status Status code to use.1204 * @param string $location The path to redirect to.1203 * @param int $status The HTTP response status code to use. 1204 * @param string $location The path or URL to redirect to. 1205 1205 */ 1206 1206 $status = apply_filters( 'wp_redirect_status', $status, $location ); … … 1280 1280 * but only used in a few places. 1281 1281 * 1282 * Note: wp_safe_redirect() does not exit automatically, and should almost always be 1283 * followed by a call to `exit;`: 1284 * 1285 * wp_safe_redirect( $url ); 1286 * exit; 1287 * 1282 1288 * @since 2.3.0 1283 1289 * 1284 * @param string $location The path to redirect to.1285 * @param int $status Status code to use.1290 * @param string $location The path or URL to redirect to. 1291 * @param int $status Optional. HTTP response status code to use. Default '302' (Moved Temporarily). 1286 1292 */ 1287 1293 function wp_safe_redirect($location, $status = 302) { … … 1296 1302 * 1297 1303 * @param string $fallback_url The fallback URL to use by default. 1298 * @param int $status The redirect status.1304 * @param int $status The HTTP response status code to use. 1299 1305 */ 1300 1306 $location = wp_validate_redirect( $location, apply_filters( 'wp_safe_redirect_fallback', admin_url(), $status ) );
Note: See TracChangeset
for help on using the changeset viewer.