Adding a Button Layout

The Fusion Button Element has built-in functionality that allows it to be expanded with additional layouts. This helps to keep the Fusion UI from getting cluttered with overly similar elements while keeping like-functionality conveniently grouped.

Adding a Button Layout is a simple two step process:

1. Use the add_button_layout filter to define the name and parameters of your button layout in an array. Then give this array a unique key name and add it to the array of defined button layouts that gets passed to the filter.

2. Add a function to return the output of your button layout. This function gets called by the [fsn_button] shortcode and must follow the naming format fsn_get_[button layout key]_button.

Now when you select your button layout from the Type select box in the Button element, the parameters you have defined will be loaded into the element for the user to populate.

Example