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'.


Top ↑

Source

File: wp-includes/load.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.6.1Introduced.

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.