Filter hook 'is_protected_endpoint'

in WP Core File wp-includes/load.php at line 1204

View Source

is_protected_endpoint

Filter Hook
Description
Filters whether the current request is against a protected endpoint. 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.

Hook Information

File Location wp-includes/load.php View on GitHub
Hook Type Filter
Line Number 1204

Hook Parameters

Type Name Description
bool $is_protected_endpoint Whether the currently requested endpoint is protected. Default false.

Usage Examples

Basic Usage
<?php
// Hook into is_protected_endpoint
add_filter('is_protected_endpoint', 'my_custom_filter', 10, 1);

function my_custom_filter($is_protected_endpoint) {
    // Your custom filtering logic here
    return $is_protected_endpoint;
}

Source Code Context

wp-includes/load.php:1204 - How this hook is used in WordPress core
<?php
1199  	 * @since 5.2.0
1200  	 *
1201  	 * @param bool $is_protected_endpoint Whether the currently requested endpoint is protected.
1202  	 *                                    Default false.
1203  	 */
1204  	return (bool) apply_filters( 'is_protected_endpoint', false );
1205  }
1206  
1207  /**
1208   * Determines whether we are currently handling an Ajax action that should be protected against WSODs.
1209   *

PHP Documentation

<?php
/**
	 * Filters whether the current request is against a protected endpoint.
	 *
	 * 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.
	 *
	 * @since 5.2.0
	 *
	 * @param bool $is_protected_endpoint Whether the currently requested endpoint is protected.
	 *                                    Default false.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-includes/load.php
Related Hooks

Related hooks will be displayed here in future updates.