PluginProbe ʕ •ᴥ•ʔ
Shortcodes and extra features for Phlox theme / 2.17.4
Shortcodes and extra features for Phlox theme v2.17.4
2.17.21 2.17.20 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.6 1.0.9 1.1.0 1.3.0 1.3.1 1.3.10 1.3.14 1.3.2 1.3.3 1.3.6 1.4.0 1.4.1 1.4.2 1.5.0 1.5.2 1.6.0 1.6.2 1.6.4 1.7.0 1.7.2 2.10.0 2.10.1 2.10.3 2.10.5 2.10.7 2.10.8 2.10.9 2.11.0 2.11.1 2.11.2 2.12.0 2.14.0 2.15.0 2.15.2 2.15.4 2.15.5 2.15.6 2.15.7 2.15.8 2.15.9 2.16.0 2.16.1 2.16.2 2.16.3 2.16.4 2.17.0 2.17.1 2.17.12 2.17.13 2.17.14 2.17.15 2.17.16 2.17.2 2.17.3 2.17.4 2.17.5 2.17.6 2.17.8 2.17.9 2.4.12 2.4.13 2.4.14 2.4.16 2.4.18 2.4.19 2.4.9 2.5.0 2.5.1 2.5.10 2.5.11 2.5.12 2.5.13 2.5.14 2.5.15 2.5.16 2.5.17 2.5.19 2.5.2 2.5.20 2.5.3 2.5.7 2.5.8 2.5.9 2.6.0 2.6.1 2.6.10 2.6.12 2.6.13 2.6.14 2.6.15 2.6.16 2.6.17 2.6.19 2.6.2 2.6.20 2.6.4 2.6.5 2.6.7 2.7.0 2.7.1 2.7.10 2.7.11 2.7.12 2.7.13 2.7.14 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 2.8.0 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.9 2.9.0 2.9.12 2.9.14 2.9.15 2.9.16 2.9.17 2.9.18 2.9.19 2.9.2 2.9.20 2.9.21 2.9.22 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 2.9.8
auxin-elements / includes / elementor / widgets / quote.php
auxin-elements / includes / elementor / widgets Last commit date
theme-elements 1 year ago accordion.php 1 year ago audio.php 4 years ago before-after.php 3 years ago button.php 1 year ago carousel-navigation.php 4 years ago circle-chart.php 1 year ago contact-box.php 4 years ago contact-form.php 1 year ago custom-list.php 1 year ago divider.php 4 years ago gallery.php 1 year ago gmap.php 4 years ago heading-modern.php 1 year ago icon.php 1 year ago image.php 1 year ago mailchimp.php 1 year ago modern-button.php 1 year ago products-grid.php 1 year ago quote.php 1 year ago recent-comments.php 1 year ago recent-posts-grid-carousel.php 1 year ago recent-posts-land-style.php 1 year ago recent-posts-masonry.php 1 year ago recent-posts-tiles-carousel.php 1 year ago recent-posts-tiles.php 1 year ago recent-posts-timeline.php 1 year ago recent-products.php 1 year ago responsive-table.php 1 year ago search.php 4 years ago staff.php 1 year ago svg.php 1 year ago tabs.php 1 year ago testimonial.php 1 year ago text.php 1 year ago touch-slider.php 1 year ago video.php 4 years ago
quote.php
369 lines
1 <?php
2 namespace Auxin\Plugin\CoreElements\Elementor\Elements;
3
4 use Elementor\Plugin;
5 use Elementor\Widget_Base;
6 use Elementor\Controls_Manager;
7 use Elementor\Group_Control_Typography;
8 use Elementor\Core\Kits\Documents\Tabs\Global_Typography;
9 use Elementor\Group_Control_Border;
10
11
12 if ( ! defined( 'ABSPATH' ) ) {
13 exit; // Exit if accessed directly.
14 }
15
16 /**
17 * Elementor 'Quote' widget.
18 *
19 * Elementor widget that displays an 'Quote' with lightbox.
20 *
21 * @since 1.0.0
22 */
23 class Quote extends Widget_Base {
24
25 /**
26 * Get widget name.
27 *
28 * Retrieve 'Quote' widget name.
29 *
30 * @since 1.0.0
31 * @access public
32 *
33 * @return string Widget name.
34 */
35 public function get_name() {
36 return 'aux_blockquote';
37 }
38
39 /**
40 * Get widget title.
41 *
42 * Retrieve 'Quote' widget title.
43 *
44 * @since 1.0.0
45 * @access public
46 *
47 * @return string Widget title.
48 */
49 public function get_title() {
50 return __('Blockquote', 'auxin-elements' );
51 }
52
53 /**
54 * Get widget icon.
55 *
56 * Retrieve 'Quote' widget icon.
57 *
58 * @since 1.0.0
59 * @access public
60 *
61 * @return string Widget icon.
62 */
63 public function get_icon() {
64 return 'eicon-blockquote auxin-badge';
65 }
66
67 /**
68 * Get widget categories.
69 *
70 * Retrieve 'Quote' widget icon.
71 *
72 * @since 1.0.0
73 * @access public
74 *
75 * @return string Widget icon.
76 */
77 public function get_categories() {
78 return array( 'auxin-core' );
79 }
80
81 /**
82 * Register 'Quote' widget controls.
83 *
84 * Adds different input fields to allow the user to change and customize the widget settings.
85 *
86 * @since 1.0.0
87 * @access protected
88 */
89 protected function register_controls() {
90
91 /*-----------------------------------------------------------------------------------*/
92 /* content_section
93 /*-----------------------------------------------------------------------------------*/
94
95 $this->start_controls_section(
96 'content_section',
97 array(
98 'label' => __('Text', 'auxin-elements' )
99 )
100 );
101
102 $this->add_control(
103 'content',
104 array(
105 'label' => __('Content','auxin-elements' ),
106 'description' => __('Enter a text as a quote content.', 'auxin-elements'),
107 'type' => Controls_Manager::WYSIWYG,
108 'placeholder' => __( 'Type your description here', 'auxin-elements')
109 )
110 );
111
112 /*$this->add_control(
113 'type',
114 array(
115 'label' => __('Blockqoute type','auxin-elements' ),
116 'type' => 'aux-visual-select',
117 'style_items' => 'max-width:48%;',
118 'options' => array(
119 'quote-normal' => array(
120 'label' => __('Quote Normal', 'auxin-elements'),
121 'image' => AUXIN_URL . 'images/visual-select/blockquote-normal-1.svg'
122 ),
123 'blockquote-normal' => array(
124 'label' => __('Blockquote Normal', 'auxin-elements'),
125 'image' => AUXIN_URL . 'images/visual-select/blockquote-normal.svg'
126 ),
127 'pullquote-normal' => array(
128 'label' => __('Pullquote Normal', 'auxin-elements'),
129 'image' => AUXIN_URL . 'images/visual-select/pullquote-normal.svg'
130 )
131 ),
132 'default' => 'blockquote-normal'
133 )
134 );*/
135
136 $this->end_controls_section();
137
138 /*-----------------------------------------------------------------------------------*/
139 /* Style section
140 /*-----------------------------------------------------------------------------------*/
141
142 /* Text Style Section
143 /*-------------------------------------*/
144
145 $this->start_controls_section(
146 'text_style_section',
147 array(
148 'label' => __( 'Text', 'auxin-elements' ),
149 'tab' => Controls_Manager::TAB_STYLE
150 )
151 );
152
153 $this->add_responsive_control(
154 'text_align',
155 array(
156 'label' => __('Text alignment', 'auxin-elements'),
157 'type' => Controls_Manager::CHOOSE,
158 'default' => 'inherit',
159 'options' => array(
160 'inherit' => array(
161 'title' => __( 'Default', 'auxin-elements' ),
162 'icon' => 'fa fa-stream',
163 ),
164 'left' => array(
165 'title' => __( 'Left', 'auxin-elements' ),
166 'icon' => 'eicon-text-align-left',
167 ),
168 'center' => array(
169 'title' => __( 'Center', 'auxin-elements' ),
170 'icon' => 'eicon-text-align-center',
171 ),
172 'right' => array(
173 'title' => __( 'Right', 'auxin-elements' ),
174 'icon' => 'eicon-text-align-right',
175 )
176 ),
177 'selectors' => array(
178 '{{WRAPPER}} .aux-elem-quote' => 'text-align: {{VALUE}};'
179 )
180 )
181 );
182
183 $this->add_control(
184 'text_color',
185 array(
186 'label' => __( 'Text Color', 'auxin-elements' ),
187 'type' => Controls_Manager::COLOR,
188 'selectors' => array(
189 '{{WRAPPER}} .aux-elem-quote p' => 'color: {{VALUE}};'
190 )
191 )
192 );
193
194 $this->add_group_control(
195 Group_Control_Typography::get_type(),
196 array(
197 'name' => 'text_typography',
198 'global' => [
199 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
200 ],
201 'selector' => '{{WRAPPER}} .aux-elem-quote p'
202 )
203 );
204
205 $this->end_controls_section();
206
207 /* Quote Symbol Section
208 /*-------------------------------------*/
209
210 $this->start_controls_section(
211 'quote_symbol_style_section',
212 array(
213 'label' => __( 'Quote Symbol', 'auxin-elements' ),
214 'tab' => Controls_Manager::TAB_STYLE
215 )
216 );
217
218 $this->add_control(
219 'quote_symbol',
220 array(
221 'label' => __('Insert quote symbol','auxin-elements' ),
222 'type' => Controls_Manager::SWITCHER,
223 'label_on' => __( 'On', 'auxin-elements' ),
224 'label_off' => __( 'Off', 'auxin-elements' ),
225 'default' => 'yes'
226 )
227 );
228
229 $this->add_control(
230 'quote_symbol_color',
231 array(
232 'label' => __( 'Quote symbol color', 'auxin-elements' ),
233 'type' => Controls_Manager::COLOR,
234 'selectors' => array(
235 '{{WRAPPER}} .aux-quote-symbol:before' => 'color: {{VALUE}};'
236 ),
237 'condition' => array(
238 'quote_symbol' => 'yes'
239 )
240 )
241 );
242
243 $this->add_group_control(
244 Group_Control_Typography::get_type(),
245 array(
246 'name' => 'quote_symbol_typography',
247 'global' => [
248 'default' => Global_Typography::TYPOGRAPHY_TEXT,
249 ],
250 'selector' => '{{WRAPPER}} .aux-quote-symbol:before',
251 'condition' => array(
252 'quote_symbol' => 'yes'
253 )
254 )
255 );
256
257 $this->add_responsive_control(
258 'quote_text_indent',
259 array(
260 'label' => __( 'Text indent', 'auxin-elements' ),
261 'type' => Controls_Manager::SLIDER,
262 'size_units' => array('px','em', 'rem'),
263 'range' => array(
264 'px' => array(
265 'min' => 12,
266 'max' => 200,
267 'step' => 1
268 ),
269 'em' => array(
270 'min' => 1,
271 'max' => 10,
272 'step' => 0.1
273 ),
274 'rem' => array(
275 'min' => 1,
276 'max' => 10,
277 'step' => 0.1
278 )
279 ),
280 'selectors' => array(
281 '{{WRAPPER}} .aux-quote-symbol p:first-child' => 'text-indent: {{SIZE}}{{UNIT}};'
282 ),
283 'condition' => array(
284 'quote_symbol' => 'yes'
285 )
286 )
287 );
288
289 $this->add_responsive_control(
290 'quote_symbol_margin',
291 array(
292 'label' => __( 'Margin', 'auxin-elements' ),
293 'type' => Controls_Manager::DIMENSIONS,
294 'size_units' => array( 'px', 'em', '%' ),
295 'selectors' => array(
296 '{{WRAPPER}} .aux-quote-symbol:before' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
297 )
298 )
299 );
300
301 $this->end_controls_section();
302
303 /* Block Section
304 /*-------------------------------------*/
305
306 $this->start_controls_section(
307 'block_style_section',
308 array(
309 'label' => __( 'Block', 'auxin-elements' ),
310 'tab' => Controls_Manager::TAB_STYLE
311 )
312 );
313
314 $this->add_group_control(
315 Group_Control_Border::get_type(),
316 array(
317 'name' => 'block_border',
318 'selector' => '{{WRAPPER}} .aux-elem-quote',
319 'separator' => 'before'
320 )
321 );
322
323 $this->add_control(
324 'blox_background_color',
325 array(
326 'label' => __( 'Background color', 'auxin-elements' ),
327 'type' => Controls_Manager::COLOR,
328 'selectors' => array(
329 '{{WRAPPER}} .aux-elem-quote' => 'background-color: {{VALUE}};'
330 )
331 )
332 );
333
334 $this->add_responsive_control(
335 'quote_symbol_padding',
336 array(
337 'label' => __( 'Padding', 'auxin-elements' ),
338 'type' => Controls_Manager::DIMENSIONS,
339 'size_units' => array( 'px', 'em', '%' ),
340 'selectors' => array(
341 '{{WRAPPER}} .aux-blockquote-normal' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
342 )
343 )
344 );
345
346 $this->end_controls_section();
347 }
348
349 /**
350 * Render 'Quote' widget output on the frontend.
351 *
352 * @access protected
353 */
354 protected function render() {
355
356 $settings = $this->get_settings_for_display();
357
358 $args = array(
359 'type' => 'blockquote-normal', //$settings['type'],
360 'text_align' => $settings['text_align'],
361 'quote_symbol' => $settings['quote_symbol']
362 );
363
364 // pass the args through the corresponding shortcode callback
365 echo auxin_widget_quote_callback( $args, $settings['content'] );
366 }
367
368 }
369