Created
November 21, 2017 08:50
-
-
Save majeedraza1/4e086e7bbacf73d52ae3bc60f98d14a7 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 | |
use Elementor\Plugin; | |
use Elementor\Widget_Base; | |
class Shapla_Hero_Slider extends Widget_Base { | |
/** | |
* Retrieve the name. | |
* | |
* @return string The name. | |
*/ | |
public function get_name() { | |
return 'hero-slider'; | |
} | |
/** | |
* Retrieve element title. | |
* | |
* @return string Element title. | |
*/ | |
public function get_title() { | |
return __( 'Hero Slider', 'text_domain' ); | |
} | |
/** | |
* Retrieve element icon. | |
* | |
* @return string Element icon. | |
*/ | |
public function get_icon() { | |
return 'eicon-slideshow'; | |
} | |
/** | |
* Retrieve widget categories. | |
* | |
* @return array Widget categories. | |
*/ | |
public function get_categories() { | |
return [ 'shapla-elements' ]; | |
} | |
/** | |
* Retrieve script dependencies. | |
* Get the list of script dependencies the element requires. | |
* | |
* @return array Widget scripts dependencies. | |
*/ | |
public function get_script_depends() { | |
return [ 'shapla-elementor' ]; | |
} | |
/** | |
* Register controls. | |
* | |
* Used to add new controls to any element type. For example, external | |
* developers use this method to register controls in a widget. | |
* | |
* Should be inherited and register new controls using `add_control()`, | |
* `add_responsive_control()` and `add_group_control()`, inside control | |
* wrappers like `start_controls_section()`, `start_controls_tabs()` and | |
* `start_controls_tab()`. | |
*/ | |
protected function _register_controls() { | |
} | |
/** | |
* Render element. | |
* Generates the final HTML on the frontend. | |
*/ | |
protected function render() { | |
} | |
/** | |
* Render element output in the editor. | |
* Used to generate the live preview, using a Backbone JavaScript template. | |
*/ | |
protected function _content_template() { | |
} | |
} | |
Plugin::instance()->widgets_manager->register_widget_type( new Shapla_Hero_Slider() ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment