wp_is_site_protected_by_basic_auth хук-фильтрWP 5.6.1

Filters whether a site is protected by HTTP Basic Auth.

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

add_filter( 'wp_is_site_protected_by_basic_auth', 'wp_kama_is_site_protected_by_basic_auth_filter', 10, 2 );

/**
 * Function for `wp_is_site_protected_by_basic_auth` filter-hook.
 * 
 * @param bool   $is_protected Whether the site is protected by Basic Auth.
 * @param string $context      The context to check for protection. One of 'login', 'admin', or 'front'.
 *
 * @return bool
 */
function wp_kama_is_site_protected_by_basic_auth_filter( $is_protected, $context ){

	// filter...
	return $is_protected;
}
$is_protected(true|false)
Whether the site is protected by Basic Auth.
$context(строка)
The context to check for protection. One of 'login', 'admin', or 'front'.

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

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

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

wp_is_site_protected_by_basic_auth()
wp_is_site_protected_by_basic_auth
wp-includes/load.php 1985
return apply_filters( 'wp_is_site_protected_by_basic_auth', $is_protected, $context );

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

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