Changeset 42206 for trunk/src/wp-includes/pluggable.php
- Timestamp:
- 11/20/2017 08:23:50 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/pluggable.php
r42143 r42206 1286 1286 * exit; 1287 1287 * 1288 * Exiting can also be selectively manipulated by using wp_safe_redirect() as a conditional 1289 * in conjunction with the {@see 'wp_redirect'} and {@see 'wp_redirect_location'} filters: 1290 * 1291 * if ( wp_safe_redirect( $url ) ) { 1292 * exit; 1293 * } 1294 * 1288 1295 * @since 2.3.0 1296 * @since 5.0.0 The return value from wp_redirect() is now passed on. 1289 1297 * 1290 1298 * @param string $location The path or URL to redirect to. 1291 1299 * @param int $status Optional. HTTP response status code to use. Default '302' (Moved Temporarily). 1300 * @return bool $redirect False if the redirect was cancelled, true otherwise. 1292 1301 */ 1293 1302 function wp_safe_redirect($location, $status = 302) { … … 1306 1315 $location = wp_validate_redirect( $location, apply_filters( 'wp_safe_redirect_fallback', admin_url(), $status ) ); 1307 1316 1308 wp_redirect($location, $status);1317 return wp_redirect( $location, $status ); 1309 1318 } 1310 1319 endif;
Note: See TracChangeset
for help on using the changeset viewer.