is_protected_endpoint хук-фильтрWP 5.2.0

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.

Использование

add_filter( 'is_protected_endpoint', 'wp_kama_is_protected_endpoint_filter' );

/**
 * Function for `is_protected_endpoint` filter-hook.
 * 
 * @param bool $is_protected_endpoint Whether the currently requested endpoint is protected.
 *
 * @return bool
 */
function wp_kama_is_protected_endpoint_filter( $is_protected_endpoint ){

	// filter...
	return $is_protected_endpoint;
}
$is_protected_endpoint(true|false)
Whether the currently requested endpoint is protected.
По умолчанию: false

Список изменений

С версии 5.2.0 Введена.

Где вызывается хук

is_protected_endpoint()
is_protected_endpoint
wp-includes/load.php 1025
return (bool) apply_filters( 'is_protected_endpoint', false );

Где используется хук в WordPress

Использование не найдено.