WPAdverts Plugin
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:
[cci lang=”php”]bnfw_after_default_notifications( $setting )[/cci]
Triggered after the default notifications list in notification dropdown.
[cci lang=”php”]bnfw_after_default_notifications_optgroup( $setting )[/cci]
Triggered after the default notifications optgroup in notification dropdown.
[cci lang=”php”]bnfw_after_transactional_notifications( $setting )[/cci]
Triggered after the transactional notifications in notification dropdown.
[cci lang=”php”]bnfw_after_transactional_notifications_optgroup( $setting )[/cci]
Triggered after the transactional notifications optgroup in notification dropdown.
[cci lang=”php”]bnfw_after_notification_options( $post_type_slug, $post_type_label, $setting )[/cci]
Triggered after the post type notifications in notification dropdown.
[cci lang=”php”]bnfw_after_notification_options_optgroup( $post_type_slug, $post_type_label, $setting )[/cci]
Triggered after the post type notifications optgroup in notification dropdown.
[cci lang=”php”]bnfw_after_notification_optgroups( $setting )[/cci]
Triggered after all notification optgroups in notification dropdown.
[cci lang=”php”]bnfw_after_notification_dropdown( $setting )[/cci]
Triggered after notification dropdown.
[cci lang=”php”]bnfw_after_email_formatting( $setting )[/cci]
Triggered after email formatting field.
[cci lang=”php”]bnfw_after_additional_email_fields( $setting )[/cci]
Triggered after additional email fields.
[cci lang=”php”]bnfw_after_only_post_author( $setting )[/cci]
Triggered after only post author field.
[cci lang=”php”]bnfw_after_disable_current_user( $setting )[/cci]
Triggered after current user field.
[cci lang=”php”]bnfw_after_send_to( $setting )[/cci]
Triggered after sent to field.
[cci lang=”php”]bnfw_after_user_dropdown( $setting )[/cci]
Triggered after user dropdown field.
[cci lang=”php”]bnfw_before_message_body( $setting )[/cci]
Triggered before message body field.
[cci lang=”php”]bnfw_after_enqueue_scripts()[/cci]
After enqueing all scripts
Other Actions
[cci lang=”php”]bnfw_notification_table_column( $column, $post_id )[/cci]
Triggered after the table columns in All Notifications list table.
Filters
These are the ‘Add New Notification’ screen filters:
[cci lang=”php”]bnfw_notification_dropdown_posttypes( $posttypes )[/cci]
List of post types that should be displayed in notification dropdown.
[cci lang=”php”]bnfw_notification_dropdown_taxonomies( $taxonomies )[/cci]
List of taxonomies that should be displayed in notification dropdown.
[cci lang=”php”]bnfw_email_dropdown_placeholder( $text )[/cci]
Placeholder for email dropdown in Add New Notification screen.
[cci lang=”php”]bnfw_mail_headers( $headers, $emails )[/cci]
Modify email headers before being sent to wp_mail.
Custom Field Add-on Filters
[cci lang=”php”]bnfw_from_field( $value, $setting, $post_id, $emails )[/cci]
Filter (modify) the From field of an email that is sent by BNFW.
[cci lang=”php”]bnfw_reply_name_field( $value, $setting, $post_id, $emails )[/cci]
Filter (modify) the Reply To name field of an email that is sent by BNFW.
[cci lang=”php”]bnfw_reply_email_field( $value, $setting, $post_id, $emails )[/cci]
Filter (modify) the Reply To email field of an email that is sent by BNFW.
Others Filters
[cci lang=”php”]bnfw_insert_post_themes( $themes )[/cci]
List of themes for which insert post is used.
[cci lang=”php”]bnfw_trigger_insert_post( false, $post_id, $update )[/cci]
Whether to trigger insert post or not. Pass the $post_id to allow post types to insert notifications. Default false
[cci lang=”php”]bnfw_trigger_user-role_notification( true, $notification, $new_role, $old_roles )[/cci]
Whether to trigger user role notification or not. Default true
[cci lang=”php”]bnfw_trigger_admin-role_notification( true, $notification, $new_role, $old_roles )[/cci]
Whether to trigger admin role notification or not. Default true
[cci lang=”php”]bnfw_trigger_new-user_notification( true, $setting, $user )[/cci]
Whether to trigger new user notification. Default true
[cci lang=”php”]bnfw_localize_script( $strings )[/cci]
List of strings that are passed to localize script.
[cci lang=”php”]bnfw_notification_setting( $setting )[/cci]
Notification setting.
[cci lang=”php”]bnfw_notification_setting_fields( $field_list )[/cci]
Notification setting fields.
[cci lang=”php”]bnfw_notification_name( $name, $slug )[/cci]
Notification name displayed in All Notifications list table.
[cci lang=”php”]bnfw_test_email_message( $message, $setting )[/cci]
Notification test email message.
[cci lang=”php”]bnfw_notification_disabled( false, $notificaiton_id, $setting )[/cci]
Should a notification be disabled. Default false
[cci lang=”php”]bnfw_notification_message( $message, $setting )[/cci]
Notification message.