'; echo 'WebsiteBox: Initial setup completed with errors. '; echo 'Some plugins or themes may not have installed correctly. '; echo 'To retry, run: docker compose restart wordpress'; echo '

'; return; } echo '

'; echo 'WebsiteBox: Initial setup is still in progress. '; echo 'The container may still be installing themes and plugins. Please wait a moment and refresh this page.'; echo '

'; }); // Dashboard widget add_action('wp_dashboard_setup', function () { wp_add_dashboard_widget( 'websitebox_status', 'WebsiteBox Status', 'websitebox_dashboard_widget' ); }); function websitebox_dashboard_widget() { $complete = file_exists(ABSPATH . '.websitebox-setup-complete'); $partial = file_exists(ABSPATH . '.websitebox-setup-partial'); echo ''; // Setup status echo ''; // Age Gate status if (is_plugin_active('age-gate/age-gate.php')) { $min_age = get_option('age_gate_min_age', '18'); $restrict_all = get_option('age_gate_restrict_all', '0'); echo ''; } else { echo ''; } // Backup status if (is_plugin_active('updraftplus/updraftplus.php')) { $last_backup = get_option('updraft_last_backup', []); echo ''; } echo '
Setup Status'; if ($complete) { echo '✓ Complete'; } elseif ($partial) { echo '⚠ Partial — retry with: docker compose restart wordpress'; } else { echo '⌛ In progress...'; } echo '
Age Gate'; echo $restrict_all ? "Enabled (minimum age: {$min_age})" : 'Installed but not restricting all content'; echo '
Age GateNot active
Backups'; if (!empty($last_backup['backup_time'])) { echo 'Last backup: ' . date('Y-m-d H:i', $last_backup['backup_time']); } else { echo 'No backups yet'; } echo '
'; }