diff options
Diffstat (limited to 'plugins/jetpack/modules/sso.php')
-rw-r--r-- | plugins/jetpack/modules/sso.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/jetpack/modules/sso.php b/plugins/jetpack/modules/sso.php index 1d548213..96a60858 100644 --- a/plugins/jetpack/modules/sso.php +++ b/plugins/jetpack/modules/sso.php @@ -1,6 +1,7 @@ <?php use Automattic\Jetpack\Roles; +use Automattic\Jetpack\Status; use Automattic\Jetpack\Tracking; require_once( JETPACK__PLUGIN_DIR . 'modules/sso/class.jetpack-sso-helpers.php' ); @@ -16,7 +17,7 @@ require_once( JETPACK__PLUGIN_DIR . 'modules/sso/class.jetpack-sso-notices.php' * Auto Activate: No * Module Tags: Developers * Feature: Security - * Additional Search Queries: sso, single sign on, login, log in + * Additional Search Queries: sso, single sign on, login, log in, 2fa, two-factor */ class Jetpack_SSO { @@ -148,7 +149,7 @@ class Jetpack_SSO { // Always add the jetpack-sso class so that we can add SSO specific styling even when the SSO form isn't being displayed. $classes[] = 'jetpack-sso'; - if ( ! Jetpack::is_staging_site() ) { + if ( ! ( new Status() )->is_staging_site() ) { /** * Should we show the SSO login form? * @@ -352,7 +353,7 @@ class Jetpack_SSO { $this->handle_login(); $this->display_sso_login_form(); } else { - if ( Jetpack::is_staging_site() ) { + if ( ( new Status() )->is_staging_site() ) { add_filter( 'login_message', array( 'Jetpack_SSO_Notices', 'sso_not_allowed_in_staging' ) ); } else { // Is it wiser to just use wp_redirect than do this runaround to wp_safe_redirect? @@ -401,7 +402,7 @@ class Jetpack_SSO { add_filter( 'login_body_class', array( $this, 'login_body_class' ) ); add_action( 'login_head', array( $this, 'print_inline_admin_css' ) ); - if ( Jetpack::is_staging_site() ) { + if ( ( new Status() )->is_staging_site() ) { add_filter( 'login_message', array( 'Jetpack_SSO_Notices', 'sso_not_allowed_in_staging' ) ); return; } |