fusion_builder_enabled_elements

fusion_builder_enabled_elements

Applied to an array of enabled elements. Useful for auto enabling or disabling an element regardless of it』s state on Avada Builder > Settings page.
Copy to Clipboardfunction filter_function_name( $elements ) {
// Process $elements here

return $elements;
}
add_filter( 'fusion_builder_enabled_elements', 'filter_function_name' );
​x 1function filter_function_name( $elements ) {2    // Process $elements here3​4    return $elements;5}6add_filter( 'fusion_builder_enabled_elements', 'filter_function_name' );7

fusion_builder_fields

fusion_builder_fields

If you are developing an add-on that requires a custom param type that the Avada Builder doesn』t have, you can use the following filter to add your custom param type to the Avada Builder.
Adding a new param type requires you to provide a param name and the param template file that will be used to generate the output for that param type in the element editor screen.
Basic usage of the filter:
Copy to Clipboardadd_filter( 'fusion_builder_fields', 'add_new_field' );

function add_new_field( $fields ) {
$plugin_dir = plugin_dir_path( __FILE__ );
$fields[] = array( 'param_type', $plugin_dir . 'templates/param_type.php' );
return $fields;
}​x 1add_filter( 'fusion_builder_fields', 'add_new_field' );2​3function add_new_field( $fields ) {4     $plugin_dir = plugin_dir_path( __FILE__ );5     $fields[] = array( 'param_type', $plugin_dir . 'templates/param_type.php' );6     return $fields;7}Once you』ve added the param type to the Avada Builder, you will need to write the template file for it to display. Here』s a sample param file used for radio_button_set param type in the Avada Builder. You need to write the custom param file similar to this.
Copy to Clipboard

xxxxxxxxxx10 1

2 3 4 5 6 7 {{ name }}8 9

10

fusion_builder_get_demo_pages

fusion_builder_get_demo_pages

Applied to Avada Builder demos library. Useful for removing or adding demos to the library.
Copy to Clipboardfunction filter_function_name( $demos ) {
// Process $demos here

return $demos;
}
add_filter( 'fusion_builder_get_demo_pages', 'filter_function_name' );
​x 1function filter_function_name( $demos ) {2    // Process $demos here3​4    return $demos;5}6add_filter( 'fusion_builder_get_demo_pages', 'filter_function_name' );7

fusion_builder_all_elements

fusion_builder_all_elements

Applied to all registered elements before they are added to Avada Builder library. Useful for removing or adding elements to the library.
Copy to Clipboardfunction filter_function_name( $elements ) {
// Process $elements here

return $elements;
}
add_filter( 'fusion_builder_all_elements', 'filter_function_name' );
​x 1function filter_function_name( $elements ) {2    // Process $elements here3​4    return $elements;5}6add_filter( 'fusion_builder_all_elements', 'filter_function_name' );7

fusion_builder_default_args

fusion_builder_default_args

Applied to an array of default settings. Useful for changing default element settings.
Copy to Clipboardfunction change_default_args( $defaults, $element ) {

if ( 'fusion_button' == $element ) {
$defaults['accent_color'] = '#ffffff';
}
}
return $defaults;
}
add_filter( 'fusion_builder_default_args', 'change_default_args', 10, 2 );
​x 1function change_default_args( $defaults, $element ) {2​3    if ( 'fusion_button' == $element ) {4            $defaults['accent_color'] = '#ffffff';5       }6   }7    return $defaults;8}9add_filter( 'fusion_builder_default_args', 'change_default_args', 10, 2 );10

fusion_builder_default_post_types

fusion_builder_default_post_types

Applied to an array of post types that are enabled by default. Useful for enabling or disabling Avada Builder on specific post types by default.
Copy to Clipboardfunction filter_function_name( $post_types ) {
// Process $post_types here

return $post_types;
}
add_filter( 'fusion_builder_default_post_types', 'filter_function_name' );
​x 1function filter_function_name( $post_types ) {2    // Process $post_types here3​4    return $post_types;5}6add_filter( 'fusion_builder_default_post_types', 'filter_function_name' );7