Hooks and Filters
Filter the content of a box:
// accepts 2 arguments, box content and box id (post ID of box) // return $content (string) apply_filters('hollerbox_content', $content, $box_id );
Modify the display settings for a box:
// if show_it is true, that means we display this notification. $box_id is holler box id // return boolean apply_filters( 'hwp_display_notification', $show_it, $box_id, $post_id );
Example usage for display notification filter.
Add classes to a box:
// $id is box id // return classes (string), make sure to put spaces around classes apply_filters( 'hollerbox_classes', '', $id );
Modify avatar email:
// $id is box id, return email (string) apply_filters( 'hwp_avatar_email', $avatar_email, $id);
Insert content above box content:
do_action('hollerbox_above_content', $id);
Insert email form:
do_action('hwp_email_form', $id);
Insert content below box content:
do_action('hollerbox_below_content', $id);
Modify email content using "send to email" setting:
apply_filters( 'hwp_email_msg', $msg, $email, $name );
Admin Hooks
These admin hooks allow you to add settings to extend the functionality of Holler Box.
Add a setting to be saved (array):
apply_filters( 'hwp_settings_array', $keys );
Add something to the settings page:
do_action( 'hwp_settings_page' );
Add a new Holler Box Type:
do_action('hwp_type_settings', $post->ID);
Position settings:
do_action('hwp_position_settings', $post->ID);<br>do_action('hwp_after_position_settings', $post->ID);
Add a popup template:
do_action('hwp_popup_templates', $post->ID);
MailChimp settings:
do_action( 'hwp_mc_settings', $post->ID );
Email settings:
do_action( 'hwp_email_settings', $post->ID );
Display when settings:
do_action('hwp_display_when_settings', $post->ID );
After advanced settings:
do_action('hwp_advanced_settings_after', $post->ID );
Runs on save_post for custom setting sanitization:
do_action( 'hwp_custom_settings_save', $post_id );<br>