[
'section' => 'features',
'label' => __( 'Comments', 'ago-disable' ),
'summary' => __( 'Turns off WordPress comments site-wide.', 'ago-disable' ),
'what' => __( 'Removes comment forms, listings, the comments admin menu, and disables comments on existing posts and pages.', 'ago-disable' ),
'why' => __( 'Unmoderated comments are a spam magnet and a security risk.', 'ago-disable' ),
'caveat' => __( 'Existing comments stay in the database.', 'ago-disable' ),
'recommended' => false,
],
'gutenberg' => [
'section' => 'features',
'label' => __( 'Gutenberg block editor', 'ago-disable' ),
'summary' => __( 'Forces the classic editor instead of Gutenberg blocks.', 'ago-disable' ),
'what' => __( 'Replaces the Gutenberg block editor with the classic TinyMCE editor for posts, pages and custom post types.', 'ago-disable' ),
'why' => __( 'Useful if your team prefers classic editor or you use Elementor/Bricks/Divi for all content.', 'ago-disable' ),
'caveat' => __( 'Existing block content still renders; new posts default to classic.', 'ago-disable' ),
'recommended' => false,
],
'search' => [
'section' => 'features',
'label' => __( 'Internal search', 'ago-disable' ),
'summary' => __( 'Turns off the WordPress search (`?s=` returns 404).', 'ago-disable' ),
'what' => __( 'Returns 404 for `?s=` queries and removes the search template from the theme.', 'ago-disable' ),
'why' => __( 'Native search is poor and bots probe it. Skip it if you do not need search, or use a better one.', 'ago-disable' ),
'caveat' => __( 'Make sure no link in your theme points to a search bar.', 'ago-disable' ),
'recommended' => false,
],
'rss_feeds' => [
'section' => 'features',
'label' => __( 'RSS feeds', 'ago-disable' ),
'summary' => __( 'Disables all RSS feeds (main, comments, author, category).', 'ago-disable' ),
'what' => __( 'Returns a "feeds disabled" message instead of XML for any feed URL.', 'ago-disable' ),
'why' => __( 'Non-blog sites have no subscribers. Stops bots from scraping the full feed of your content.', 'ago-disable' ),
'caveat' => __( 'Only enable if you do NOT publish a blog or podcast.', 'ago-disable' ),
'recommended' => false,
],
'attachment_pages' => [
'section' => 'public',
'label' => __( 'Attachment pages', 'ago-disable' ),
'summary' => __( 'Removes the auto page for every uploaded image.', 'ago-disable' ),
'what' => __( 'Disables the dedicated page WordPress generates for each upload (e.g. `/my-image/`).', 'ago-disable' ),
'why' => __( 'These pages are thin (only the image) and hurt SEO. Most sites never link to them on purpose.', 'ago-disable' ),
'caveat' => '',
'recommended' => true,
],
'author_archives' => [
'section' => 'public',
'label' => __( 'Author archives', 'ago-disable' ),
'summary' => __( 'Hides the public author page that exposes usernames.', 'ago-disable' ),
'what' => __( 'Disables the `/author/admin/` style page that lists all posts by an author.', 'ago-disable' ),
'why' => __( 'Author archives leak usernames to attackers and are duplicate thin content.', 'ago-disable' ),
'caveat' => '',
'recommended' => true,
],
'pingbacks' => [
'section' => 'security',
'label' => __( 'Pingbacks & trackbacks', 'ago-disable' ),
'summary' => __( 'Closes a known DDoS amplification vector.', 'ago-disable' ),
'what' => __( 'Disables the pingback and trackback systems blogs used to notify each other about links.', 'ago-disable' ),
'why' => __( 'Pingbacks can be used as a reflection-attack vector and are mostly spam.', 'ago-disable' ),
'caveat' => '',
'recommended' => true,
],
'auto_updates_core' => [
'section' => 'security',
'label' => __( 'Automatic core updates', 'ago-disable' ),
'summary' => __( 'Stops WordPress from auto-updating itself.', 'ago-disable' ),
'what' => __( 'Disables background updates of WordPress core. Manual updates still work.', 'ago-disable' ),
'why' => __( 'Useful when you want to test updates in staging before production.', 'ago-disable' ),
'caveat' => __( 'Strongly NOT recommended on sites without a maintenance schedule. Auto-updates ship same-day security fixes.', 'ago-disable' ),
'recommended' => false,
],
'auto_updates_plugins' => [
'section' => 'security',
'label' => __( 'Automatic plugin updates', 'ago-disable' ),
'summary' => __( 'Stops plugins from updating themselves.', 'ago-disable' ),
'what' => __( 'Disables background updates of plugins.', 'ago-disable' ),
'why' => __( 'Full control of when updates land in production.', 'ago-disable' ),
'caveat' => __( 'Strongly NOT recommended without a maintenance routine.', 'ago-disable' ),
'recommended' => false,
],
'auto_updates_themes' => [
'section' => 'security',
'label' => __( 'Automatic theme updates', 'ago-disable' ),
'summary' => __( 'Stops themes from updating themselves.', 'ago-disable' ),
'what' => __( 'Disables background updates of themes.', 'ago-disable' ),
'why' => __( 'Same reason as core auto-updates.', 'ago-disable' ),
'caveat' => __( 'Strongly NOT recommended without a maintenance routine.', 'ago-disable' ),
'recommended' => false,
],
'admin_bar' => [
'section' => 'admin',
'label' => __( 'Admin bar on frontend', 'ago-disable' ),
'summary' => __( 'Hides the black bar when admins browse the public site.', 'ago-disable' ),
'what' => __( 'Hides the WordPress admin bar at the top of the frontend for logged-in admins.', 'ago-disable' ),
'why' => __( 'Cleaner frontend during QA and screenshots. Admin bar still shows in wp-admin.', 'ago-disable' ),
'caveat' => '',
'recommended' => false,
],
'admin_notices' => [
'section' => 'admin',
'label' => __( 'Plugin nag notices', 'ago-disable' ),
'summary' => __( 'Silences plugin upsells and "rate me" notices for non-admins.', 'ago-disable' ),
'what' => __( 'Hides the yellow/red notices plugins inject at the top of wp-admin for users below administrator.', 'ago-disable' ),
'why' => __( 'Reduces noise for editors and clients.', 'ago-disable' ),
'caveat' => __( 'Administrators still see all notices.', 'ago-disable' ),
'recommended' => true,
],
'wp_news_widget' => [
'section' => 'admin',
'label' => __( 'WordPress news widget', 'ago-disable' ),
'summary' => __( 'Removes the news widget from the dashboard.', 'ago-disable' ),
'what' => __( 'Removes the "WordPress Events and News" widget from the Dashboard screen.', 'ago-disable' ),
'why' => __( 'It clutters the dashboard and fetches from wordpress.org on every load.', 'ago-disable' ),
'caveat' => '',
'recommended' => true,
],
'heartbeat' => [
'section' => 'admin',
'label' => __( 'Heartbeat throttle', 'ago-disable' ),
'summary' => __( 'Reduces server CPU by polling once per minute (instead of 15 seconds).', 'ago-disable' ),
'what' => __( 'Throttles the WordPress Heartbeat AJAX polling (autosave, post-lock) to 60s.', 'ago-disable' ),
'why' => __( 'On shared hosting, heartbeat hammers admin-ajax.php and eats CPU.', 'ago-disable' ),
'caveat' => __( 'Autosave still works, just less frequently.', 'ago-disable' ),
'recommended' => true,
],
];
}
/** Escapes a text and shows the parts written between backticks as code. */
private static function with_code( string $text ): string {
return (string) preg_replace( '/`([^`]+)`/', '$1', esc_html( $text ) );
}
public static function render(): void {
$toggles = self::toggles();
$section_meta = [
'features' => [ __( 'WordPress features', 'ago-disable' ), __( 'Turn off built-in features your site does not use.', 'ago-disable' ) ],
'public' => [ __( 'Public pages and archives', 'ago-disable' ), __( 'Disable thin auto-generated pages that hurt SEO and leak info.', 'ago-disable' ) ],
'security' => [ __( 'Security and updates', 'ago-disable' ), __( 'Close attack surfaces and control updates.', 'ago-disable' ) ],
'admin' => [ __( 'Admin noise', 'ago-disable' ), __( 'Reduce dashboard clutter for editors and clients.', 'ago-disable' ) ],
];
?>
v
[] ] ); ?>
[] ] ); ?>
[] ] ); ?>