BNWF shorcodes

Actions and Filters

Updated 

Here is a list of all current available actions and filters within BNFW. 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.

bnfw_mail_headers( $headers, $emails )
Modify email headers before being sent to wp_mail.

Custom Field Add-on Filters

bnfw_from_field( $value, $setting, $post_id, $emails )
Filter (modify) the From field of an email that is sent by BNFW.

bnfw_reply_name_field( $value, $setting, $post_id, $emails )
Filter (modify) the Reply To name field of an email that is sent by BNFW.

bnfw_reply_email_field( $value, $setting, $post_id, $emails )
Filter (modify) the Reply To email field of an email that is sent by BNFW.

Others Filters

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

bnfw_trigger_insert_post( false, $post_id, $update )
Whether to trigger insert post or not. Pass the $post_id to allow post types to insert notifications. 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.