wp_is_site_protected_by_basic_auth


wp_is_site_protected_by_basic_auth ( $context = '' )

Parameters:
  • (string) context The context to check for protection. Accepts 'login', 'admin', and 'front'. Defaults to the current context.
Returns:
  • (bool) Whether the site is protected by Basic Auth.
Defined at:

Description

Checks if this site is protected by HTTP Basic Auth.At the moment, this merely checks for the present of Basic Auth credentials. Therefore, calling this function with a context different from the current context may give inaccurate results. In a future release, this evaluation may be made more robust. Currently, this is only used by Application Passwords to prevent a conflict since it also utilizes Basic Auth.

Related Functions

is_protected_ajax_action, wp_is_site_url_using_https, _wp_die_process_input, is_protected_endpoint, is_protected_meta

Top Google Results

User discussions

wpseek mobile