Adding new style options
The following hook will allow the add of a new accordion option inside the styling tab of every elements of the builder
add_action( 'zionbuilder/schema/style_options', [ $this, 'add_style_options' ] );
public function add_style_options( $options ) {
$my_accordion = $options->get_option( '_styles.pseudo_selectors' );
if ( $my_acc ) {
$this->attach_my_options( $my_accordion );
}
}
public function attach_my_options( $options ) {
$options->add_option(
'new-option',
[
'type' => 'accordion_menu',
'title' => __( 'My option', 'zionbuilder-pro' ),
'description' => __( 'My option contains', 'zionbuilder-pro' ),
]
);
}