Created
March 28, 2020 14:25
-
-
Save Ataurr/4b1403ec483f5d0a7a4d50646f563a98 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
class ElementsKit_Extend_Onepage_Scroll{ | |
public function __construct() { | |
// add_action( 'elementor/element/wp-post/document_settings/after_section_start', [ $this, 'register_controls' ], 10, 2 ); | |
add_action( 'elementor/element/wp-post/document_settings/before_section_end', [ $this, 'register_controls' ], 10, 2 ); | |
} | |
public function register_controls( Controls_Stack $element ) { | |
$element->add_control( | |
'onepagescroll', | |
[ | |
'label' => __( 'Onepage scroll', 'your-plugin' ), | |
'type' => \Elementor\Controls_Manager::SWITCHER, | |
'default' => '', | |
'label_on' => __( 'On', 'your-plugin' ), | |
'label_off' => __( 'Off', 'your-plugin' ), | |
'return_value' => 'on', | |
] | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment