Hooks

Hooks: Admin UI Extension

6 min read

Use these hooks to extend the Notifal admin experience: menus, list tables, reusable form fields, notification/campaign editor tabs, settings screens, and the WordPress dashboard widget.

Index: Hook Reference Hub. Architecture: shared FieldRenderer and BaseListView in Architecture Overview.

Admin menu (actions)

HookParametersDescription
notifal/admin_menu/register/beforenoneBefore Notifal admin menu registration
notifal/admin_main_menu/register/afternoneAfter main Notifal menu registered

Admin page content (actions)

HookParametersDescription
notifal/admin_page/content/beforenoneBefore any Notifal admin page main content
notifal/admin_page/onpage_notifications/beforenoneBefore On-Page Notifications list/editor shell
notifal/admin_page/onpage_notifications/afternoneAfter On-Page Notifications page
notifal/settings/page/beforenoneBefore settings page render
notifal/settings/page/afternoneAfter settings page render

OnPage notification editor tabs (actions)

Dynamic patterns use sprintf() with tab and optional section identifiers.

PatternParametersDescription
notifal/admin/onpage/{tab}/beforenoneBefore tab content
notifal/admin/onpage/{tab}/afternoneAfter tab content
notifal/admin/onpage/{tab}/{section}/beforenoneBefore section within tab
notifal/admin/onpage/{tab}/{section}/afternoneAfter section within tab

Example tab slugs: general, appearance, products, timing, behavior, display_rules, content_source.

Constants: ActionHooks::ADMIN_ONPAGE_TAB_BEFORE, ADMIN_ONPAGE_TAB_SECTION_BEFORE.

Inline placement (Appearance tab, Pro):

HookDescription
notifal/admin/onpage/appearance/inline_placement/beforeBefore inline "Where" settings
notifal/admin/onpage/appearance/inline_placement/afterAfter inline "Where" settings

Campaign editor tabs (actions)

PatternParametersDescription
notifal/admin/campaign/tab/{tab}/beforenoneBefore campaign tab
notifal/admin/campaign/tab/{tab}/afternoneAfter campaign tab
notifal/admin/campaign/tab/{tab}/section/{section}/beforenoneBefore campaign tab section
notifal/admin/campaign/tab/{tab}/section/{section}/afternoneAfter campaign tab section

List tables (actions and filters)

Used by BaseListView for notifications, templates, and campaigns.

Actions

HookParametersDescription
notifal/admin/list/before_rendernoneBefore entire list UI
notifal/admin/list/after_headernoneAfter list header (used for the Noti invite strip on OnPage)
notifal/admin/list/after_rendernoneAfter entire list UI
notifal/admin/list/actions_beforeWP_Post $postBefore row action buttons
notifal/admin/list/actions_afterWP_Post $postAfter row action buttons
notifal/admin/list/handle_bulk_actionstring $action, int[] $ids, string $postTypeCustom bulk action handler

Filters

HookParametersDescription
notifal/admin/list/bulk_actionsarray $actionsAvailable bulk actions
notifal/admin/list/query_argsarray $argsMain list query arguments
notifal/admin/list/count_query_argsarray $argsCount query arguments
notifal/admin/list/row_actionsarray $actions, WP_Post $postRow action link definitions
notifal/admin/list/custom_columnstring $output, string $column_key, WP_Post $postCustom column cell content
notifal/admin/{post_type}/status_tabsarray $tabs, string $postTypeStatus filter tabs per post type

Addons catalog (filters)

HookParametersDescription
notifal/modules/registryarray $modulesAddon cards on Notifal → Addons (@since 3.0.0)

Form fields (actions and filters)

Field hooks append the field ID as the final path segment.

Actions (before/after render)

Base patternDescription
notifal/field/select/before/{id}Before select field
notifal/field/select/after/{id}After select field
notifal/field/text/before/{id}Before text field
notifal/field/text/after/{id}After text field
notifal/field/textarea/before/{id}Before textarea
notifal/field/textarea/after/{id}After textarea
notifal/field/date/before/{id}Before date field
notifal/field/date/after/{id}After date field
notifal/field/datetime/before/{id}Before datetime field
notifal/field/datetime/after/{id}After datetime field
notifal/field/toggle/before/{id}Before toggle
notifal/field/toggle/after/{id}After toggle
notifal/field/number/before/{id}Before number input
notifal/field/number/after/{id}After number input
notifal/field/color/before/{id}Before color picker
notifal/field/color/after/{id}After color picker
notifal/field/range/before/{id}Before range slider
notifal/field/range/after/{id}After range slider
notifal/field/media/before/{id}Before media upload
notifal/field/media/after/{id}After media upload
notifal/field/multi_checkbox/before/{id}Before multi-checkbox
notifal/field/multi_checkbox/after/{id}After multi-checkbox

Shared field actions (no dynamic ID)

HookParametersDescription
notifal/field/ajax_search/beforenoneBefore AJAX post selector field
notifal/field/ajax_search/afternoneAfter AJAX post selector field
notifal/field/multi_select/beforenoneBefore multi-select field
notifal/field/multi_select/afternoneAfter multi-select field

Field filters

HookParametersDescription
notifal/field/select/options/{id}array $optionsOptions for a select field

JavaScript translations (filters)

HookParametersDescription
notifal/{Module}/js_translationsarray $translationsModule-specific JS strings (dynamic module name)
notifal/onpage/translationsarray $translationsOnPage notification JS translations

Toast messages (action and filters)

HookTypeParametersDescription
notifal/toast/dispatchedactionmessage, type, redirectToast dispatched to admin
notifal/toast/typefilterstring $typeToast type before redirect
notifal/toast/messagefilterstring $messageToast message before redirect

WordPress dashboard widget (actions)

HookParametersDescription
notifal/dashboard_widget/before_rendernoneBefore Notifal dashboard widget content
notifal/dashboard_widget/after_rendernoneAfter widget content

Filter: notifal/dashboard_widget/active_notifications in Analytics and Tracking.

Pre-created notifications archive (actions and filters)

Marketplace templates browsed inside wp-admin.

Actions

HookParametersDescription
notifal/pre_created_notifications/archive/beforearray $currentFilters, array $apiResponseBefore archive render
notifal/pre_created_notifications/archive/afterarray $currentFilters, array $apiResponseAfter archive render
notifal/pre_created_notifications/api/fetchedarray $data, array $argsAfter list API fetch
notifal/pre_created_notifications/api/single_fetchedarray $data, int $notificationIdAfter single item API fetch
notifal/pre_created_notifications/api/cache_clearednoneAfter API cache cleared

Filters

HookParametersDescription
notifal/pre_created_notifications/api/paramsarray $params, array $argsQuery params before API request
notifal/pre_created_notifications/api/request_argsarray $args, string $url, array $paramsHTTP request args for API call

WordPress core filters (reference)

Notifal registers blocks using these WordPress core filters (constants in base FilterHooks.php):

ConstantHook nameDescription
FilterHooks::WP_BLOCK_CATEGORIES_ALLblock_categories_allGutenberg block categories
FilterHooks::WP_ALLOWED_BLOCK_TYPES_ALLallowed_block_types_allAllowed block types in editor

Hooks series

  1. Hook Reference Hub
  2. Hooks: Lifecycle and Bootstrap
  3. Hooks: Notifications and Eligibility
  4. Hooks: Templates and Rendering
  5. Hooks: Tags and Dynamic Data
  6. Hooks: Display Rules and Content Source
  7. Hooks: Analytics and Tracking
  8. Hooks: Admin UI Extension (you are here)
  9. Hooks: Pro Integration Bridge