Last active
February 5, 2020 16:13
-
-
Save temsool/1d47d9405db579707c845542f86a1213 to your computer and use it in GitHub Desktop.
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
<?php | |
if ( !function_exists( 'ch_hide_column_elementor_controls' ) ) { | |
add_action( 'elementor/element/before_section_end' , 'ch_hide_column_elementor_controls', 10, 3 ); | |
function ch_hide_column_elementor_controls( $section, $section_id, $args ) { | |
if( $section_id == 'section_advanced' ) : | |
$section->add_control( | |
'hide_desktop_column', | |
[ | |
'label' => __( 'Hide On Desktop', 'elementor' ), | |
'type' => Elementor\Controls_Manager::SWITCHER, | |
'default' => '', | |
'prefix_class' => 'elementor-', | |
'label_on' => __( 'Hide', 'elementor' ), | |
'label_off' => __( 'Show', 'elementor' ), | |
'return_value' => 'hidden-desktop', | |
] | |
); | |
$section->add_control( | |
'hide_tablet_column', | |
[ | |
'label' => __( 'Hide On Tablet', 'elementor' ), | |
'type' => Elementor\Controls_Manager::SWITCHER, | |
'default' => '', | |
'prefix_class' => 'elementor-', | |
'label_on' => __( 'Hide', 'elementor' ), | |
'label_off' => __( 'Show', 'elementor' ), | |
'return_value' => 'hidden-tablet', | |
] | |
); | |
$section->add_control( | |
'hide_mobile_column', | |
[ | |
'label' => __( 'Hide On Mobile', 'elementor' ), | |
'type' => Elementor\Controls_Manager::SWITCHER, | |
'default' => '', | |
'prefix_class' => 'elementor-', | |
'label_on' => __( 'Hide', 'elementor' ), | |
'label_off' => __( 'Show', 'elementor' ), | |
'return_value' => 'hidden-phone', | |
] | |
); | |
endif; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment