is_protected_endpoint

过滤钩子


apply_filters( 'is_protected_endpoint', false )
参数
  • (bool)
    $is_protected_endpoint
    Whether the currently requested endpoint is protected.
    Default false.
    Required:
定义位置
  • wp-includes/load.php
    , line 1025
引入
5.2.0
弃用

过滤当前请求是否是针对受保护的端点。

这个过滤器只有在请求的端点还没有被WordPress核心保护的情况下才会被触发。因此,它只允许在管理后台、登录页面和受保护的Ajax动作之外提供更多受保护的端点。

return (bool) apply_filters( 'is_protected_endpoint', false );