AAM Hooks
AAM emits these aam_ hooks in the core plugin and Complete Package. Each hook has its own page with its purpose, callback arguments, and an explained PHP example. A filter returns its first argument (possibly changed); an action ignores its return value. Register callbacks before the relevant request or service runs, and set accepted_args to the number of arguments your callback uses.
Access decisions
| Hook | Purpose |
|---|---|
aam_ability_is_denied_filter |
Override the final deny result for a registered ability. |
aam_admin_toolbar_is_denied_filter |
Override a toolbar node deny result. |
aam_api_route_is_denied_filter |
Override a REST route deny result. |
aam_backend_menu_is_denied_filter |
Override a backend menu deny result. |
aam_capability_is_allowed_filter |
Override a capability grant decision. |
aam_is_capability_filter |
Decide whether a slug is treated as a capability. |
aam_mcp_prompt_is_denied_filter |
Override an MCP prompt deny result. |
aam_mcp_resource_is_denied_filter |
Override an MCP resource deny result. |
aam_mcp_server_is_denied_filter |
Override an MCP server deny result. |
aam_mcp_tool_is_denied_filter |
Override an MCP tool deny result. |
aam_metabox_is_denied_filter |
Override a metabox deny result. |
aam_post_permission_result_filter |
Override a post permission decision. |
aam_posts_where_clause_filter |
Change SQL conditions for AAM post filtering. |
aam_role_is_denied_to_filter |
Override a target role permission decision. |
aam_role_rest_field_filter |
Supply a custom role REST field. |
aam_url_is_denied_filter |
Override a URL deny result. |
aam_user_is_denied_to_filter |
Override a target user permission decision. |
aam_user_query_args_filter |
Change a WordPress user query used for filtering. |
aam_widget_is_denied_filter |
Override a widget deny result. |
Framework and lifecycle
| Hook | Purpose |
|---|---|
aam_access_level_methods_filter |
Add callable methods to an access-level object. |
aam_default_instantiated_action |
Run after the default access level is instantiated. |
aam_framework_preference_methods_filter |
Add callable methods to a preference object. |
aam_framework_resource_methods_filter |
Add callable methods to a resource object. |
aam_framework_service_methods_filter |
Add callable methods to a service object. |
aam_get_access_level_filter |
Override access-level resolution. |
aam_get_config_filter |
Supply a value when a configuration key is absent. |
aam_get_parent_access_level_filter |
Override the parent of an access level. |
aam_get_permission_by_url_filter |
Override the URL rule selected for a request. |
aam_get_preference_filter |
Supply a custom preference object for an access level. |
aam_get_resource_filter |
Supply a custom resource object for an access level. |
aam_ignored_backend_menu_item_query_params_filter |
Choose query parameters omitted from backend menu IDs. |
aam_init_config_filter |
Modify the configuration array when AAM loads it. |
aam_init_preferences_filter |
Modify preferences as their store initializes. |
aam_init_settings_filter |
Modify access-level settings when loaded. |
aam_normalize_hook_filter |
Change a hook rule descriptor before AAM stores or reads it. |
aam_normalize_role_identifier_filter |
Resolve a custom target role identifier. |
aam_normalize_user_identifier_filter |
Resolve a custom target user identifier. |
aam_reset_action |
Run after AAM resets its stored state. |
aam_resource_get_permissions_filter |
Supply permissions from an external resource store. |
aam_resource_set_permission_filter |
Change a permission before it is saved. |
aam_role_instantiated_action |
Run after a role access level is instantiated. |
aam_sanitize_slug |
Override AAM slug normalization. |
aam_uninstall_action |
Run during plugin uninstall cleanup. |
aam_user_instantiated_action |
Run after a user access level is instantiated. |
aam_visitor_instantiated_action |
Run after the visitor access level is instantiated. |
Policies and markers
| Hook | Purpose |
|---|---|
aam_apply_policy_filter |
Merge policy-derived permissions into a resource or preference. |
aam_current_jwt_filter |
Supply the JWT visible to policy markers. |
aam_marker_typecast_filter |
Provide a value for a policy marker type cast. |
aam_policy_condition_result_filter |
Evaluate a custom policy condition type. |
aam_policy_marker_value_filter |
Resolve a custom policy marker value. |
aam_policy_statement_to_permission_filter |
Change how a policy statement becomes a permission. |
aam_shortcode_filter |
Render or replace an AAM shortcode result. |
Authentication and security
| Hook | Purpose |
|---|---|
aam_access_denied_redirect_handler_filter |
Supply a custom access-denied redirect handler. |
aam_deny_access_action |
Observe an access denial before AAM completes the response. |
aam_extract_jwt_filter |
Supply a token extracted from the current request. |
aam_geo_adapter_filter |
Provide the premium geolocation adapter. Premium. |
aam_get_user_ip_address_filter |
Override the client IP used by security and geo features. |
aam_jwt_claims_filter |
Modify claims before AAM signs a JWT. |
aam_security_audit_checks_filter |
Add or change security audit check definitions. |
aam_security_audit_inactive_batch_size_filter |
Set the batch size for inactive-account checks. |
aam_wp_die_args_filter |
Change arguments passed to the access-denied wp_die() response. |
REST and admin UI
| Hook | Purpose |
|---|---|
aam_cap_can_filter |
Control whether a capability may be updated, deleted, or toggled in REST. |
aam_capability_description_filter |
Supply a human-readable capability description. |
aam_content_access_controls_filter |
Add access-control fields to a content REST response. |
aam_get_user |
Replace a resolved WordPress user during AAM UI or REST processing. |
aam_initialize_ui_action |
Register or modify AAM UI features during initialization. |
aam_is_default_term_filter |
Override whether a term is the default for its taxonomy. |
aam_react_bootstrap_filter |
Change AAM UI bootstrap data for an access level. |
aam_react_post_metabox_bootstrap_filter |
Change post metabox UI bootstrap data. |
aam_react_role_parent_supported_filter |
Enable or disable role-parent controls in the UI. |
aam_react_term_access_bootstrap_filter |
Change term access UI bootstrap data. |
aam_rest_ability_access_list_filter |
Change the REST ability access list response. |
aam_rest_authenticated_user_data_filter |
Change the REST authentication response. |
aam_rest_get_access_level_filter |
Provide an access level to premium REST handlers. Premium. |
aam_rest_get_error_response_filter |
Provide a REST error response for premium handlers. Premium. |
aam_rest_mcp_prompt_access_list_filter |
Change the REST MCP prompt access list. |
aam_rest_mcp_resource_access_list_filter |
Change the REST MCP resource access list. |
aam_rest_mcp_server_access_list_filter |
Change the REST MCP server access list. |
aam_rest_mcp_tool_access_list_filter |
Change the REST MCP tool access list. |
aam_rest_register_route |
Register a premium route through the core REST router. Premium. |
aam_rest_role_output_filter |
Change a role REST response. |
aam_rest_route_args_filter |
Modify route registration arguments before WordPress sees them. |
aam_rest_update_role_action |
Run after a role is updated through REST. |
aam_rest_user_output_filter |
Change a user REST response. |
aam_role_created_action |
Run after a role is created through REST. |
aam_service_list_filter |
Change service entries displayed in AAM settings. |
aam_settings_list_filter |
Change settings entries for a settings group. |
aam_ui_policy_wildcards_available_filter |
Enable policy wildcard controls in the UI. |
Notes
aam_deny_access_actionreceives a redirect in core, but Complete Package also emits it without arguments. Its callback parameter should be optional.aam_normalize_hook_filterreceives a string in one path and a rule array in another. Check the type before changing it.- These groups list hooks emitted by the plugins. The older
aam_policy_token_value_filterandaam_role_permissions_filterpages remain for compatibility; neither name is emitted by the current plugins.