fusion_builder_before_init

fusion_builder_before_init

This action hook is fired on Avada Builder initialization. Primarily used for adding elements to Avada Builder.
Copy to Clipboardfunction fusion_element_text() {
fusion_builder_map( array(
‘name’ => esc_attr__( ‘Text Block’, ‘fusion-builder’ ),
‘shortcode’ => ‘fusion_text’,
‘params’ => array(
array(
‘type’ => ‘tinymce’,
‘heading’ => esc_attr__( ‘Content’, ‘fusion-builder’ ),
‘description’ => esc_attr__( ‘Enter some content for this textblock.’, ‘fusion-builder’ ),
‘param_name’ => ‘element_content’,
‘value’ => esc_attr__( ‘Placeholder text’, ‘fusion-builder’ ),
),
),
) );
}
add_action( ‘fusion_builder_before_init’, ‘fusion_element_text’ ); 1function fusion_element_text() {2    fusion_builder_map( array(3        ‘name’            => esc_attr__( ‘Text Block’, ‘fusion-builder’ ),4        ‘shortcode’       => ‘fusion_text’,5        ‘params’          => array(6        array(7            ‘type’        => ‘tinymce’,8            ‘heading’     => esc_attr__( ‘Content’, ‘fusion-builder’ ),9            ‘description’ => esc_attr__( ‘Enter some content for this textblock.’, ‘fusion-builder’ ),10            ‘param_name’  => ‘element_content’,11            ‘value’       => esc_attr__( ‘Placeholder text’, ‘fusion-builder’ ),12           ),13       ),14   ) );15}16add_action( ‘fusion_builder_before_init’, ‘fusion_element_text’ );

fusion_builder_before_content

fusion_builder_before_content

This action hook is fired before Avada Builder layout UI. Can be used to prepend html markup or content before builder layout UI.
Copy to Clipboardfunction my_function() {
$content = ‘your content’;

echo $content;
}
add_action( ‘fusion_builder_before_content’, ‘my_function’ );​x 1function my_function() {2    $content = ‘your content’;3​4    echo $content;5}6add_action( ‘fusion_builder_before_content’, ‘my_function’ );

fusion_builder_after

fusion_builder_after

This action hook is fired after main Avada Builder window. Can be used to append html markup or content after main builder window.
Copy to Clipboardfunction my_function() {
$content = ‘your content’;

echo $content;
}
add_action( ‘fusion_builder_after’, ‘my_function’ );​x 1function my_function() {2    $content = ‘your content’;3​4    echo $content;5}6add_action( ‘fusion_builder_after’, ‘my_function’ );

fusion_builder_after_content

fusion_builder_after_content

This action hook is fired after the Avada Builder layout UI. Can be used to append html markup or content after builder layout UI.
Copy to Clipboardfunction my_function() {
$content = ‘your content’;

echo $content;
}
add_action( ‘fusion_builder_after_content’, ‘my_function’ );​x 1function my_function() {2    $content = ‘your content’;3​4    echo $content;5}6add_action( ‘fusion_builder_after_content’, ‘my_function’ );

fusion_builder_admin_scripts_hook

fusion_builder_admin_scripts_hook

This action hook is fired on Avada Builder initialization. Enqueue java scripts and styles on Avada Builder back end.
Copy to Clipboardfunction my_function() {
wp_enqueue_script( ‘my-script’,’js/my-script.js’, array( ‘jquery’ ), ‘1.0’, true );
}
add_action( ‘fusion_builder_admin_scripts_hook’, ‘my_function’ );
​x 1function my_function() {2    wp_enqueue_script( ‘my-script’,’js/my-script.js’, array( ‘jquery’ ), ‘1.0’, true );3}4add_action( ‘fusion_builder_admin_scripts_hook’, ‘my_function’ );5