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

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注