The UABB Filter Reference

Have you ever thought of customizing the Ultimate Addons for Beaver Builder?

We are here to help. We’ve added a few filters that will make customization easier and faster. Don’t see a filter you’ve thought of? Let us know. We’ll add that too!

You need to put the below code snippet in the functions.php file of your theme/child theme.

Module: Contact Form

Filter: uabb_from_email
Description: This filter is built to control the “from” email address of the form submission email.

// Controls the from email address of form submission email
function function_name( $from_email ) {
    $from_email = "[email protected]"; // Change this email address.
    return $from_email;
}
add_filter( 'uabb_from_email', 'function_name' );

Filter: uabb_from_name
Description: This filter is built to control the “from” name of the form submission.

// Controls the from name of form submission email
function function_name( $from_name ) {
    $from_name = "WordPress"; // Change this name.
    return $from_name;
}
add_filter( 'uabb_from_name', 'function_name' );

Filter: uabb_contact_form_update_error_message
Description: This filter is built to update the contact form error message.

 // Updates the contact form error message
function function_name( $string ) {
    $string = 'Your Error message';
    return $string;
}
add_filter( 'uabb_contact_form_error_message', 'function_name' );

Module: Advanced Post

Filter: uabb_blog_posts_featured_image_sizes
Description: This filter can be used to control the featured image sizes. One can add his own registered size for featured images.

// Controls the featured image sizes
function abc($size_arr) {
    $size_arr = array(
        'full' => __( 'Full', 'uabb' ),
        'large' => __( 'Large', 'uabb' ),
        'medium' => __( 'Medium', 'uabb' ),
        'thumbnail' => __( 'Thumbnail', 'uabb' ),
        'custom' => __( 'Custom', 'uabb' ),
        'my_custom_image_size' => __( 'My Custom Image Size', 'uabb' ),
    ); // Add your own size to this array.
    return $size_arr;
}
add_filter( 'uabb_blog_posts_featured_image_sizes', 'abc' );
add_image_size( 'my_custom_image_size', 300, 300 );

Filter: uabb_blog_posts_excerpt
Description: This filter helps manipulating the content from the Advanced post module. This will be helpful when one wants to trim content or add extra content.

// Controls content/excerpt of the blog post
function abc($content) {
    $content = '';
    //Do any operation with the content string (say trim the string or add any extra content etc.)
    return $content;
}
add_filter( 'uabb_blog_posts_excerpt', 'abc' );

Filter: uabb_blog_posts_link
Description: This filter can be used to change the post URL to a common one.

// Lets you change the post URL to a common one
add_filter( 'uabb_blog_posts_link', 'my_function', 10, 2 );

function my_function( $url, $id ) {
	return 'your url';
}

Filter: uabb_advanced_post_title_link
Description: This filter can be used to control the post URL link. This will be helpful when one wants to remove posts links from advanced post or to modify link html.

// Lets you remove the post anchor and display only title
function my_function( $link_html, $title, $link ) {
      return $title;
}
add_filter( 'uabb_advanced_post_title_link', 'my_function', 10, 3 );

Filter: uabb_blog_posts_query_args
Description: This filter helps to modify WP_Query arguments.

// Helps to modify WP_Query arguments
function your_function_name_goes_here( $args ) {
    $args = '';
    //Do any modifications to modify the args. You can add your own filtered query
    return $args;
}
add_filter( 'uabb_blog_posts_query_args', 'your_function_name_goes_here' );

Module: Photo Gallery

Filter: uabb_photo_gallery_image_sizes
Description: This filter can be used to control the image sizes in the Photo Gallery module. One can add his own registered size for these images.

// Controls the photo gallery image sizes
function abc($size_arr) {
    $size_arr = array(
        'full' => __( 'Full', 'uabb' ),
        'large' => __( 'Large', 'uabb' ),
        'medium' => __( 'Medium', 'uabb' ),
        'thumbnail' => __( 'Thumbnail', 'uabb' ),
        'custom' => __( 'Custom', 'uabb' ),
        'my_custom_image_size' => __( 'My Custom Image Size', 'uabb' ),
    ); // Add your own size to this array.
    return $size_arr;
}
add_filter( 'uabb_photo_gallery_image_sizes', 'abc' );
add_image_size( 'my_custom_image_size', 300, 300 );

Module: Row Separator

Filter: uabb_row_separator_top_options
Description: This filter can be used to control the top row separator shapes. One can add his own top row separator shape. You can determine the shape in the filter mentioned below. This filter has to go along with the one for SVG shapes and they both need to have the same shape name to see the desired result

// add options to top row separator
add_filter ( 'uabb_row_separator_top_options', 'new_top_options', 10, 1 );
function new_top_options( $arr ) {
	$arr[ 'triangle_custom' ] = 'Triangle Custom';
	return $arr;
}

Filter: uabb_row_separator_svg_triangle_custom
Description: This filter will add a new SVG shape

/// Modify the SVG html
add_filter( 'uabb_row_separator_svg_triangle_custom', 'criticalink_row_svg', 10, 2 );
function criticalink_row_svg( $svg_html, $row ) {
	return 'write your svg here';
}

Filter: uabb_row_separator_bot_options
Description: This filter can be used to control the bottom row separator shapes. One can add his own bottom row separator shape. You can determine the shape in the filter mentioned below. This filter has to go along with the one for SVG shapes and they both need to have the same shape name to see the desired result

// add options to bottom row separator
add_filter ( 'uabb_row_separator_bot_options', 'new_bot_options', 10, 1 );
function new_bot_options( $arr ) {
	$arr[ 'split_custom' ] = 'Split Custom';
	return $arr;
}

Filter: uabb_row_separator_svg_split_custom
Description: This filter will add a new SVG shape

/// Modify the SVG html
add_filter( 'uabb_row_bot_separator_svg_split_custom', 'criticalink_row_svg', 10, 2 );
function criticalink_row_svg( $svg_html, $row ) {
	return 'write your svg here';
}

Filter: enable_uabb_modules_backend
Description: This filter will render UABB Modules in the Dashboard

/// Render UABB Modules in the WordPress Backend
add_filter( 'enable_uabb_modules_backend', 'enable_modules_backend_wp' );
function enable_modules_backend_wp( $val ) {
    return $val = true;
}

Module: Image Carousel

Filter: uabb_image_carousel_sizes
Description: This filter can be used to control the image sizes in the Image Carousle module. One can add his own registered size for these images.

/// Add custom Image Sizes for Image Carousel
function abc($size_arr) {
    $size_arr = array(
        'full' => __( 'Full', 'uabb' ),
       'large' => __( 'Large', 'uabb' ),
       'medium' => __( 'Medium', 'uabb' ),
       'thumbnail' => __( 'Thumbnail', 'uabb' ),
       'my_custom_image_size' => __( 'My Custom Image Size', 'uabb' ),
    );
    return $size_arr;
}
add_filter( 'uabb_image_carousel_sizes', 'abc' ); 
add_image_size( 'my_custom_image_size', 300, 300 );

Module: Woo Products

Filter: uabb_woo_out_of_stock_string
Description: This filter will replace the “OUT OF STOCK” text of products from UABB woo-products grid or carousel.

// Changes the "OUT OF STOCK" message from Woo-Products module to your desired string.
add_filter( 'uabb_woo_out_of_stock_string', 'change_out_of_stock_string' );
function change_out_of_stock_string ($default) { 
    //Return new string
    return 'Coming Soon';   
}

Module: Testimonials

Filter: uabb_testimonial_rating_icon
Description: This filter will help you to replace the rating icon in Testimonial module. Please make sure you have chosen two different icons to style.

The first icon will replace the filled star rating icon. To replace this icon you need a Unicode of the font-awesome icon.

To explore the font-awesome icons. Please visit the font-awesome icon gallery.

// You can change the rating icon in the UABB Testimonial module.
add_filter( 'uabb_testimonial_rating_icon', 'change_testimonial_rating_icon' );
function change_testimonial_rating_icon ($default) {
    // Icon unicode for rating filled star icon
   echo '<style>
        .uabb-testimonial .uabb-rating__input.uabb-checked ~ .uabb-rating__ico:before {
           content: "\f293";
        } 
   </style>'; 
    // Class name for empty star icon.
    return 'fa-bluetooth-b';   
}

We’ll keep updating this page. Keep coming back for more. 🙂

Not the solution you are looking for? Check other articles, or open a support ticket.