These hooks cover on-page notification create/update/delete, settings sanitization (general, timing, behavior, appearance), campaign linkage, and the eligibility REST pipeline that decides what the frontend receives.
Index: Hook Reference Hub. REST details: REST API Reference. Example: Cookbook: Modify Notification Before Display.
Display rules and content source pools are documented separately in Display Rules and Content Source.
Notification CRUD (actions)
| Hook | Parameters | Description |
|---|
notifal/onpage_notification/saved | none | Notification saved successfully |
notifal/onpage_notification/meta_saved | none | Notification meta saved |
notifal/onpage_notification/trashed | int $notification_id | Notification moved to trash |
notifal/onpage_notification/deleted | int $notification_id, string $status | Notification permanently deleted |
notifal/onpage_notification/duplicated | int $original_id, int $new_id | Notification duplicated |
notifal/onpage_notifications/trash_emptied | int $deleted_count | Trash emptied for notifications |
notifal/onpage/notification/status/toggle/before | none | Before status toggle from list view |
notifal/onpage/notification/status/toggle/after | none | After status toggle |
notifal/onpage/timing/schedule_incoming_parse_failed | none | Schedule start/end string could not be parsed during sanitization |
Notification save and load (filters)
| Hook | Parameters | Description |
|---|
notifal/onpage_notification/sanitized_data | array $sanitized, array $raw_data | Sanitized payload before DB write |
notifal/onpage_notification/post_data | array $post_data, array $sanitized_data | wp_insert_post / update args |
notifal/onpage_notification/loaded_data | array $data, WP_Post $post | Data loaded for editor |
notifal/onpage_notifications/total_count | int $total | Override total count in list view |
notifal/onpage_notifications/status_tabs | array $tabs | Status tabs in notifications list |
Import and export (filters)
| Hook | Parameters | Description |
|---|
notifal/export/onpage_notification_data | array $data | Export JSON before download |
notifal/onpage_notification/import/result | array $result, string $filePath | Import result after processing |
notifal/onpage_notification/import/post_status | string $status, array $notification_data | Post status for imported notification (default draft) |
Cache invalidation (actions)
| Hook | Parameters | Description |
|---|
notifal/onpage_notification/cache_cleared | none | Notification caches cleared |
notifal/onpage_notification/elementor_cache_cleared | none | Elementor caches cleared |
notifal/onpage_notification/order_pool_cache_cleared | none | Order pool cache cleared |
notifal/onpage_notification/product_pool_cache_cleared | none | Product pool cache cleared |
notifal/onpage_notification/frontend_template_cache_cleared | none | Frontend template cache cleared |
notifal/onpage_notification/wp_object_cache_cleared | none | WordPress object cache cleared |
notifal/onpage_notification/all_caches_cleared | none | All notification caches manually cleared |
Preview (actions)
| Hook | Parameters | Description |
|---|
notifal/onpage/preview/before | WP_Post $post | Before notification preview page |
notifal/onpage/preview/after | WP_Post $post | After notification preview page |
Template preview hooks: Templates and Rendering.
Campaign hooks
| Hook | Type | Parameters | Description |
|---|
notifal/campaign/saved | action | none | Campaign saved |
notifal/campaign/deleted | action | none | Campaign trashed |
notifal/campaign/status_changed | action | int $campaign_id, array $previous_meta, array $new_meta | Campaign status changed |
notifal/campaign/schedule_check | filter | bool $should_show, int $campaign_id, WP_Post $notification | Override campaign schedule eligibility |
notifal/notification/campaign_schedule | filter | array $schedule, int $campaign_id, int $notification_id | Resolved schedule when campaign overrides notification |
notifal/campaign/onpage_picker/search_results | filter | array $items, string $search | Rows in campaign notification picker AJAX search |
Eligibility REST pipeline
Used by GET /wp-json/notifal/v1/onpage/eligible.
Actions
| Hook | Parameters | Description |
|---|
notifal/onpage/eligibility/before_process | none | Before eligibility request is processed |
notifal/onpage/eligibility/after_process | none | After eligibility request completes |
Filters
| Hook | Parameters | Description |
|---|
notifal/onpage/eligibility/data | array $eligibility_data, array $context | Final payload sent to frontend |
notifal/onpage/eligibility/global_eligible | bool $is_global_eligible, \WP_Post $notification, array $context | Exclude inline notifications from floating injection |
notifal/onpage/frontend/localized_config | array $config, array $context | notifalOnPageConfig before script localization |
notifal/onpage/frontend/immediate_preload_notifications | array $notifications, array $context | Immediate notifications embedded in page HTML |
notifal/onpage/user/eligibility | bool $is_eligible, array $notification, array $user_context | Per-notification user eligibility |
notifal/onpage/notification/content | array $notification, array $context | Notification record before frontend delivery |
notifal/onpage/frontend/context | array $context | Page context passed to JavaScript |
notifal/onpage/archive_context_post_types | string[] $postTypes | Archive pseudo post types in visitor context |
notifal/onpage/api/rate_limit_settings | array $rate_limit_settings | Rate limits for eligibility/tracking endpoints |
Frontend asset loading (filters)
| Hook | Parameters | Description |
|---|
notifal/onpage/frontend/should_load_assets | bool $should_load | Force or skip OnPage frontend assets |
notifal/onpage/page/contains_notifications | bool $contains_notifications | Page contains notification markup |
notifal/onpage/has_active_notifications | bool $has_notifications | Active notifications exist for current request |
notifal/onpage/template/rendered_assets | array $assets, string $html, WP_Post $template | Extra CSS/JS when a rendered template needs them (Forms uses this) |
notifal/onpage/compat/wp_armour_enabled | bool $enabled | Whether WP Armour compatibility runs for popup forms |
Asset registration actions: Lifecycle and Bootstrap.
General settings (filters)
| Hook | Parameters | Description |
|---|
notifal/onpage/general/default_settings | array $settings | Default general settings |
notifal/onpage/general/sanitized_settings | array $sanitized_settings, array $raw_settings | Sanitized general settings |
Timing settings (filters)
| Hook | Parameters | Description |
|---|
notifal/onpage/timing/default_settings | array $settings | Default timing settings |
notifal/onpage/timing/sanitized_settings | array $sanitized, array $raw_settings | Sanitized timing before save |
notifal/onpage/timing/display_config | array $config, array $settings | When to show (delays, scroll, etc.) |
notifal/onpage/timing/duration_config | array $config, array $settings | How long to show |
notifal/onpage/timing/frequency_config | array $config, array $settings | Show frequency and session limits |
notifal/onpage/timing/advanced_config | array $config, array $settings | Advanced timing (tab behavior, sessions) |
notifal/onpage/timing/should_show | bool $should_show, array $settings, array $context | Override timing show decision |
notifal/onpage/timing/js_config | array $js_config, array $settings | Timing config localized to JavaScript |
Behavior settings (filters)
| Hook | Parameters | Description |
|---|
notifal/onpage/behavior/default_settings | array $settings | Default behavior settings |
notifal/onpage/behavior/sanitized_settings | array $sanitized, array $raw_settings | Sanitized behavior before save |
notifal/onpage/behavior/interaction_config | array $config, array $settings | Dismiss and click handling |
notifal/onpage/behavior/animation_config | array $config, array $settings | Animation type, duration, easing |
notifal/onpage/behavior/accessibility_config | array $config, array $settings | ARIA, focus, screen reader settings |
notifal/onpage/behavior/advanced_config | array $config, array $settings | Scroll lock, form handling, state |
notifal/onpage/behavior/mobile_config | array $config, array $settings | Mobile/touch behavior |
notifal/onpage/behavior/js_config | array $js_config, array $settings | Behavior config for JavaScript |
notifal/onpage/behavior/tab_badge_config | array $tab_badge_config, array $settings | Browser tab badge configuration |
notifal/onpage/tab_badge/frontend_config | array $frontend_config | Tab badge config sent to JS |
Frontend accessibility (filters)
| Hook | Parameters | Description |
|---|
notifal/onpage/frontend/accessibility_config | array $config, array $behaviorSettings | Frontend accessibility manager config |
notifal/onpage/frontend/aria_attributes | array $ariaAttributes, array $accessibilityConfig, array $notificationData | ARIA attributes on notification elements |
notifal/onpage/frontend/focus_trap_config | array $focusTrapConfig, array $accessibilityConfig, array $notificationData | Focus trap for keyboard navigation |
notifal/onpage/frontend/screen_reader_config | array $screenReaderConfig, array $accessibilityConfig, array $notificationData | Screen reader announcements |
notifal/onpage/frontend/accessibility_data_attributes | array $dataAttributes, array $accessibilityConfig, array $notificationData | Data attributes for a11y detection |
Appearance settings (filters)
| Hook | Parameters | Description |
|---|
notifal/onpage/appearance/default_settings | array $settings | Default appearance settings |
notifal/onpage/appearance/sanitized_settings | array $sanitized, array $raw_settings | Sanitized appearance before save |
notifal/onpage/appearance/position_settings | array $position_settings, array $settings, string $device | Desktop/mobile position config |
notifal/onpage/appearance/position_css | string $css, array $position_settings, string $device | Generated positioning CSS |
notifal/onpage/appearance/default_audio_files | array $audio_files | Built-in audio file options |
notifal/onpage/appearance/audio_file_url | string $url, string $filename | Resolved audio file URL |
notifal/onpage/appearance/frontend_config | array $config, array $settings | Appearance config for frontend |
notifal/onpage/appearance/display_type_options | array $options | Display type select options (Pro adds inline) |
notifal/onpage/topbar/header_selector | string $selector | CSS selector for "above header" top bar placement |
notifal/onpage/topbar/above_header_compat_css | string $css | Extra inline CSS for sticky header compatibility |
notifal/onpage/animation/types | array $animation_types | Available animation types |
Tab badge (actions)
| Hook | Parameters | Description |
|---|
notifal/onpage/tab_badge/title_update | string $new_title, int $count | Document title updated with badge count |
notifal/onpage/tab_badge/title_restore | string $original_title | Original document title restored |
notifal/onpage/tab_badge/favicon_update | array $badge_config, string $original_favicon | Favicon overlay applied |
notifal/onpage/tab_badge/favicon_restore | string $original_favicon | Original favicon restored |
AI prompt configuration (filters)
These filters still shape layout, use case, and example data for the OnPage Generate with AI wizard. Full AI hooks: Hooks: Notifal AI.
| Hook | Parameters | Description |
|---|
notifal/onpage/ai_prompt/config | array $config | OnPage AI prompt config for JavaScript |
notifal/onpage/ai_prompt/export_sample | array $sample | Sample export JSON embedded in AI prompt |
Admin OnPage assets (actions)
| Hook | Parameters | Description |
|---|
notifal/admin_onpage/assets/before_enqueue | WP_Screen $screen | Before OnPage admin assets enqueue |
notifal/admin_onpage/assets/after_enqueue | WP_Screen $screen | After OnPage admin assets enqueue |
notifal/admin_onpage/list/assets/before_enqueue | none | Before OnPage list admin assets |
notifal/admin_onpage/list/assets/after_enqueue | none | After OnPage list admin assets |
Editor tab/section hooks: Admin UI Extension.
Labels and admin search (filters)
| Hook | Parameters | Description |
|---|
notifal/onpage/labels/get_terms_args | array $args | get_terms args for label options |
notifal/onpage/labels/options | array $options | Label slug => name map |
notifal/onpage/admin_search/results | array $results, string $post_type, string $keyword | AJAX post search results |
notifal/onpage/admin_search/user_results | array $results, string $keyword | AJAX user search results |
notifal/onpage/translations | array $translations | OnPage JavaScript translations |
Tag context for notifications (filter)
| Hook | Parameters | Description |
|---|
notifal/onpage/tag/context | array $context, array $contentSourceSettings, array $pageContext | Dynamic tag context during frontend render |
Full tag system: Tags and Dynamic Data.
What to read next
Hooks series
- Hook Reference Hub
- Hooks: Lifecycle and Bootstrap
- Hooks: Notifications and Eligibility (you are here)
- Hooks: Templates and Rendering
- Hooks: Tags and Dynamic Data
- Hooks: Display Rules and Content Source
- Hooks: Analytics and Tracking
- Hooks: Admin UI Extension
- Hooks: Pro Integration Bridge