Last active
March 28, 2020 14:24
-
-
Save Ataurr/826b0d80626852fc6260f049f629bb1c to your computer and use it in GitHub Desktop.
Add option in exciting elementor widget
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'elementor/element/button/section_style/before_section_end', function( $element, $args ) { | |
$element->start_injection( [ | |
'at' => 'after', | |
'of' => 'button_type', | |
] ); | |
// add a control | |
$element->add_control( | |
'btn_style', | |
[ | |
'label' => 'Button Styles', | |
'type' => \Elementor\Controls_Manager::SELECT, | |
'options' => [ | |
'fancy' => 'Fancy', | |
'stylish' => 'Stylish', | |
'rounded' => 'Rounded', | |
'square' => 'Square', | |
], | |
'prefix_class' => 'btn-style-', | |
] | |
); | |
$element->end_injection(); | |
}, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment