Last active
November 13, 2023 12:24
-
-
Save hmbashar/938df2ebe91afb170a5dfb08b0c635b3 to your computer and use it in GitHub Desktop.
Best way to add control for existing widgets
This file contains hidden or 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
<?php | |
// add color control for tab tringle | |
add_action('elementor/element/before_section_end', function( $section, $section_id, $args ) { | |
if( $section->get_name() == 'nested-tabs' && $section_id == 'section_tabs_style' ){ | |
$section->add_control( | |
'abc-tab-tringle-color' , | |
[ | |
'label' => 'Traingle Color', | |
'type' => Elementor\Controls_Manager::COLOR, | |
'selectors' => [ | |
'{{WRAPPER}}.abc-var-tabs .e-n-tabs-heading > button[aria-selected="true"]:after' => 'border-left-color: {{VALUE}}', | |
], | |
'prefix_class' => 'abc-tab-tringle-color-', | |
] | |
); | |
} | |
}, 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment