wp_redirect

过滤钩子


apply_filters( 'wp_redirect', $location, $status )
参数
  • (string)
    $location
    The path or URL to redirect to.
    Required:
  • (int)
    $status
    The HTTP response status code to use.
    Required:
定义位置
  • wp-includes/pluggable.php
    , line 1377
引入
2.1.0
弃用

过滤重定向的位置。

$location = apply_filters( 'wp_redirect', $location, $status );