Guide

Hooks

Mantle is designed to be extended through filters rather than modified. This page lists the actions and filters that make up the plugin's extension surface, verified by reading do_action() and apply_filters() calls in the source.

Actions

Reference

Actions

Fired by Mantle during boot and module lifecycle.
4 fields
mantle_register_module string
The registration point for modules. Receives the loader class name. Hook this and call Module_Loader::register(). Re-fires when a module’s enabled state changes.
mantle_modules_initialized string
Fires after all modules are initialised. Receives the array of module instances.
mantle_activated string
Fires once on the first admin request after activation, at init priority 99. Use this for one-time setup work.
mantle_done string
Fires at the end of Bootstrap::run(), once controllers are registered and CLI commands are loaded.

Filters

Modules

Reference

Module filters

1 field
mantle_core_modules array
Modify the registered module array before initialisation. Applied at the end of register_core_modules().

Settings

Reference

Settings filters

3 fields
mantle_settings_schema array
The schema assembly point. Every module hooks this through Abstract_Module::register_settings_filter() at priority 10.
mantle_default_settings array
Filter the defaults generated from the main settings schema.
mantle_default_setup_settings array
Filter the defaults generated from the setup schema.

Capabilities

Reference

Capability filters

3 fields
mantle_core_capabilities array
Modify the core capability definitions before they are merged with module capabilities.
mantle_all_capabilities array
Modify the fully merged capability set. Modules also use this to contribute their own capabilities when disabled.
mantle_module_{module_id}_capabilities array
Modify one module’s capabilities. Receives the capability array and the module ID. Substitute the module ID, for example mantle_module_monitoring_capabilities.

JavaScript filters

The admin interface uses @wordpress/hooks, so these are applied in the browser rather than in PHP.

Reference

JavaScript filters

Applied with applyFilters() from @wordpress/hooks.
2 fields
mantle.navigation_tabs array
Add, remove, or modify top-level admin navigation tabs. Applied in getTabs() in src/constants/routes.js. Receives and must return an array of tab objects.
mantle.settings_tabs array
Add subtabs inside the Settings view. Applied in src/modules/Settings/index.js. Receives the tabs array plus a second argument of { settings, modules }. Each tab needs name, title, priority, and className.
javascript src/modules/Reports/register.js
import { addFilter } from '@wordpress/hooks';import { __ } from '@wordpress/i18n';import Reports from './Reports';const slug = 'reports';addFilter( 'mantle.navigation_tabs', `mantle/${ slug }`, ( tabs ) => {	if ( tabs.some( ( tab ) => tab.id === slug ) ) {		return tabs;	}	return [		...tabs,		{			id: slug,			path: `/${ slug }`,			title: __( 'Reports', 'mantle' ),			component: Reports,			order: 60,			requiredCapability: 'mantle_view_reports',		},	];} );
Follows the shape used in src/modules/*/register.js, with an added idempotency guard.

The bundled modules in src/modules/*/register.js append unconditionally with return [ ...tabs, newTab ];. The guard above is a defensive addition, not something core does.

Module-specific hooks

Individual modules define further hooks in their own namespaces. These are the prefixes to search for:

PrefixModule
mantle_convergence_cache_*Convergence Cache
mantle_maintenance_*, mantle_before_maintenance_modeMaintenance
mantle_plugin_sync_*, mantle_theme_sync_*, mantle_sync_pluginsPlugin Sync
mantle_sso_*, mantle_allow_ssoSSO
mantle_chat_*, mantle_save_chat_preferencesCommunication
mantle_allowed_redirect_hostsSecurity
mantle_linchpin_license_catalogLinchpin Licenses
mantle_dismiss_welcome_noticeWelcome
Find every hook in the source bash
rg -o "(?:do_action|apply_filters)\(\s*'([^']+)'" -r '$1' includes/ --no-filename | sort -u
emoji_svg_url
login_redirect
mantle_action_
mantle_activated
mantle_admin_data
mantle_admin_preload_paths
mantle_admin_strings
mantle_ai_chatbot_max_tokens
mantle_all_capabilities
mantle_allowed_waf_providers
mantle_core_capabilities
mantle_core_modules
mantle_done
mantle_hosting_providers
mantle_modules_initialized
mantle_power_admin_capabilities
mantle_register_module
...

The list includes WordPress core hooks that Mantle filters, such as emoji_svg_url and login_redirect, alongside its own. It also surfaces hooks not documented above — mantle_admin_data, mantle_admin_preload_paths, mantle_admin_strings, mantle_power_admin_capabilities, mantle_hosting_providers, and mantle_allowed_waf_providers among them — plus roughly twenty mantle_ai_* filters that tune AI behaviour. Treat the enumeration as authoritative over this page.

See also

Was this helpful?