With Hubbub Pro 2.28.0 or greater, you can Customize the Save This form even further using filters.
All filters accept a string unless otherwise noted. Additional arguments include the current post ID, and a boolean for whether or not the current Save This form was created using the shortcode.
Here is a snippet example to look at…
// Use a different heading based on post category
function filter_hubbub_save_this_form_filter_heading( $heading, $post_id, $is_shortcode ) {
if ( in_category( 'BBQ Recipes', $post_id ) ) {
$heading = 'Save This BBQ Recipe';
}
return $heading;
}
add_filter( 'hubbub_save_this_filter_form_heading', 'filter_hubbub_save_this_form_filter_heading', 10, 3 );
| Filter | Notes |
|---|---|
| hubbub_save_this_form_filter_custom_css_classes | CSS classes added to form. |
| hubbub_save_this_form_filter_custom_css | Custom CSS added to page. |
| hubbub_save_this_form_filter_custom_background_color | Custom background color for form from settings. |
| hubbub_save_this_form_filter_custom_button_color | Custom button color for submit button from settings. |
| hubbub_save_this_form_filter_custom_button_text_color | Custom button text color for submit button from settings. |
| hubbub_save_this_form_filter_post_url | The URL of the current page. |
| hubbub_save_this_form_filter_post_title | The post title of the current page. |
| hubbub_save_this_form_filter_heading | The form heading from settings. |
| hubbub_save_this_form_filter_message | The form message from settings. |
| hubbub_save_this_form_filter_consent_text | The consent text next to the consent checkbox from settings. |
| hubbub_save_this_form_filter_before_form | Before form. |
| hubbub_save_this_form_filter_after_form | After form. |
