'opt-module-utility', 'name' => __('Utility', 'aio-tools'), 'desc' => __('Maintenance, Duplicate Post & Tweaks', 'aio-tools')],
['id' => 'opt-module-security', 'name' => __('Security Pro', 'aio-tools'), 'desc' => __('2FA, Limit Login, WAF & Hardening', 'aio-tools')],
['id' => 'opt-module-optimizer', 'name' => __('SEO Pro', 'aio-tools'), 'desc' => __('Meta, OG, Schema & XML Sitemap', 'aio-tools')],
['id' => 'opt-module-performance', 'name' => __('Speed & Optimize', 'aio-tools'), 'desc' => __('Page Cache, WebP, Minify & Lazy Load', 'aio-tools')],
['id' => 'opt-module-db-cleaner', 'name' => __('Database Cleaner', 'aio-tools'), 'desc' => __('Clean revisions, spam & transients', 'aio-tools')],
['id' => 'opt-module-contact', 'name' => __('Contact Express', 'aio-tools'), 'desc' => __('Floating multi-channel buttons', 'aio-tools')],
['id' => 'opt-module-messenger', 'name' => __('Messenger', 'aio-tools'), 'desc' => __('Live Chat, Telegram & Larksuite', 'aio-tools')],
['id' => 'opt-module-login-ui', 'name' => __('Login UI', 'aio-tools'), 'desc' => __('Custom wp-login.php branding', 'aio-tools')],
['id' => 'opt-module-social-login', 'name' => __('Social Login', 'aio-tools'), 'desc' => __('Google & Facebook OAuth 2.0', 'aio-tools')],
['id' => 'opt-module-smtp', 'name' => __('SMTP Settings', 'aio-tools'), 'desc' => __('SMTP & OAuth 2.0 email delivery', 'aio-tools')],
['id' => 'opt-module-header-footer', 'name' => __('Header & Footer', 'aio-tools'), 'desc' => __('Custom head & footer scripts', 'aio-tools')],
];
if ( class_exists('WooCommerce') ) {
$modules[] = ['id' => 'opt-module-woocommerce', 'name' => __('WooCommerce', 'aio-tools'), 'desc' => __('Side Cart, Quick Buy & Checkout tools', 'aio-tools')];
}
foreach ($modules as $mod) {
// By default, modules are considered ENABLED if the setting is not strictly false/empty.
// We'll set a default of 'checked' unless explicitly turned off.
$is_checked = !isset($settings[$mod['id']]) || !empty($settings[$mod['id']]);
?>