two_factor_is_active() ) { return self::NOT_DETECTED; } // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- Documented public integration hook supplied by the official Two Factor provider. $providers = apply_filters( 'two_factor_enabled_providers_for_user', array(), $user_id ); if ( ! is_array( $providers ) ) { return self::NOT_DETECTED; } return empty( $providers ) ? self::NOT_ENABLED : self::ENABLED; } /** @return bool */ private function two_factor_is_active() { if ( ! function_exists( 'is_plugin_active' ) ) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } return is_plugin_active( 'two-factor/two-factor.php' ); } }