What EdminBoost is (in code terms)
EdminBoost is an admin-only WordPress plugin. It stores almost everything in two options:
- edminboost_settings — one big array (Command Center, features, white label)
- edminboost_version — internal version marker
There are no custom database tables, no REST routes owned by the plugin, and no cron jobs.
Entry point
File: edminboost-smart-admin-productivity-tool.php
- Defines constants (version, paths, slug, text domain)
- Loads core classes
- Calls edminboost_run_plugin() which creates EDMINBOOST_Plugin and runs it
Orchestrator
Class: EDMINBOOST_Plugin (includes/class-edminboost-plugin.php)
This class wires WordPress hooks. Think of it as the “switchboard.”
Main pieces it connects:
- EDMINBOOST_I18n — translations on plugins_loaded
- EDMINBOOST_Admin — menus, settings UI, assets, AJAX saves
- EDMINBOOST_Features — optional productivity/security/performance modules
- EDMINBOOST_Command_Center — static helpers (presets, billing catalog, menu discovery)
- EDMINBOOST_Command_Center_Bar — live top bar + drawer (not a “feature module”)
- EDMINBOOST_Menu_Studio — sidebar reorder, hide, custom links
- EDMINBOOST_Theme — visual theme CSS tokens
- EDMINBOOST_White_Label — branding + system status footer
- EDMINBOOST_Pro — plan helpers (premium builds; WordPress.org zip omits includes/pro/)
Where settings live
Class: EDMINBOOST_Settings
- Option name: edminboost_settings
- Settings API group: edminboost_settings_group
- Global on/off: enabled key inside the array
- Command Center: command_center key (top bar, presets, theme, menu_studio, behavior, …)
- Features: features key (managed by EDMINBOOST_Feature_Settings)
- White label: white_label key
Always read through helpers (EDMINBOOST_Settings::get(), EDMINBOOST_Command_Center::get_settings()) instead of raw get_option() in new code.
Two kinds of behavior
- Feature modules (includes/features/)
Small classes extending EDMINBOOST_Feature_Base. Each has an ID, registers hooks only when enabled, and is listed in EDMINBOOST_Features.
Examples: hide notices, disable XML-RPC, heartbeat control.
- Command Center services (includes/, not in the feature registry)
Bigger admin UX systems with their own classes and hooks:
- Top bar builder + live bar + drawer
- Menu Studio
- Theme skins
- White label
Do not register the Command Center bar as a feature module.
Admin UI
PHP partials under admin/partials/
- One page renderer per screen in EDMINBOOST_Admin
- Shared pieces: command center nav, form actions (Save / Reset), feature fields
JavaScript: admin/js/edminboost-admin.js (plugin screens)
CSS: edminboost-admin.css, edminboost-themes.css, edminboost-command-center-bar.css, edminboost-admin-menu.css
How saves work
Most forms use the WordPress Settings API but submit via AJAX:
- Action: edminboost_save_settings
- Handler: EDMINBOOST_Admin::ajax_save_settings()
- Data passes through EDMINBOOST_Settings::sanitize()
CC tab navigation can reload HTML without a full page load (edminboost_load_cc_page).
Folder map (mental model)
edminboost-smart-admin-productivity-tool.php — bootstrap includes/ — PHP classes includes/features/ — feature modules only admin/css, admin/js, admin/partials — admin UI tests/ — PHPUnit + Playwright bin/ — test runners and zip builds uninstall.php — deletes options on plugin delete
DEVELOPERS — HOOKS AND FILTERS (hooks-and-filters.md)
Why hooks exist
EdminBoost exposes a small set of WordPress filters and actions so you can extend behavior without editing core plugin files. Prefer filters over forks.
Feature registry
edminboost_feature_classes (filter)
- When: while features are loading
- Input: array of PHP class names (strings)
- Use: add your own class name after you require your file
edminboost_features_loaded (action)
- When: after feature objects are created
- Args: array of EDMINBOOST_Feature_Base instances keyed by feature ID
- Use: inspect or interact with registered features
edminboost_is_feature_enabled (filter)
- When: checking if a feature should run
- Args: default bool, feature ID, full features array
- Use: force a feature on/off for tests or custom rules
Settings
edminboost_settings_defaults (filter)
- Adjust default array before first save
edminboost_settings (filter)
- Adjust settings after load/merge (runtime reads)
edminboost_sanitize_settings (filter)
- Last pass on sanitized array; receives sanitized settings and raw input
Billing / Pro (premium builds and tests)
edminboost_is_pro_active (filter)
- Override whether Pro features are treated as active
edminboost_active_billing_plan (filter)
- Override plan ID: free, pro, or agency
edminboost_upgrade_url (filter)
- Change external pricing URL (default EDMINBOOST_UPGRADE_URL)
WordPress hooks the plugin uses (extension points)
You can use normal WordPress priorities to run before/after EdminBoost:
- admin_menu — EdminBoost registers pages; Menu Studio reorders at priority 998
- admin_bar_menu — Command Center bar at 80; declutter at 999
- admin_enqueue_scripts — theme, admin assets, feature CSS
Do not rely on undocumented private methods; use the filters above or standard WP hooks.
AJAX actions (admin only, capability + nonce)
- edminboost_save_settings
- edminboost_load_cc_page
- edminboost_export_settings
- edminboost_import_settings
- edminboost_cc_drawer_preview (Top Bar drawer preview)
These are not public REST APIs. Call them only from authenticated admin context with correct nonces.
Example: register an extra feature class
add_filter( ‘edminboost_feature_classes’, function ( $classes ) { $classes[] = ‘EDMINBOOST_My_Custom_Feature’; return $classes; } );
Load your class file on plugins_loaded or before the filter runs.
Example: tweak settings on read
add_filter( ‘edminboost_settings’, function ( $settings ) { // Careful: affects entire plugin behavior. return $settings; } );
Example: pretend Pro is active in PHPUnit
add_filter( ‘edminboost_is_pro_active’, ‘__return_true’ );
Remove or reset filters between tests.
