Hooks and filters
Extending NebulaCMS with actions and filters.
NebulaCMS uses a HookService modeled on common CMS hook patterns:
- Actions —
do_action('name', ...); listeners useadd_action('name', callable, priority). - Filters —
apply_filters('name', $value, ...); listeners must return the modified value viaadd_filter.
Helpers are defined in app/Helpers/HookHelper.php and loaded from HookServiceProvider.
Registration order
- Core providers register default hooks.
- Plugins load (
plugins/{slug}/index.phpor equivalent). - Theme
functions.phpruns for parent then child theme.
Use remove_action / remove_filter if you need to unregister callbacks (match priority and callable).
Common use cases
- Inject analytics or meta tags on
theme.styles/theme.scripts. - Adjust blog query via
blog_posts_queryor per-view data filters (see codebase for exact hook names). - Extend single post data with
single_post_datafilter.
Full reference
Hook names, execution order, and examples:
Use that file as the detailed catalog; this page is the entry point.