PluginProbe ʕ •ᴥ•ʔ
Spider Elements – Premium Elementor Widgets & Addons Library / 1.5.0
Spider Elements – Premium Elementor Widgets & Addons Library v1.5.0
trunk 1.0.0 1.1.0 1.5.0 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.7.0 1.8.0 1.9.0
spider-elements / widgets / Buttons.php
spider-elements / widgets Last commit date
templates 1 year ago Accordion.php 1 year ago Alerts_Box.php 1 year ago Animated_Heading.php 1 year ago Before_after.php 1 year ago Blog_Grid.php 1 year ago Buttons.php 1 year ago Cheat_sheet.php 1 year ago Counter.php 1 year ago Fullscreen_Slider.php 1 year ago Icon_box.php 1 year ago Instagram.php 1 year ago Integrations.php 1 year ago List_Item.php 1 year ago Pricing_Table_Switcher.php 1 year ago Pricing_Table_Tabs.php 1 year ago Tabs.php 1 year ago Team_Carousel.php 1 year ago Testimonial.php 1 year ago Timeline.php 1 year ago Video_Playlist.php 1 year ago Video_Popup.php 1 year ago
Buttons.php
151 lines
1 <?php
2 /**
3 * Use namespace to avoid conflict
4 */
5
6 namespace SPEL\Widgets;
7
8 use Elementor\Icons_Manager;
9 use Elementor\Widget_Base;
10 use Elementor\Controls_Manager;
11 use Elementor\Group_Control_Typography;
12
13 // Exit if accessed directly
14 if ( ! defined( 'ABSPATH' ) ) {
15 exit;
16 }
17
18 /**
19 * Class Alerts_box
20 * @package spider\Widgets
21 * @since 1.0.0
22 */
23 class Buttons extends Widget_Base {
24
25 public function get_name() {
26 return 'spe_buttons'; // ID of the widget (Don't change this name)
27 }
28
29 public function get_title() {
30 return esc_html__( 'Button', 'spider-elements' );
31 }
32
33 public function get_icon() {
34 return 'eicon-button spel-icon';
35 }
36
37 public function get_keywords() {
38 return [ '' ];
39 }
40
41 public function get_categories() {
42 return [ 'spider-elements' ];
43 }
44
45 /**
46 * Name: get_style_depends()
47 * Desc: Register the required CSS dependencies for the frontend.
48 */
49 public function get_style_depends() {
50 return [ '' ];
51 }
52
53 /**
54 * Name: get_script_depends()
55 * Desc: Register the required JS dependencies for the frontend.
56 */
57 public function get_script_depends() {
58 return [ '' ];
59 }
60
61 /**
62 * Name: register_controls()
63 * Desc: Register controls for these widgets
64 * Params: no params
65 * Return: @void
66 * Since: @1.0.0
67 * Package: @spider-elements
68 * Author: spider-themes
69 */
70 protected function register_controls() {
71 $this->elementor_content_control();
72 $this->elementor_style_control();
73 }
74
75
76 /**
77 * Name: elementor_content_control()
78 * Desc: Register the Content Tab output on the Elementor editor.
79 * Params: no params
80 * Return: @void
81 * Since: @1.0.0
82 * Package: @spider-elements
83 * Author: spider-themes
84 */
85 public function elementor_content_control() {
86 //============================= Filter Options =================================== //
87 $this->start_controls_section(
88 'buttons_layout', [
89 'label' => esc_html__( 'Layout', 'spider-elements' ),
90 ]
91 );
92
93 // Style
94 $this->add_control(
95 'style', [
96 'label' => esc_html__( 'Style', 'spider-elements' ),
97 'type' => Controls_Manager::SELECT,
98 'label_block' => true,
99 'options' => [
100 '1' => esc_html__( '01: Scroll Button', 'spider-elements' )
101 ],
102 'default' => '1',
103 ]
104 );
105
106 $this->add_control(
107 'section_id',
108 [
109 'label' => esc_html__( 'Section ID', 'spider-elements' ),
110 'type' => Controls_Manager::TEXT,
111 'placeholder' => esc_html__( 'Type your section ID here', 'spider-elements' ),
112 ]
113 );
114
115 $this->end_controls_section(); //End Filter
116
117 }
118
119
120 /**
121 * Name: elementor_style_control()
122 * Desc: Register the Style Tab output on the Elementor editor.
123 * Params: no params
124 * Return: @void
125 * Since: @1.0.0
126 * Package: @spider-elements
127 * Author: spider-themes
128 */
129 public function elementor_style_control() {
130
131 }
132
133
134 /**
135 * Name: elementor_render()
136 * Desc: Render the widget output on the frontend.
137 * Params: no params
138 * Return: @void
139 * Since: @1.0.0
140 * Package: @spider-elements
141 * Author: spider-themes
142 */
143 protected function render() {
144 $settings = $this->get_settings_for_display();
145 extract( $settings ); // extract all settings array to variables converted to name of key
146
147 //================= Template Parts =================//
148 include "templates/buttons/button-{$settings['style']}.php";
149
150 }
151 }