IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
1285 | 1285 | * wp_safe_redirect( $url ); |
1286 | 1286 | * exit; |
1287 | 1287 | * |
| 1288 | * Exiting can also be selectively manipulated by using wp_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 Added passing the return from wp_redirect 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) { |
1294 | 1303 | |
… |
… |
|
1305 | 1314 | */ |
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; |
1311 | 1320 | |