Skip to content

Instantly share code, notes, and snippets.

@Ataurr
Created March 28, 2020 14:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ataurr/4b1403ec483f5d0a7a4d50646f563a98 to your computer and use it in GitHub Desktop.
Save Ataurr/4b1403ec483f5d0a7a4d50646f563a98 to your computer and use it in GitHub Desktop.
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