0; $original_present = Robotstxt_Mlp2_Mlp5_Table_Preparer::has_original_tables(); $mlp5_active = $mlp5->is_active(); /* * Once MLP5 is active it creates its own mlp_* tables, which match the * same pattern used to detect leftover MLP2 originals. Suppress that * false positive: if MLP5 is active the rename step was already done. */ if ( $mlp5_active ) { $original_present = false; } /* * After a successful cleanup (Step 6) the backup tables are dropped, * so $tables_renamed would be false even though everything is fine. * Treat the wizard-done state as equivalent to "tables were renamed". */ $wizard_done = Robotstxt_Mlp2_Mlp5_Wizard_State::is_step_complete( Robotstxt_Mlp2_Mlp5_Wizard_State::TOTAL_STEPS ); if ( $wizard_done ) { $tables_renamed = true; } if ( ! $tables_renamed ) { if ( $original_present ) { $issues[] = __( 'MLP2 tables have not been renamed yet. Go back to the plugin status page and click "Rename MLP2 tables".', 'robotstxt-mlp2-mlp5' ); } else { $issues[] = __( 'No MLP2 tables found (neither original nor backup). Restore your database from a backup before proceeding.', 'robotstxt-mlp2-mlp5' ); } } if ( ! $mlp5_active ) { $issues[] = __( 'MultilingualPress 5 is not network-active. Activate it before running the migration.', 'robotstxt-mlp2-mlp5' ); } return array( 'mlp2_tables_renamed' => $tables_renamed, 'mlp2_original_present' => $original_present, 'mlp2_backup_tables' => $backup_tables, 'mlp2_active' => $mlp2->is_active(), 'mlp2_version' => $mlp2->get_version(), 'mlp5_active' => $mlp5_active, 'mlp5_version' => $mlp5->get_version(), 'can_proceed' => $tables_renamed && $mlp5_active, 'blocking_issues' => $issues, ); } /** * Render the Step 1 UI. */ public static function render(): void { $checks = self::run(); $can_proceed = $checks['can_proceed']; ?>
| ✓ ✗ ✗ | |
| ⚠ ✓ | |
| ✓ ✗ |