is_protected_endpoint WordPress Filter Hook

The is_protected_endpoint Wordpress hook allows developers to protect certain API endpoints from being accessed by unauthorized users. This is useful for ensuring that sensitive data is not exposed to potential attackers. By using this hook, developers can ensure that only authorized users can access the protected API endpoints.

apply_filters( 'is_protected_endpoint', bool $is_protected_endpoint ) #

Filters whether the current request is against a protected endpoint.


Description

This filter is only fired when an endpoint is requested which is not already protected by WordPress core. As such, it exclusively allows providing further protected endpoints in addition to the admin backend, login pages and protected Ajax actions.


Top ↑

Parameters

$is_protected_endpoint

(bool)Whether the currently requested endpoint is protected. Default false.


Top ↑

Source

File: wp-includes/load.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.2.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.