is_protected_endpoint

过滤钩子
apply_filters( 'is_protected_endpoint', false )
参数
  • (bool) $is_protected_endpoint Whether the currently requested endpoint is protected. Default false.
    Required:
定义位置
相关勾子
is_protected_metaoembed_endpoint_urlwp_is_site_protected_by_basic_authwp_protected_ajax_actionspre_schedule_event
相关方法
is_protected_endpointis_protected_metaadd_rewrite_endpointis_protected_ajax_action_deprecated_argumentget_oembed_endpoint_url
引入
5.2.0
弃用
-

is_protected_endpoint – 这个函数返回一个布尔值,表示当前端点是否受到保护。一个受保护的端点是一个需要认证才能访问其内容的端点: 这个函数不是一个钩子或动作,但它是一个在WordPress代码中直接调用的函数。

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

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

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

常见问题

FAQs
查看更多 >
闪电侠

(工作日 10:00 - 18:30 为您服务)

2025-12-05 19:32:59

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: