PluginProbe ʕ •ᴥ•ʔ
Essential Addons for Elementor – Popular Elementor Templates & Widgets / 4.6.6
Essential Addons for Elementor – Popular Elementor Templates & Widgets v4.6.6
6.6.5 6.6.4 6.6.3 5.7.3 5.7.4 5.8.0 5.8.1 5.8.10 5.8.11 5.8.12 5.8.13 5.8.14 5.8.15 5.8.16 5.8.18 5.8.2 5.8.3 5.8.4 5.8.5 5.8.6 5.8.7 5.8.8 5.8.9 5.9.0 5.9.1 5.9.10 5.9.11 5.9.12 5.9.13 5.9.14 5.9.15 5.9.16 5.9.17 5.9.18 5.9.19 5.9.2 5.9.20 5.9.21 5.9.22 5.9.23 5.9.24 5.9.25 5.9.26 5.9.27 5.9.3 5.9.4 5.9.5 5.9.6 5.9.7 5.9.8 5.9.9 6.0.0 6.0.1 6.0.10 6.0.11 6.0.12 6.0.13 6.0.14 6.0.15 6.0.2 6.0.3 6.0.4 6.0.5 6.0.6 6.0.7 6.0.8 6.0.9 6.1.0 6.1.1 6.1.10 6.1.11 trunk 6.1.12 1.0.0 6.1.13 1.0.1 6.1.14 1.1.0 6.1.15 2.0 6.1.17 2.1 6.1.18 2.10.0 6.1.19 2.10.1 6.1.2 2.10.2 6.1.20 2.10.3 6.1.3 2.10.4 6.1.4 2.10.5 6.1.5 2.2.0 6.1.6 2.2.1 6.1.7 2.2.2 6.1.8 2.2.3 6.1.9 2.2.4 6.2.0 2.2.5 6.2.1 2.3.0 6.2.2 2.3.1 6.2.3 2.4.0 6.2.4 2.4.1 6.3.0 2.4.2 6.3.1 2.4.3 6.3.2 2.5.0 6.3.3 2.6.0 6.4.0 2.7.0 6.5.0 2.7.1 6.5.1 2.7.10 6.5.10 2.7.11 6.5.11 2.7.2 6.5.12 2.7.3 6.5.13 2.7.4 6.5.2 2.7.5 6.5.3 2.7.6 6.5.4 2.7.7 6.5.5 2.7.8 6.5.6 2.7.9 6.5.7 2.8.0 6.5.8 2.8.1 6.5.9 2.8.2 6.6.0 2.8.3 6.6.1 2.8.4 6.6.2 2.8.5 2.8.6 2.8.7 2.9.0 2.9.1 2.9.2 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 2.9.8 2.9.9 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.4.1 3.1.5 3.2.0 3.3.0 3.3.1 3.3.2 3.3.3 3.4.0 3.5.0 3.5.1 3.5.2 3.6.0 3.6.1 3.6.2 3.7.0 3.7.1 3.7.2 3.8.0 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.9.0 3.9.1 3.9.2 3.9.3 3.9.4 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.1.0 4.1.1 4.1.2 4.2.0 4.2.1 4.2.2 4.2.3 4.2.4 4.3.0 4.3.1 4.3.2 4.3.3 4.3.4 4.3.5 4.3.6 4.3.7 4.3.8 4.3.9 4.4.0 4.4.1 4.5.0 4.5.1 4.5.2 4.5.3 4.5.4 4.5.5 4.6.0 4.6.1 4.6.2 4.6.3 4.6.4 4.6.5 4.6.6 4.7.0 4.7.1 4.7.2 4.7.3 4.7.4 4.7.5 4.8.0 4.8.1 4.8.2 4.8.3 4.8.4 4.9.0 4.9.1 4.9.2 4.9.3 4.9.4 4.9.5 4.9.6 4.9.7 5.0.0 5.0.1 5.0.10 5.0.11 5.0.12 5.0.13 5.0.2 5.0.3 5.0.4 5.0.5 5.0.6 5.0.7 5.0.8 5.0.9 5.1.0 5.1.1 5.1.2 5.1.3 5.1.4 5.1.5 5.1.6 5.1.7 5.1.8 5.1.9 5.2.0 5.2.1 5.2.2 5.2.3 5.2.4 5.3.0 5.3.1 5.3.2 5.4.6 5.5.5 5.6.5 5.7.2
essential-addons-for-elementor-lite / includes / Elements / Twitter_Feed.php
essential-addons-for-elementor-lite / includes / Elements Last commit date
Adv_Accordion.php 5 years ago Adv_Tabs.php 5 years ago Advanced_Data_Table.php 5 years ago Betterdocs_Category_Box.php 5 years ago Betterdocs_Category_Grid.php 5 years ago Betterdocs_Search_Form.php 5 years ago Caldera_Forms.php 5 years ago Career_Page.php 5 years ago Contact_Form_7.php 5 years ago Content_Ticker.php 5 years ago Countdown.php 5 years ago Creative_Button.php 5 years ago Crowdfundly_All_Campaign.php 5 years ago Crowdfundly_Organization.php 5 years ago Crowdfundly_Single_Campaign.php 5 years ago Cta_Box.php 5 years ago Data_Table.php 5 years ago Dual_Color_Header.php 5 years ago EmbedPress.php 5 years ago Event_Calendar.php 5 years ago Facebook_Feed.php 5 years ago Fancy_Text.php 5 years ago Feature_List.php 5 years ago Filterable_Gallery.php 5 years ago Flip_Box.php 5 years ago FluentForm.php 5 years ago Formstack.php 5 years ago GravityForms.php 5 years ago Image_Accordion.php 5 years ago Info_Box.php 5 years ago Login_Register.php 5 years ago NinjaForms.php 5 years ago Post_Grid.php 5 years ago Post_Timeline.php 5 years ago Pricing_Table.php 5 years ago Product_Grid.php 5 years ago Progress_Bar.php 5 years ago Sticky_Video.php 5 years ago Team_Member.php 5 years ago Testimonial.php 5 years ago Tooltip.php 5 years ago Twitter_Feed.php 5 years ago TypeForm.php 5 years ago WeForms.php 5 years ago Woo_Checkout.php 5 years ago Woo_Product_Carousel.php 5 years ago Woo_Product_Compare.php 5 years ago Woocommerce_Review.php 5 years ago WpForms.php 5 years ago
Twitter_Feed.php
987 lines
1 <?php
2
3 namespace Essential_Addons_Elementor\Elements;
4
5 // If this file is called directly, abort.
6 if (!defined('ABSPATH')) {
7 exit;
8 }
9
10 use \Elementor\Controls_Manager;
11 use \Elementor\Group_Control_Border;
12 use \Elementor\Group_Control_Box_Shadow;
13 use \Elementor\Group_Control_Typography;
14 use \Elementor\Widget_Base;
15
16 class Twitter_Feed extends Widget_Base
17 {
18 use \Essential_Addons_Elementor\Traits\Twitter_Feed;
19
20 public function get_name()
21 {
22 return 'eael-twitter-feed';
23 }
24
25 public function get_title()
26 {
27 return esc_html__('Twitter Feed', 'essential-addons-for-elementor-lite');
28 }
29
30 public function get_icon()
31 {
32 return 'eaicon-twitter-feed';
33 }
34
35 public function get_categories()
36 {
37 return ['essential-addons-elementor'];
38 }
39
40 public function get_keywords()
41 {
42 return [
43 'twitter',
44 'ea twitter feed',
45 'ea twitter gallery',
46 'social media',
47 'twitter embed',
48 'twitter feed',
49 'twitter marketing',
50 'tweet feed',
51 'tweet embed',
52 'ea',
53 'essential addons',
54 ];
55 }
56
57 public function get_custom_help_url()
58 {
59 return 'https://essential-addons.com/elementor/docs/twitter-feed/';
60 }
61
62 public function get_style_depends()
63 {
64 return [
65 'font-awesome-5-all',
66 'font-awesome-4-shim',
67 ];
68 }
69
70 public function get_script_depends()
71 {
72 return [
73 'font-awesome-4-shim',
74 ];
75 }
76
77 protected function _register_controls()
78 {
79 $this->start_controls_section(
80 'eael_section_twitter_feed_acc_settings',
81 [
82 'label' => esc_html__('Account Settings', 'essential-addons-for-elementor-lite'),
83 ]
84 );
85
86 $this->add_control(
87 'eael_twitter_feed_ac_name',
88 [
89 'label' => esc_html__('Account Name', 'essential-addons-for-elementor-lite'),
90 'type' => Controls_Manager::TEXT,
91 'dynamic' => [ 'active' => true ],
92 'default' => '@wpdevteam',
93 'label_block' => false,
94 'description' => esc_html__('Use @ sign with your account name.', 'essential-addons-for-elementor-lite'),
95 ]
96 );
97
98 $this->add_control(
99 'eael_twitter_feed_hashtag_name',
100 [
101 'label' => esc_html__('Hashtag Name', 'essential-addons-for-elementor-lite'),
102 'type' => Controls_Manager::TEXT,
103 'dynamic' => [ 'active' => true ],
104 'label_block' => false,
105 'description' => esc_html__('Remove # sign from your hashtag name.', 'essential-addons-for-elementor-lite'),
106 ]
107 );
108
109 $this->add_control(
110 'eael_twitter_feed_consumer_key',
111 [
112 'label' => esc_html__('Consumer Key', 'essential-addons-for-elementor-lite'),
113 'type' => Controls_Manager::TEXT,
114 'label_block' => false,
115 'default' => 'wwC72W809xRKd9ySwUzXzjkmS',
116 'description' => '<a href="https://apps.twitter.com/app/" target="_blank">Get Consumer Key.</a> Create a new app or select existing app and grab the <b>consumer key.</b>',
117 ]
118 );
119
120 $this->add_control(
121 'eael_twitter_feed_consumer_secret',
122 [
123 'label' => esc_html__('Consumer Secret', 'essential-addons-for-elementor-lite'),
124 'type' => Controls_Manager::TEXT,
125 'label_block' => false,
126 'default' => 'rn54hBqxjve2CWOtZqwJigT3F5OEvrriK2XAcqoQVohzr2UA8h',
127 'description' => '<a href="https://apps.twitter.com/app/" target="_blank">Get Consumer Secret.</a> Create a new app or select existing app and grab the <b>consumer secret.</b>',
128 ]
129 );
130
131 $this->add_control(
132 'eael_twitter_feed_data_cache_limit',
133 [
134 'label' => __('Data Cache Time', 'essential-addons-for-elementor-lite'),
135 'type' => Controls_Manager::NUMBER,
136 'min' => 1,
137 'default' => 60,
138 'description' => __('Cache expiration time (Minutes)', 'essential-addons-for-elementor-lite')
139 ]
140 );
141
142 $this->end_controls_section();
143
144 $this->start_controls_section(
145 'eael_section_twitter_feed_settings',
146 [
147 'label' => esc_html__('Layout Settings', 'essential-addons-for-elementor-lite'),
148 ]
149 );
150
151 $this->add_control(
152 'eael_twitter_feed_type',
153 [
154 'label' => esc_html__('Content Layout', 'essential-addons-for-elementor-lite'),
155 'type' => Controls_Manager::SELECT,
156 'default' => 'masonry',
157 'options' => [
158 'list' => esc_html__('List', 'essential-addons-for-elementor-lite'),
159 'masonry' => esc_html__('Masonry', 'essential-addons-for-elementor-lite'),
160 ],
161 ]
162 );
163
164 $this->add_control(
165 'eael_twitter_feed_type_col_type',
166 [
167 'label' => __('Column Grid', 'essential-addons-for-elementor-lite'),
168 'type' => Controls_Manager::SELECT,
169 'options' => [
170 'col-2' => '2 Columns',
171 'col-3' => '3 Columns',
172 'col-4' => '4 Columns',
173 ],
174 'default' => 'col-3',
175 'condition' => [
176 'eael_twitter_feed_type' => 'masonry',
177 ],
178 ]
179 );
180
181 $this->add_control(
182 'eael_twitter_feed_content_length',
183 [
184 'label' => esc_html__('Content Length', 'essential-addons-for-elementor-lite'),
185 'type' => Controls_Manager::NUMBER,
186 'label_block' => false,
187 'min' => 1,
188 'max' => 400,
189 'default' => 400,
190 ]
191 );
192
193 $this->add_responsive_control(
194 'eael_twitter_feed_column_spacing',
195 [
196 'label' => esc_html__('Column spacing', 'essential-addons-for-elementor-lite'),
197 'type' => Controls_Manager::SLIDER,
198 'range' => [
199 'px' => [
200 'max' => 50,
201 ],
202 ],
203 'default' => [
204 'unit' => 'px',
205 'size' => 10,
206 ],
207 ]
208 );
209
210 $this->add_control(
211 'eael_twitter_feed_post_limit',
212 [
213 'label' => esc_html__('Post Limit', 'essential-addons-for-elementor-lite'),
214 'type' => Controls_Manager::NUMBER,
215 'label_block' => false,
216 'default' => 10,
217 ]
218 );
219
220 $this->add_control(
221 'eael_twitter_feed_media',
222 [
223 'label' => esc_html__('Show Media Elements', 'essential-addons-for-elementor-lite'),
224 'type' => Controls_Manager::SWITCHER,
225 'label_on' => __('yes', 'essential-addons-for-elementor-lite'),
226 'label_off' => __('no', 'essential-addons-for-elementor-lite'),
227 'default' => 'true',
228 'return_value' => 'true',
229 ]
230 );
231
232 $this->end_controls_section();
233
234 $this->start_controls_section(
235 'eael_section_twitter_feed_card_settings',
236 [
237 'label' => esc_html__('Card Settings', 'essential-addons-for-elementor-lite'),
238 ]
239 );
240
241 $this->add_control(
242 'eael_twitter_feed_show_avatar',
243 [
244 'label' => esc_html__('Show Avatar', 'essential-addons-for-elementor-lite'),
245 'type' => Controls_Manager::SWITCHER,
246 'label_on' => __('yes', 'essential-addons-for-elementor-lite'),
247 'label_off' => __('no', 'essential-addons-for-elementor-lite'),
248 'default' => 'true',
249 'return_value' => 'true',
250 ]
251 );
252
253 $this->add_control(
254 'eael_twitter_feed_show_date',
255 [
256 'label' => esc_html__('Show Date', 'essential-addons-for-elementor-lite'),
257 'type' => Controls_Manager::SWITCHER,
258 'label_on' => __('yes', 'essential-addons-for-elementor-lite'),
259 'label_off' => __('no', 'essential-addons-for-elementor-lite'),
260 'default' => 'true',
261 'return_value' => 'true',
262 ]
263 );
264
265 $this->add_control(
266 'eael_twitter_feed_show_read_more',
267 [
268 'label' => esc_html__('Show Read More', 'essential-addons-for-elementor-lite'),
269 'type' => Controls_Manager::SWITCHER,
270 'label_on' => __('yes', 'essential-addons-for-elementor-lite'),
271 'label_off' => __('no', 'essential-addons-for-elementor-lite'),
272 'default' => 'true',
273 'return_value' => 'true',
274 ]
275 );
276
277 $this->add_control(
278 'eael_twitter_feed_show_icon',
279 [
280 'label' => esc_html__('Show Icon', 'essential-addons-for-elementor-lite'),
281 'type' => Controls_Manager::SWITCHER,
282 'label_on' => __('yes', 'essential-addons-for-elementor-lite'),
283 'label_off' => __('no', 'essential-addons-for-elementor-lite'),
284 'default' => 'true',
285 'return_value' => 'true',
286 ]
287 );
288
289 $this->end_controls_section();
290
291 if (!apply_filters('eael/pro_enabled', false)) {
292 $this->start_controls_section(
293 'eael_section_pro',
294 [
295 'label' => __('Go Premium for More Features', 'essential-addons-for-elementor-lite'),
296 ]
297 );
298
299 $this->add_control(
300 'eael_control_get_pro',
301 [
302 'label' => __('Unlock more possibilities', 'essential-addons-for-elementor-lite'),
303 'type' => Controls_Manager::CHOOSE,
304 'options' => [
305 '1' => [
306 'title' => '',
307 'icon' => 'fa fa-unlock-alt',
308 ],
309 ],
310 'default' => '1',
311 'description' => '<span class="pro-feature"> Get the <a href="https://wpdeveloper.net/in/upgrade-essential-addons-elementor" target="_blank">Pro version</a> for more stunning elements and customization options.</span>',
312 ]
313 );
314
315 $this->end_controls_section();
316 }
317
318 /**
319 * -------------------------------------------
320 * Tab Style (Twitter Feed Card Style)
321 * -------------------------------------------
322 */
323 $this->start_controls_section(
324 'eael_section_twitter_feed_card_style_settings',
325 [
326 'label' => esc_html__('Card Style', 'essential-addons-for-elementor-lite'),
327 'tab' => Controls_Manager::TAB_STYLE,
328 ]
329 );
330
331 $this->add_control(
332 'eael_twitter_feed_card_choose_style',
333 [
334 'label' => __('Choose Style', 'essential-addons-for-elementor-lite'),
335 'type' => \Elementor\Controls_Manager::SELECT,
336 'default' => '',
337 'options' => [
338 '' => __('Default Style', 'essential-addons-for-elementor-lite'),
339 'two' => __('Style Two (right icon)', 'essential-addons-for-elementor-lite'),
340 'three' => __('Style Three', 'essential-addons-for-elementor-lite'),
341 ],
342 ]
343 );
344
345 $this->add_control(
346 'eael_twitter_feed_card_left_icon_alignment',
347 [
348 'label' => __('Left Icon Alignment', 'essential-addons-for-elementor-lite'),
349 'type' => \Elementor\Controls_Manager::CHOOSE,
350 'options' => [
351 'flex-start' => [
352 'title' => __('Top', 'essential-addons-for-elementor-lite'),
353 'icon' => 'fa fa-align-left',
354 ],
355 'center' => [
356 'title' => __('Middle', 'essential-addons-for-elementor-lite'),
357 'icon' => 'fa fa-align-center',
358 ],
359 'flex-end' => [
360 'title' => __('Bottom', 'essential-addons-for-elementor-lite'),
361 'icon' => 'fa fa-align-right',
362 ],
363 ],
364 'default' => 'center',
365 'selectors' => [
366 '{{WRAPPER}} .eael-twitter-feed-entry-iconwrap' => 'align-self: {{VALUE}};',
367 ],
368 'condition' => [
369 'eael_twitter_feed_card_choose_style' => 'three',
370 ],
371 ]
372 );
373
374 $this->add_control(
375 'eael_twitter_feed_card_is_gradient_bg',
376 [
377 'label' => __('Use gradient Background!', 'essential-addons-for-elementor-lite'),
378 'type' => \Elementor\Controls_Manager::SWITCHER,
379 'label_on' => __('Show', 'essential-addons-for-elementor-lite'),
380 'label_off' => __('Hide', 'essential-addons-for-elementor-lite'),
381 'return_value' => 'yes',
382 ]
383 );
384
385 $this->add_group_control(
386 \Elementor\Group_Control_Background::get_type(),
387 [
388 'name' => 'eael_twitter_feed_card_gradient_bg',
389 'label' => __('Background', 'essential-addons-for-elementor-lite'),
390 'types' => ['classic', 'gradient'],
391 'selector' => '{{WRAPPER}} .eael-twitter-feed-item-inner',
392 'condition' => [
393 'eael_twitter_feed_card_is_gradient_bg' => 'yes',
394 ],
395 ]
396 );
397
398 $this->add_control(
399 'eael_twitter_feed_card_bg_color',
400 [
401 'label' => esc_html__('Background Color', 'essential-addons-for-elementor-lite'),
402 'type' => Controls_Manager::COLOR,
403 'default' => '',
404 'selectors' => [
405 '{{WRAPPER}} .eael-twitter-feed-item-inner' => 'background-color: {{VALUE}};',
406 ],
407 'condition' => [
408 'eael_twitter_feed_card_is_gradient_bg' => '',
409 ],
410 ]
411 );
412
413 $this->add_responsive_control(
414 'eael_twitter_feed_card_inner_padding',
415 [
416 'label' => esc_html__('Main Card Padding', 'essential-addons-for-elementor-lite'),
417 'type' => Controls_Manager::DIMENSIONS,
418 'size_units' => ['px', 'em', '%'],
419 'selectors' => [
420 '{{WRAPPER}} .eael-twitter-feed-item-inner' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
421 ],
422 'condition' => [
423 'eael_twitter_feed_card_choose_style' => 'three',
424 ],
425 ]
426 );
427
428 $this->add_responsive_control(
429 'eael_twitter_feed_card_container_padding',
430 [
431 'label' => esc_html__('Padding', 'essential-addons-for-elementor-lite'),
432 'type' => Controls_Manager::DIMENSIONS,
433 'size_units' => ['px', 'em', '%'],
434 'selectors' => [
435 '{{WRAPPER}} .eael-twitter-feed-item-header' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} 0 {{LEFT}}{{UNIT}};',
436 '{{WRAPPER}} .eael-twitter-feed-item-content' => 'padding: 0 {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
437 ],
438 'condition' => [
439 'eael_twitter_feed_card_choose_style!' => 'three',
440 ],
441 ]
442 );
443
444 $this->add_group_control(
445 Group_Control_Border::get_type(),
446 [
447 'name' => 'eael_twitter_feed_card_border',
448 'label' => esc_html__('Border', 'essential-addons-for-elementor-lite'),
449 'selector' => '{{WRAPPER}} .eael-twitter-feed-item-inner',
450 ]
451 );
452
453 $this->add_control(
454 'eael_twitter_feed_card_border_radius',
455 [
456 'label' => esc_html__('Border Radius', 'essential-addons-for-elementor-lite'),
457 'type' => Controls_Manager::SLIDER,
458 'range' => [
459 'px' => [
460 'max' => 500,
461 ],
462 ],
463 'selectors' => [
464 '{{WRAPPER}} .eael-twitter-feed-item-inner' => 'border-radius: {{SIZE}}px;',
465 ],
466 ]
467 );
468
469 $this->add_group_control(
470 Group_Control_Box_Shadow::get_type(),
471 [
472 'name' => 'eael_twitter_feed_card_shadow',
473 'selector' => '{{WRAPPER}} .eael-twitter-feed-item-inner',
474 ]
475 );
476 $this->add_control(
477 'eael_twitter_feed_card_left_icon_heading',
478 [
479 'label' => __('Left Icon Area', 'essential-addons-for-elementor-lite'),
480 'type' => \Elementor\Controls_Manager::HEADING,
481 'separator' => 'after',
482 'condition' => [
483 'eael_twitter_feed_card_choose_style' => 'three',
484 ],
485 ]
486 );
487 $this->add_responsive_control(
488 'eael_twitter_feed_card_item_left_padding',
489 [
490 'label' => esc_html__('Padding', 'essential-addons-for-elementor-lite'),
491 'type' => Controls_Manager::DIMENSIONS,
492 'size_units' => ['px', 'em', '%'],
493 'selectors' => [
494 '{{WRAPPER}} .eael-twitter-feed-item-style-three .eael-twitter-feed-item-inner .eael-twitter-feed-entry-iconwrap' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
495 ],
496 'default' => [
497 'top' => '10',
498 'right' => '10',
499 'bottom' => '10',
500 'left' => '10',
501 'unit' => 'px',
502 'isLinked' => true,
503 ],
504 'condition' => [
505 'eael_twitter_feed_card_choose_style' => 'three',
506 ],
507 ]
508 );
509 $this->add_control(
510 'eael_twitter_feed_card_right_content_heading',
511 [
512 'label' => __('Right Content Area', 'essential-addons-for-elementor-lite'),
513 'type' => \Elementor\Controls_Manager::HEADING,
514 'separator' => 'after',
515 'condition' => [
516 'eael_twitter_feed_card_choose_style' => 'three',
517 ],
518 ]
519 );
520 $this->add_responsive_control(
521 'eael_twitter_feed_card_item_right_padding',
522 [
523 'label' => esc_html__('Padding', 'essential-addons-for-elementor-lite'),
524 'type' => Controls_Manager::DIMENSIONS,
525 'size_units' => ['px', 'em', '%'],
526 'selectors' => [
527 '{{WRAPPER}} .eael-twitter-feed-item-style-three .eael-twitter-feed-item-inner .eael-twitter-feed-entry-contentwrap' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
528 ],
529 'condition' => [
530 'eael_twitter_feed_card_choose_style' => 'three',
531 ],
532 ]
533 );
534 $this->add_group_control(
535 \Elementor\Group_Control_Border::get_type(),
536 [
537 'name' => 'eael_twitter_feed_card_item_right_border',
538 'label' => __('Border', 'essential-addons-for-elementor-lite'),
539 'selector' => '{{WRAPPER}} .eael-twitter-feed-item-style-three .eael-twitter-feed-item-inner .eael-twitter-feed-entry-contentwrap',
540 'condition' => [
541 'eael_twitter_feed_card_choose_style' => 'three',
542 ]
543 ]
544 );
545
546 $this->add_control(
547 'eael_twitter_feed_card_item_right_border_radius',
548 [
549 'label' => esc_html__('Border Radius', 'essential-addons-for-elementor-lite'),
550 'type' => Controls_Manager::DIMENSIONS,
551 'size_units' => ['px', 'em', '%'],
552 'selectors' => [
553 '{{WRAPPER}} .eael-twitter-feed-item-style-three .eael-twitter-feed-item-inner .eael-twitter-feed-entry-contentwrap' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
554 ],
555 'condition' => [
556 'eael_twitter_feed_card_choose_style' => 'three',
557 ],
558 ]
559 );
560
561 $this->end_controls_section();
562
563 /**
564 * -------------------------------------------
565 * Tab Style (Card Hover Style)
566 * -------------------------------------------
567 */
568 $this->start_controls_section(
569 'eael_section_twitter_feed_card_hover_settings',
570 [
571 'label' => esc_html__('Card Hover Style', 'essential-addons-for-elementor-lite'),
572 'tab' => Controls_Manager::TAB_STYLE,
573 ]
574 );
575 $this->add_control(
576 'eael_twitter_feed_card_hover_title_color',
577 [
578 'label' => __('Title Color', 'essential-addons-for-elementor-lite'),
579 'type' => \Elementor\Controls_Manager::COLOR,
580 'selectors' => [
581 '{{WRAPPER}} .eael-twitter-feed-item-inner:hover .eael-twitter-feed-item-author' => 'color: {{VALUE}}',
582 ],
583 ]
584 );
585 $this->add_control(
586 'eael_twitter_feed_card_hover_content_color',
587 [
588 'label' => __('Content Color', 'essential-addons-for-elementor-lite'),
589 'type' => \Elementor\Controls_Manager::COLOR,
590 'selectors' => [
591 '{{WRAPPER}} .eael-twitter-feed-item-inner:hover .eael-twitter-feed-item-content p' => 'color: {{VALUE}}',
592 ],
593 ]
594 );
595 $this->add_control(
596 'eael_twitter_feed_card_hover_link_color',
597 [
598 'label' => __('Link Color', 'essential-addons-for-elementor-lite'),
599 'type' => \Elementor\Controls_Manager::COLOR,
600 'selectors' => [
601 '{{WRAPPER}} .eael-twitter-feed-item-inner:hover .eael-twitter-feed-item-content a' => 'color: {{VALUE}}',
602 ],
603 ]
604 );
605 $this->add_control(
606 'eael_twitter_feed_card_hover_date_color',
607 [
608 'label' => __('Date Color', 'essential-addons-for-elementor-lite'),
609 'type' => \Elementor\Controls_Manager::COLOR,
610 'selectors' => [
611 '{{WRAPPER}} .eael-twitter-feed-item-inner:hover .eael-twitter-feed-item-header .eael-twitter-feed-item-date' => 'color: {{VALUE}}',
612 ],
613 ]
614 );
615 $this->add_control(
616 'eael_twitter_feed_card_hover_icon_color',
617 [
618 'label' => __('Icon Color', 'essential-addons-for-elementor-lite'),
619 'type' => \Elementor\Controls_Manager::COLOR,
620 'selectors' => [
621 '{{WRAPPER}} .eael-twitter-feed-item-inner:hover .eael-twitter-feed-item-icon' => 'color: {{VALUE}}',
622 ],
623 ]
624 );
625
626 $this->add_control(
627 'eael_twitter_feed_card_border_hover_color',
628 [
629 'label' => __('Border Color', 'essential-addons-for-elementor-lite'),
630 'type' => \Elementor\Controls_Manager::COLOR,
631 'selectors' => [
632 '{{WRAPPER}} .eael-twitter-feed-item-inner:hover' => 'border-color: {{VALUE}}',
633 ],
634 ]
635 );
636
637 $this->add_group_control(
638 \Elementor\Group_Control_Background::get_type(),
639 [
640 'name' => 'eael_twitter_feed_card_hover_bg',
641 'label' => __('Background', 'essential-addons-for-elementor-lite'),
642 'types' => ['classic', 'gradient'],
643 'selector' => '{{WRAPPER}} .eael-twitter-feed-item-inner:hover',
644 ]
645 );
646
647 $this->add_group_control(
648 \Elementor\Group_Control_Box_Shadow::get_type(),
649 [
650 'name' => 'eael_twitter_feed_card_hover_shadow',
651 'label' => __('Box Shadow', 'essential-addons-for-elementor-lite'),
652 'selector' => '{{WRAPPER}} .eael-twitter-feed-item-inner:hover',
653 ]
654 );
655
656 $this->end_controls_section();
657
658 /**
659 * -------------------------------------------
660 * Tab Style (Twitter Feed Typography Style)
661 * -------------------------------------------
662 */
663 $this->start_controls_section(
664 'eael_section_twitter_feed_card_typo_settings',
665 [
666 'label' => esc_html__('Color &amp; Typography', 'essential-addons-for-elementor-lite'),
667 'tab' => Controls_Manager::TAB_STYLE,
668 ]
669 );
670
671 $this->add_control(
672 'eael_twitter_feed_title_heading',
673 [
674 'label' => esc_html__('Title Style', 'essential-addons-for-elementor-lite'),
675 'type' => Controls_Manager::HEADING,
676 ]
677 );
678
679 $this->add_control(
680 'eael_twitter_feed_title_color',
681 [
682 'label' => esc_html__('Color', 'essential-addons-for-elementor-lite'),
683 'type' => Controls_Manager::COLOR,
684 'default' => '',
685 'selectors' => [
686 '{{WRAPPER}} .eael-twitter-feed-item .eael-twitter-feed-item-author' => 'color: {{VALUE}};',
687 ],
688 ]
689 );
690
691 $this->add_group_control(
692 Group_Control_Typography::get_type(),
693 [
694 'name' => 'eael_twitter_feed_title_typography',
695 'selector' => '{{WRAPPER}} .eael-twitter-feed-item .eael-twitter-feed-item-author',
696 ]
697 );
698 // Content Style
699 $this->add_control(
700 'eael_twitter_feed_content_heading',
701 [
702 'label' => esc_html__('Content Style', 'essential-addons-for-elementor-lite'),
703 'type' => Controls_Manager::HEADING,
704 'separator' => 'before',
705 ]
706 );
707
708 $this->add_control(
709 'eael_twitter_feed_content_color',
710 [
711 'label' => esc_html__('Color', 'essential-addons-for-elementor-lite'),
712 'type' => Controls_Manager::COLOR,
713 'default' => '',
714 'selectors' => [
715 '{{WRAPPER}} .eael-twitter-feed-item .eael-twitter-feed-item-content p' => 'color: {{VALUE}};',
716 ],
717 ]
718 );
719
720 $this->add_group_control(
721 Group_Control_Typography::get_type(),
722 [
723 'name' => 'eael_twitter_feed_content_typography',
724 'selector' => '{{WRAPPER}} .eael-twitter-feed-item .eael-twitter-feed-item-content p',
725 ]
726 );
727
728 // Content Link Style
729 $this->add_control(
730 'eael_twitter_feed_content_link_heading',
731 [
732 'label' => esc_html__('Link Style', 'essential-addons-for-elementor-lite'),
733 'type' => Controls_Manager::HEADING,
734 'separator' => 'before',
735 ]
736 );
737
738 $this->add_control(
739 'eael_twitter_feed_content_link_color',
740 [
741 'label' => esc_html__('Color', 'essential-addons-for-elementor-lite'),
742 'type' => Controls_Manager::COLOR,
743 'default' => '',
744 'selectors' => [
745 '{{WRAPPER}} .eael-twitter-feed-item .eael-twitter-feed-item-content a' => 'color: {{VALUE}};',
746 ],
747 ]
748 );
749
750 $this->add_control(
751 'eael_twitter_feed_content_link_hover_color',
752 [
753 'label' => esc_html__('Hover Color', 'essential-addons-for-elementor-lite'),
754 'type' => Controls_Manager::COLOR,
755 'default' => '',
756 'selectors' => [
757 '{{WRAPPER}} .eael-twitter-feed-item .eael-twitter-feed-item-content a:hover' => 'color: {{VALUE}};',
758 ],
759 ]
760 );
761
762 $this->add_group_control(
763 Group_Control_Typography::get_type(),
764 [
765 'name' => 'eael_twitter_feed_content_link_typography',
766 'selector' => '{{WRAPPER}} .eael-twitter-feed-item .eael-twitter-feed-item-content a',
767 ]
768 );
769
770 $this->end_controls_section();
771
772 /**
773 * -------------------------------------------
774 * Tab Style (avatar style)
775 * -------------------------------------------
776 */
777 $this->start_controls_section(
778 'eael_section_twitter_feed_avatar_style',
779 [
780 'label' => esc_html__('Avatar', 'essential-addons-for-elementor-lite'),
781 'tab' => Controls_Manager::TAB_STYLE,
782 'condition' => [
783 'eael_twitter_feed_show_avatar' => 'true',
784 ],
785 ]
786 );
787
788 $this->add_control(
789 'eael_twitter_feed_avatar_width',
790 [
791 'label' => __('Width', 'essential-addons-for-elementor-lite'),
792 'type' => Controls_Manager::SLIDER,
793 'size_units' => ['px', '%'],
794 'range' => [
795 'px' => [
796 'min' => 0,
797 'max' => 1000,
798 'step' => 5,
799 ],
800 '%' => [
801 'min' => 0,
802 'max' => 100,
803 ],
804 ],
805 'default' => [
806 'unit' => 'px',
807 'size' => 38,
808 ],
809 'selectors' => [
810 '{{WRAPPER}} .eael-twitter-feed-item .eael-twitter-feed-item-avatar img' => 'width: {{SIZE}}{{UNIT}};',
811 ],
812 ]
813 );
814
815 $this->add_control(
816 'eael_twitter_feed_avatar_height',
817 [
818 'label' => __('Height', 'essential-addons-for-elementor-lite'),
819 'type' => Controls_Manager::SLIDER,
820 'size_units' => ['px', '%'],
821 'range' => [
822 'px' => [
823 'min' => 0,
824 'max' => 1000,
825 'step' => 5,
826 ],
827 '%' => [
828 'min' => 0,
829 'max' => 100,
830 ],
831 ],
832 'selectors' => [
833 '{{WRAPPER}} .eael-twitter-feed-item .eael-twitter-feed-item-avatar img' => 'height: {{SIZE}}{{UNIT}};',
834 ],
835 ]
836 );
837
838 $this->add_control(
839 'eael_twitter_feed_avatar_style',
840 [
841 'label' => __('Avatar Style', 'essential-addons-for-elementor-lite'),
842 'type' => Controls_Manager::SELECT,
843 'options' => [
844 'circle' => 'Circle',
845 'square' => 'Square',
846 ],
847 'default' => 'circle',
848 ]
849 );
850
851 $this->add_group_control(
852 \Elementor\Group_Control_Border::get_type(),
853 [
854 'name' => 'eael_twitter_feed_avatar_border',
855 'label' => __('Border', 'essential-addons-for-elementor-lite'),
856 'selector' => '{{WRAPPER}} .eael-twitter-feed-item .eael-twitter-feed-item-avatar img',
857 ]
858 );
859 $this->add_group_control(
860 \Elementor\Group_Control_Box_Shadow::get_type(),
861 [
862 'name' => 'eael_twitter_feed_avatar_shadow',
863 'label' => __('Box Shadow', 'essential-addons-for-elementor-lite'),
864 'selector' => '{{WRAPPER}} .eael-twitter-feed-item .eael-twitter-feed-item-avatar img',
865 ]
866 );
867
868 $this->end_controls_section();
869 /**
870 * -------------------------------------------
871 * Tab Style (Icon style)
872 * -------------------------------------------
873 */
874 $this->start_controls_section(
875 'eael_section_twitter_feed_icon_style',
876 [
877 'label' => esc_html__('Icon', 'essential-addons-for-elementor-lite'),
878 'tab' => Controls_Manager::TAB_STYLE,
879 'condition' => [
880 'eael_twitter_feed_show_icon' => 'true',
881 ],
882 ]
883 );
884
885 $this->add_control(
886 'eael_section_twitter_feed_icon_size',
887 [
888 'label' => __('Font Size', 'essential-addons-for-elementor-lite'),
889 'type' => Controls_Manager::SLIDER,
890 'size_units' => ['px', '%'],
891 'range' => [
892 'px' => [
893 'min' => 0,
894 'max' => 1000,
895 'step' => 5,
896 ],
897 '%' => [
898 'min' => 0,
899 'max' => 100,
900 ],
901 ],
902 'selectors' => [
903 '{{WRAPPER}} .eael-twitter-feed-item .eael-twitter-feed-item-icon' => 'font-size: {{SIZE}}{{UNIT}};',
904 ],
905 ]
906 );
907
908 $this->add_control(
909 'eael_section_twitter_feed_icon_color',
910 [
911 'label' => __('Color', 'essential-addons-for-elementor-lite'),
912 'type' => \Elementor\Controls_Manager::COLOR,
913 'scheme' => [
914 'type' => \Elementor\Core\Schemes\Color::get_type(),
915 'value' => \Elementor\Core\Schemes\Color::COLOR_1,
916 ],
917 'selectors' => [
918 '{{WRAPPER}} .eael-twitter-feed-item .eael-twitter-feed-item-icon' => 'color: {{VALUE}}',
919 ],
920 ]
921 );
922
923 $this->end_controls_section();
924 }
925
926 protected function render()
927 {
928 $settings = $this->get_settings_for_display();
929 $feedcolumnspacing = $this->get_settings('eael_twitter_feed_column_spacing')['size'];
930
931 echo '<div class="eael-twitter-feed eael-twitter-feed-' . $this->get_id() . ' eael-twitter-feed-' . $settings['eael_twitter_feed_type'] . ' eael-twitter-feed-' . $settings['eael_twitter_feed_type_col_type'] . ' clearfix" data-gutter="' . $settings['eael_twitter_feed_column_spacing']['size'] . '">
932 ' . $this->twitter_feed_render_items($this->get_id(), $settings) . '
933 </div>';
934
935 echo '<style>
936 .eael-twitter-feed-' . $this->get_id() . '.eael-twitter-feed-masonry.eael-twitter-feed-col-2 .eael-twitter-feed-item {
937 width: calc(50% - ' . ceil($feedcolumnspacing / 2) . 'px);
938 }
939 .eael-twitter-feed-' . $this->get_id() . '.eael-twitter-feed-masonry.eael-twitter-feed-col-3 .eael-twitter-feed-item {
940 width: calc(33.33% - ' . ceil($settings['eael_twitter_feed_column_spacing']['size'] * 2 / 3) . 'px);
941 }
942 .eael-twitter-feed-' . $this->get_id() . '.eael-twitter-feed-masonry.eael-twitter-feed-col-4 .eael-twitter-feed-item {
943 width: calc(25% - ' . ceil($feedcolumnspacing * 3 / 4) . 'px);
944 }
945
946 .eael-twitter-feed-' . $this->get_id() . '.eael-twitter-feed-col-2 .eael-twitter-feed-item,
947 .eael-twitter-feed-' . $this->get_id() . '.eael-twitter-feed-col-3 .eael-twitter-feed-item,
948 .eael-twitter-feed-' . $this->get_id() . '.eael-twitter-feed-col-4 .eael-twitter-feed-item {
949 margin-bottom: ' . $settings['eael_twitter_feed_column_spacing']['size'] . 'px;
950 }
951 @media only screen and (min-width: 768px) and (max-width: 992px) {
952 .eael-twitter-feed-' . $this->get_id() . '.eael-twitter-feed-masonry.eael-twitter-feed-col-3 .eael-twitter-feed-item,
953 .eael-twitter-feed-' . $this->get_id() . '.eael-twitter-feed-masonry.eael-twitter-feed-col-4 .eael-twitter-feed-item {
954 width: calc(50% - ' . ceil($feedcolumnspacing / 2) . 'px);
955 }
956 }
957 </style>';
958 if (\Elementor\Plugin::instance()->editor->is_edit_mode()) {
959 echo '<script type="text/javascript">
960 jQuery(document).ready(function($) {
961 $(".eael-twitter-feed").each(function() {
962 var $node_id = "' . $this->get_id() . '",
963 $scope = $(".elementor-element-"+$node_id+""),
964 $gutter = $(".eael-twitter-feed", $scope).data("gutter"),
965 $settings = {
966 itemSelector: ".eael-twitter-feed-item",
967 percentPosition: true,
968 masonry: {
969 columnWidth: ".eael-twitter-feed-item",
970 gutter: $gutter
971 }
972 };
973
974 // init isotope
975 $twitter_feed_gallery = $(".eael-twitter-feed", $scope).isotope($settings);
976
977 // layout gal, while images are loading
978 $twitter_feed_gallery.imagesLoaded().progress(function() {
979 $twitter_feed_gallery.isotope("layout");
980 });
981 });
982 });
983 </script>';
984 }
985 }
986 }
987