Add new style options

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' ),

            ]
        );
    }

Was this article helpful ?

81 people consider this article helpful
Thank you! We will improve this article.

Didn’t find what you’re looking for? Please let us know

Submit a ticket