Actions and Filters

Here is a list of all available actions and filters within BNFW, current up to 1.6.14. Common functions, such as to provide support for front-end forms in plugins or themes, can be found here.

Actions

These are the ‘Add New Notification’ screen actions:

bnfw_after_default_notifications( $setting )
Triggered after the default notifications list in notification dropdown.

bnfw_after_default_notifications_optgroup( $setting )
Triggered after the default notifications optgroup in notification dropdown.

bnfw_after_transactional_notifications( $setting )
Triggered after the transactional notifications in notification dropdown.

bnfw_after_transactional_notifications_optgroup( $setting )
Triggered after the transactional notifications optgroup in notification dropdown.

bnfw_after_notification_options( $post_type_slug, $post_type_label, $setting )
Triggered after the post type notifications in notification dropdown.

bnfw_after_notification_options_optgroup( $post_type_slug, $post_type_label, $setting )
Triggered after the post type notifications optgroup in notification dropdown.

bnfw_after_notification_optgroups( $setting )
Triggered after all notification optgroups in notification dropdown.

bnfw_after_notification_dropdown( $setting )
Triggered after notification dropdown.

bnfw_after_email_formatting( $setting )
Triggered after email formatting field.

bnfw_after_additional_email_fields( $setting )
Triggered after additional email fields.

bnfw_after_only_post_author( $setting )
Triggered after only post author field.

bnfw_after_disable_current_user( $setting )
Triggered after current user field.

bnfw_after_send_to( $setting )
Triggered after sent to field.

bnfw_after_user_dropdown( $setting )
Triggered after user dropdown field.

bnfw_before_message_body( $setting )
Triggered before message body field.

bnfw_after_enqueue_scripts()
After enqueing all scripts

Other Actions

bnfw_notification_table_column( $column, $post_id )
Triggered after the table columns in All Notifications list table.

Filters

These are the ‘Add New Notification’ screen filters:

bnfw_notification_dropdown_posttypes( $posttypes )
List of post types that should be displayed in notification dropdown.

bnfw_notification_dropdown_taxonomies( $taxonomies )
List of taxonomies that should be displayed in notification dropdown.

bnfw_email_dropdown_placeholder( $text )
Placeholder for email dropdown in Add New Notification screen.

Others Filters

bnfw_insert_post_themes( $themes )
List of themes for which insert post is used.

bnfw_trigger_insert_post( false )
Whether to trigger insert post or not. Default false

bnfw_trigger_user-role_notification( true, $notification, $new_role, $old_roles )
Whether to trigger user role notification or not. Default true

bnfw_trigger_admin-role_notification( true, $notification, $new_role, $old_roles )
Whether to trigger admin role notification or not. Default true

bnfw_trigger_new-user_notification( true, $setting, $user )
Whether to trigger new user notification. Default true

bnfw_localize_script( $strings )
List of strings that are passed to localize script.

bnfw_notification_setting( $setting )
Notification setting.

bnfw_notification_setting_fields( $field_list )
Notification setting fields.

bnfw_notification_name( $name, $slug )
Notification name displayed in All Notifications list table.

bnfw_test_email_message( $message, $setting )
Notification test email message.

bnfw_notification_disabled( false, $notificaiton_id, $setting )
Should a notification be disabled. Default false

bnfw_notification_message( $message, $setting )
Notification message.

Subscribe for BNFW News

Want to know when new add-ons or features are released? Sign up to the newsletter. No spam, ever. Unsubscribe at any time.

Please enter your name.
Please enter a valid email address.
Something went wrong. Please check your entries and try again.