wp_is_site_protected_by_basic_auth WordPress Filter Hook
The wp_is_site_protected_by_basic_auth hook allows you to determine if a site is protected by Basic Authentication. This can be useful for checking if a user is logged in, or for displaying a message to users who are not logged in.
apply_filters( 'wp_is_site_protected_by_basic_auth', bool $is_protected , string $context ) #
Filters whether a site is protected by HTTP Basic Auth.
Parameters
- $is_protected
(bool)Whether the site is protected by Basic Auth.
- $context
(string)The context to check for protection. One of 'login', 'admin', or 'front'.
Source
File: wp-includes/load.php
Changelog
Version | Description |
---|---|
5.6.1 | Introduced. |