Developer Hooks and WordPress Abilities API

Reference ThemeRouter filters for collisions, permissions, menu sync, and its read-only WordPress abilities.

ThemeRouter exposes focused filters for routing conflicts, authorization, and menu synchronization. Version 1.1.0 also registers read-only abilities when the active WordPress version provides the Abilities API.

Routing and access filters

  • themerouter_collision_precedence: choose page or custom post type for equal-precedence route candidates.
  • themerouter_collision_conflict_resolution: choose 404, page, or custom post type for exact ambiguous conflicts.
  • themerouter_can_user_preview: customize private preview authorization.
  • themerouter_can_user_view_debug: customize frontend debug authorization.

Menu sync filters

  • themerouter_menu_sync_large_menu_threshold: change the item count that requires explicit confirmation. Default: 50.
  • themerouter_menu_sync_item_hard_limit: change the maximum items processed in one sync. Default: 500.

Registered abilities

  • themerouter/list-themes: return the active and installed themes available to ThemeRouter.
  • themerouter/get-settings: return current ThemeRouter settings.
  • themerouter/validate-settings: validate a settings payload without saving it.

Abilities require manage_options by default and are skipped safely on WordPress versions that do not provide the Abilities API.

For current route behavior and setup guidance, use the ThemeRouter documentation and match the instructions to the installed plugin version.

Was this helpful?