'capability_here' * To add a page to the network admin (wp-admin/network), use: 'network_admin_menu' => 'capability_here' * To add a page to the user (wp-admin/user) admin, use: 'user_admin_menu' => 'capability_here' * * @since 2.0.24 * @var array */ protected $supported_panels = [ 'network_admin_menu' => 'manage_network', ]; /** * Overrides original construct method. * * We need to override the construct method to make sure * we make the necessary changes to the Wizard page when it's * being run for the first time. * * @since 2.0.24 * @return void */ public function __construct() { parent::__construct(); } /** * Returns the logo for the wizard. * * @since 2.0.24 * @return string */ public function get_logo() { return wu_get_asset('logo.webp', 'img'); } /** * Returns the title of the page. * * @since 2.0.24 * @return string Title of the page. */ public function get_title(): string { return sprintf(__('Migration', 'wp-multisite-waas')); } /** * Returns the title of menu for this page. * * @since 2.0.24 * @return string Menu label of the page. */ public function get_menu_title() { return WP_Ultimo()->is_loaded() ? __('WP Multisite WaaS Migration Alert', 'wp-multisite-waas') : __('WP Multisite WaaS', 'wp-multisite-waas'); } /** * Returns the sections for this Wizard. * * @since 2.0.24 * @return array */ public function get_sections() { return [ 'alert' => [ 'title' => __('Alert!', 'wp-multisite-waas'), 'view' => [$this, 'section_alert'], 'handler' => [$this, 'handle_proceed'], ], ]; } /** * Displays the content of the final section. * * @since 2.0.24 * @return void */ public function section_alert(): void { wu_get_template( 'wizards/setup/alert', [ 'screen' => get_current_screen(), 'page' => $this, ] ); } /** * Handles the proceed action. * * @since 2.0.24 * @return void */ public function handle_proceed(): void { delete_network_option(null, 'wu_setup_finished'); delete_network_option(null, 'wu_is_migration_done'); wp_redirect(wu_network_admin_url('wp-ultimo-setup')); exit; } }