Guide

Capabilities

Mantle defines its own capabilities rather than reusing manage_options, so a client administrator can be given a narrower slice of the plugin than a Linchpin engineer. Capabilities are grouped, assigned to roles by default, and synchronised into WordPress roles on demand.

Every label, description, group, and role list below was read from a running installation, not from the source definitions — see How the list is assembled for why those can differ.

The power_admin role

Mantle introduces a power_admin role that holds every Mantle capability. administrator receives a read-mostly subset, and a few cache-clearing capabilities extend to editor and shop_manager. The intent is that Linchpin staff hold power_admin while the client's own administrators keep administrator.

Core capabilities

Defined in Mantle\Model\Users\Capabilities::get_core_capabilities() and not owned by any module.

Reference

Core capabilities

Filterable via mantle_core_capabilities. The default column lists the roles granted the capability.
4 fields
mantle_manage_options string
Manage Mantle Options. Allows users to manage and edit Mantle plugin settings and options. Group: manage.
mantle_view_options string
View Mantle Options. Allows users to view Mantle plugin settings and options. Group: view.
mantle_manage_users string
Manage Mantle Users. Allows users to manage Mantle user capabilities and view capability sync status. Group: manage.
mantle_remote_register string
Remote Register. Core describes this as registering the plugin and authenticating during initial setup, but the dashboard module redefines the key and its description wins at runtime. Group: manage.

Module capabilities

Contributed by modules via register_capabilities().

Reference

Dashboard module

Owned by the dashboard module, which is type core and always enabled. The first two gate the built-in admin tabs through the requiredCapability property in src/constants/routes.js.
3 fields
mantle_edit_settings string
Manage Settings. Manage general Mantle settings. Group: manage. Gates the Settings tab.
mantle_view_dashboard string
View Dashboard. Access to the Mantle dashboard. Group: view. Gates the Dashboard tab.
mantle_remote_register string
Remote Register. Ability to remotely register mantle on behalf of the client. Group: manage. Redefines the core capability of the same name, and this definition is the one that takes effect.
Reference

Cache

Owned by the convergence_cache module.
6 fields
mantle_edit_cache string
Edit Cache Settings. Ability to edit cache settings and configuration. Group: manage.
mantle_view_cache string
View Cache. Access to cache management section. Group: view.
mantle_clear_cache_all string
Clear Full Site Cache. Ability to clear the full site cache. Group: action.
mantle_clear_cache_edge string
Clear Edge Cache. Ability to clear the edge cache. Group: action.
mantle_clear_cache_object string
Clear Object Cache. Ability to clear the object cache. Group: action.
mantle_clear_cache_page string
Clear Single Page Cache. Ability to clear a single page cache. Group: action.
Reference

Monitoring

Owned by the monitoring module. StatusCake is the backing service.
4 fields
mantle_view_monitoring string
View Monitoring. Access to monitoring/StatusCake section. Group: view.
mantle_view_monitoring_items string
Request StatusCake Items. Request items from StatusCake API. Group: monitoring.
mantle_edit_monitoring_items string
Edit StatusCake Items. Edit StatusCake monitoring items. Group: monitoring.
mantle_delete_monitoring_items string
Delete StatusCake Items. Delete StatusCake monitoring items. Group: monitoring.
Reference

Communication and AI

Owned by the communication and ai_chatbot modules.
5 fields
mantle_manage_communication string
Manage Communication. Manage communication details and information. Group: manage.
mantle_view_communication string
View Communication. View communication details and information. Group: view.
mantle_access_client_chat string
Access Client Chat. Access the client chat widget for team communication. Group: view.
mantle_access_slack_chat string
Access Slack Chat. Access the Slack chat widget for team communication. Group: view.
mantle_access_chatbot string
Access Chatbot. Access to the AI chatbot feature. Group: feature.
Reference

Plugin sync and snippets

Owned by the plugin_sync and site_code_snippets modules. The two highlighted below are the most privileged capabilities Mantle defines.
5 fields
mantle_execute_plugin_commands string
Execute Plugin Commands. Execute remote plugin management commands. Group: manage. Drives the /plugins/command routes.
mantle_manage_site_code_snippets string
Manage Site Code Snippets. Manage site code snippets. Group: manage. Permits arbitrary header, body, and footer script injection.
mantle_manage_plugin_sync string
Manage Plugin Sync. Manage plugin sync settings and view sync status. Group: manage.
mantle_view_plugin_action_log string
View Plugin Action Log. View audit log of plugin management actions. Group: view.
mantle_view_site_code_snippets string
View Site Code Snippets. View site code snippets. Group: view.
Reference

Clients, security, optimizations, users

Owned by the client_info, security, optimizations, and user_management modules.
4 fields
mantle_manage_clients string
Manage Clients. Manage client details and information. Group: manage.
mantle_manage_security string
Manage Security. Manage security. Group: manage.
mantle_manage_optimizations string
Manage Optimizations. Manage optimizations. Group: manage.
manage_mantle_users string
Manage Users. Manage user roles and permissions. Group: manage. Note the reversed word order compared with the core mantle_manage_users.

How the list is assembled

get_all_capabilities() merges core capabilities with module capabilities through two complementary paths.

Flow

Capability collection

5 relationships
The loop covers enabled modules and the per-module filter covers disabled ones, so the result spans every module regardless of state.

The loop inside get_all_capabilities() skips modules where is_enabled() returns false. Separately, each module registers a mantle_all_capabilities filter whose callback returns early when the module is enabled and adds its capabilities when it is not. The two paths are complementary, so the returned list covers all sixteen modules either way — which is why a reference installation with twelve modules disabled still reports thirty capabilities.

Two consequences follow from the merge order:

Enumerate capabilities on your own site

List every registered capability bash
wp eval '$c = new \Mantle\Model\Users\Capabilities(); foreach ( $c->get_all_capabilities() as $k => $v ) { printf( "%-38s %-11s %s" . PHP_EOL, $k, $v["group"] ?? "-", implode( "|", $v["roles"] ?? [] ) ); }'
manage_mantle_users                    manage      power_admin
mantle_access_chatbot                  feature     power_admin|administrator|editor
mantle_clear_cache_all                 action      power_admin|administrator|editor|shop_manager
mantle_edit_settings                   manage      power_admin
...

Synchronising and resetting

RouteMethodsEffect
/mantle/v1/capabilitiesGETReturn capability metadata
/mantle/v1/capabilities/checkGETReport sync status
/mantle/v1/capabilities/syncPOSTWrite capabilities onto roles
/mantle/v1/capabilities/resetPOSTRemove and re-apply defaults

Sync state is tracked in two options: mantle_capabilities_last_synced records the capability set last written, and mantle_capabilities_version records the plugin version that wrote it.

Extending capabilities

functions.php
add_filter(	'mantle_core_capabilities',	function ( array $capabilities ): array {		$capabilities['mantle_view_reports'] = [			'label'       => __( 'View Reports', 'my-plugin' ),			'description' => __( 'Allows users to view the reports tab', 'my-plugin' ),			'group'       => 'view',			'roles'       => [ 'power_admin', 'administrator' ],		];		return $capabilities;	});
Each capability definition needs label, description, group, and roles.

A capability definition needs four keys: label, description, group, and roles. After changing definitions, POST to /mantle/v1/capabilities/sync so the new set is written onto roles.

Was this helpful?