PluginProbe
Elementor Website Builder – more than just a page builder / 3.0.4
Elementor Website Builder – more than just a page builder v3.0.4
4.3.2 4.3.1 4.3.0 4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 All 455 releases
← All changes | core/kits/documents/tabs/theme-style-buttons.php +28 -58 4.3.0 → 3.0.4 View file →
@@ -2,9 +2,8 @@
2 2
3 3 namespace Elementor\Core\Kits\Documents\Tabs;
4 4
5 5 use Elementor\Controls_Manager;
6 -use Elementor\Group_Control_Background;
7 6 use Elementor\Group_Control_Border;
8 7 use Elementor\Group_Control_Box_Shadow;
9 8 use Elementor\Group_Control_Text_Shadow;
10 9 use Elementor\Group_Control_Typography;
@@ -9,9 +8,9 @@
9 8 use Elementor\Group_Control_Text_Shadow;
10 9 use Elementor\Group_Control_Typography;
11 10
12 11 if ( ! defined( 'ABSPATH' ) ) {
13 - exit; // Exit if accessed directly.
12 + exit; // Exit if accessed directly
14 13 }
15 14
16 15 class Theme_Style_Buttons extends Tab_Base {
17 16
@@ -19,23 +18,11 @@
19 18 return 'theme-style-buttons';
20 19 }
21 20
22 21 public function get_title() {
23 - return esc_html__( 'Buttons', 'elementor' );
22 + return __( 'Buttons', 'elementor' );
24 23 }
25 24
26 - public function get_group() {
27 - return 'theme-style';
28 - }
29 -
30 - public function get_icon() {
31 - return 'eicon-button';
32 - }
33 -
34 - public function get_help_url() {
35 - return 'https://go.elementor.com/global-theme-style-buttons/';
36 - }
37 -
38 25 protected function register_tab_controls() {
39 26 $button_selectors = [
40 27 '{{WRAPPER}} button',
41 28 '{{WRAPPER}} input[type="button"]',
@@ -59,9 +46,9 @@
59 46
60 47 $this->start_controls_section(
61 48 'section_buttons',
62 49 [
63 - 'label' => esc_html__( 'Buttons', 'elementor' ),
50 + 'label' => __( 'Buttons', 'elementor' ),
64 51 'tab' => $this->get_id(),
65 52 ]
66 53 );
67 54
@@ -69,8 +56,9 @@
69 56
70 57 $this->add_group_control(
71 58 Group_Control_Typography::get_type(),
72 59 [
60 + 'label' => __( 'Typography', 'elementor' ),
73 61 'name' => 'button_typography',
74 62 'selector' => $button_selector,
75 63 ]
76 64 );
@@ -87,9 +75,9 @@
87 75
88 76 $this->start_controls_tab(
89 77 'tab_button_normal',
90 78 [
91 - 'label' => esc_html__( 'Normal', 'elementor' ),
79 + 'label' => __( 'Normal', 'elementor' ),
92 80 ]
93 81 );
94 82
95 83 $this->add_control(
@@ -94,9 +82,9 @@
94 82
95 83 $this->add_control(
96 84 'button_text_color',
97 85 [
98 - 'label' => esc_html__( 'Text Color', 'elementor' ),
86 + 'label' => __( 'Text Color', 'elementor' ),
99 87 'type' => Controls_Manager::COLOR,
100 88 'dynamic' => [],
101 89 'selectors' => [
102 90 $button_selector => 'color: {{VALUE}};',
@@ -103,25 +91,16 @@
103 91 ],
104 92 ]
105 93 );
106 94
107 - $this->add_group_control(
108 - Group_Control_Background::get_type(),
95 + $this->add_control(
96 + 'button_background_color',
109 97 [
110 - 'name' => 'button_background',
111 - 'types' => [ 'classic', 'gradient' ],
112 - 'exclude' => [ 'image' ],
113 - 'selector' => $button_selector,
114 - 'fields_options' => [
115 - 'background' => [
116 - 'default' => 'classic',
117 - ],
118 - 'color' => [
119 - 'dynamic' => [],
120 - ],
121 - 'color_b' => [
122 - 'dynamic' => [],
123 - ],
98 + 'label' => __( 'Background Color', 'elementor' ),
99 + 'type' => Controls_Manager::COLOR,
100 + 'dynamic' => [],
101 + 'selectors' => [
102 + $button_selector => 'background-color: {{VALUE}};',
124 103 ],
125 104 ]
126 105 );
127 106
@@ -148,11 +127,11 @@
148 127
149 128 $this->add_control(
150 129 'button_border_radius',
151 130 [
152 - 'label' => esc_html__( 'Border Radius', 'elementor' ),
131 + 'label' => __( 'Border Radius', 'elementor' ),
153 132 'type' => Controls_Manager::DIMENSIONS,
154 - 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ],
133 + 'size_units' => [ 'px', '%' ],
155 134 'selectors' => [
156 135 $button_selector => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
157 136 ],
158 137 ]
@@ -162,9 +141,9 @@
162 141
163 142 $this->start_controls_tab(
164 143 'tab_button_hover',
165 144 [
166 - 'label' => esc_html__( 'Hover', 'elementor' ),
145 + 'label' => __( 'Hover', 'elementor' ),
167 146 ]
168 147 );
169 148
170 149 $this->add_control(
@@ -169,9 +148,9 @@
169 148
170 149 $this->add_control(
171 150 'button_hover_text_color',
172 151 [
173 - 'label' => esc_html__( 'Text Color', 'elementor' ),
152 + 'label' => __( 'Text Color', 'elementor' ),
174 153 'type' => Controls_Manager::COLOR,
175 154 'dynamic' => [],
176 155 'selectors' => [
177 156 $button_hover_selector => 'color: {{VALUE}};',
@@ -178,25 +157,16 @@
178 157 ],
179 158 ]
180 159 );
181 160
182 - $this->add_group_control(
183 - Group_Control_Background::get_type(),
161 + $this->add_control(
162 + 'button_hover_background_color',
184 163 [
185 - 'name' => 'button_hover_background',
186 - 'types' => [ 'classic', 'gradient' ],
187 - 'exclude' => [ 'image' ],
188 - 'selector' => $button_hover_selector,
189 - 'fields_options' => [
190 - 'background' => [
191 - 'default' => 'classic',
192 - ],
193 - 'color' => [
194 - 'dynamic' => [],
195 - ],
196 - 'color_b' => [
197 - 'dynamic' => [],
198 - ],
164 + 'label' => __( 'Background Color', 'elementor' ),
165 + 'type' => Controls_Manager::COLOR,
166 + 'dynamic' => [],
167 + 'selectors' => [
168 + $button_hover_selector => 'background-color: {{VALUE}};',
199 169 ],
200 170 ]
201 171 );
202 172
@@ -223,11 +193,11 @@
223 193
224 194 $this->add_control(
225 195 'button_hover_border_radius',
226 196 [
227 - 'label' => esc_html__( 'Border Radius', 'elementor' ),
197 + 'label' => __( 'Border Radius', 'elementor' ),
228 198 'type' => Controls_Manager::DIMENSIONS,
229 - 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ],
199 + 'size_units' => [ 'px', '%' ],
230 200 'selectors' => [
231 201 $button_hover_selector => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
232 202 ],
233 203 ]
@@ -239,11 +209,11 @@
239 209
240 210 $this->add_responsive_control(
241 211 'button_padding',
242 212 [
243 - 'label' => esc_html__( 'Padding', 'elementor' ),
213 + 'label' => __( 'Padding', 'elementor' ),
244 214 'type' => Controls_Manager::DIMENSIONS,
245 - 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'custom' ],
215 + 'size_units' => [ 'px', 'em', '%' ],
246 216 'selectors' => [
247 217 $button_selector => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
248 218 ],
249 219 'separator' => 'before',