get( Requirement_Checker::class ); $is_admin = current_user_can( 'manage_options' ); if ( $requirements->are_satisfied() ) { /** @var Migrator $migrator */ $migrator = $twofas_container->get( Migrator::class ); if ( $is_admin && twofas_prime_plugin_active() && ! $migrator->is_migrated( 'Migration_2021_05_01_Migrate_Users' ) ) { add_action( 'admin_notices', function () { $message = __( 'Migrate all users from 2FAS Classic to 2FAS Prime plugin! You can do that in 2FAS Classic dashboard, by clicking green "Migrate" button.', '2fas' ); echo '

' . $message . '

'; } ); } if ( $is_admin ) { add_action( 'admin_notices', function () { echo '

2FAS Classic plugin is obsolete!
On the 1st of December 2021, we will turn off push notifications but logging with 2FA tokens will work.
From this day on 2FAS Classic plugin will not be supported anymore.
We recommend you to download the 2FAS Prime plugin and then migrate all your settings and tokens from 2FAS Classic to the 2FAS Prime plugin.

'; } ); } /** @var Listener_Provider $listener */ $listener = $twofas_container->get( Listener_Provider::class ); $listener->listen(); /** @var Plugin $plugin */ $plugin = $twofas_container->get( Plugin::class ); $plugin->run(); } else { if ( ! $is_admin ) { return; } foreach ( $requirements->get_not_satisfied() as $message ) { add_action( 'admin_notices', function () use ( $message ) { echo '

' . $message . '

'; } ); } }