Edit File by line
/home/zeestwma/richards.../wp-inclu...
File: load.php
[2000] Fix | Delete
return false;
[2001] Fix | Delete
}
[2002] Fix | Delete
[2003] Fix | Delete
/**
[2004] Fix | Delete
* Checks if this site is protected by HTTP Basic Auth.
[2005] Fix | Delete
*
[2006] Fix | Delete
* At the moment, this merely checks for the present of Basic Auth credentials. Therefore, calling
[2007] Fix | Delete
* this function with a context different from the current context may give inaccurate results.
[2008] Fix | Delete
* In a future release, this evaluation may be made more robust.
[2009] Fix | Delete
*
[2010] Fix | Delete
* Currently, this is only used by Application Passwords to prevent a conflict since it also utilizes
[2011] Fix | Delete
* Basic Auth.
[2012] Fix | Delete
*
[2013] Fix | Delete
* @since 5.6.1
[2014] Fix | Delete
*
[2015] Fix | Delete
* @global string $pagenow The filename of the current screen.
[2016] Fix | Delete
*
[2017] Fix | Delete
* @param string $context The context to check for protection. Accepts 'login', 'admin', and 'front'.
[2018] Fix | Delete
* Defaults to the current context.
[2019] Fix | Delete
* @return bool Whether the site is protected by Basic Auth.
[2020] Fix | Delete
*/
[2021] Fix | Delete
function wp_is_site_protected_by_basic_auth( $context = '' ) {
[2022] Fix | Delete
global $pagenow;
[2023] Fix | Delete
[2024] Fix | Delete
if ( ! $context ) {
[2025] Fix | Delete
if ( 'wp-login.php' === $pagenow ) {
[2026] Fix | Delete
$context = 'login';
[2027] Fix | Delete
} elseif ( is_admin() ) {
[2028] Fix | Delete
$context = 'admin';
[2029] Fix | Delete
} else {
[2030] Fix | Delete
$context = 'front';
[2031] Fix | Delete
}
[2032] Fix | Delete
}
[2033] Fix | Delete
[2034] Fix | Delete
$is_protected = ! empty( $_SERVER['PHP_AUTH_USER'] ) || ! empty( $_SERVER['PHP_AUTH_PW'] );
[2035] Fix | Delete
[2036] Fix | Delete
/**
[2037] Fix | Delete
* Filters whether a site is protected by HTTP Basic Auth.
[2038] Fix | Delete
*
[2039] Fix | Delete
* @since 5.6.1
[2040] Fix | Delete
*
[2041] Fix | Delete
* @param bool $is_protected Whether the site is protected by Basic Auth.
[2042] Fix | Delete
* @param string $context The context to check for protection. One of 'login', 'admin', or 'front'.
[2043] Fix | Delete
*/
[2044] Fix | Delete
return apply_filters( 'wp_is_site_protected_by_basic_auth', $is_protected, $context );
[2045] Fix | Delete
}
[2046] Fix | Delete
[2047] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function