PluginProbe
UiCore Elements – Free widgets and templates for Elementor / 1.3.18
UiCore Elements – Free widgets and templates for Elementor v1.3.18
1.3.18 1.3.17 1.3.16 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.2.0 1.2.1 1.2.2 1.2.3 All 42 releases
← All changes | includes/widgets/testimonial-grid.php +27 -18 1.2.0 → 1.3.18 View file →
@@ -1,6 +1,8 @@
1 1 <?php
2 +
2 3 namespace UiCoreElements;
4 +
3 5 use Elementor\Controls_Manager;
4 6 use UiCoreElements\UiCoreWidget;
5 7 use UiCoreElements\Utils\Testimonial_Trait;
6 8 use UiCoreElements\Utils\Animation_Trait;
@@ -52,9 +54,9 @@
52 54 'grid',
53 55 'animation', // hover animations
54 56 'entrance', // entrance basic style
55 57 ];
56 - if(!class_exists('\UiCore\Core') && !class_exists('\UiCoreAnimate\Base')){
58 + if (!class_exists('\UiCore\Core') && !class_exists('\UiCoreAnimate\Base')) {
57 59 $styles['e-animations'] = [ // entrance animations
58 60 'external' => true,
59 61 ];
60 62 }
@@ -74,8 +76,13 @@
74 76 ],
75 77 ]
76 78 ];
77 79 }
80 + public function has_widget_inner_wrapper(): bool
81 + {
82 + // TODO: remove after Optmized Markup experiment is merged to the core
83 + return ! \Elementor\Plugin::$instance->experiments->is_feature_active('e_optimized_markup');
84 + }
78 85 protected function register_controls()
79 86 {
80 87
81 88 $this->TRAIT_register_testimonial_repeater_controls('Testimonial Grid Items'); // Repeater Controls
@@ -87,23 +94,23 @@
87 94 'tab' => Controls_Manager::TAB_CONTENT,
88 95 ]
89 96 );
90 97
91 - $this->TRAIT_register_specific_testimonial_controls('layout');
92 - $this->TRAIT_register_grid_layout_controls();
93 - $this->TRAIT_register_testimonial_additional_controls(); // Content Additional Controls
98 + $this->TRAIT_register_specific_testimonial_controls('layout');
99 + $this->TRAIT_register_grid_layout_controls();
100 + $this->TRAIT_register_testimonial_additional_controls(); // Content Additional Controls
94 101
95 102 $this->end_controls_section();
96 103
97 104 $this->start_controls_section(
98 - 'section_style_review_items',
99 - [
100 - 'label' => esc_html__( 'Items', 'uicore-elements' ),
101 - 'tab' => Controls_Manager::TAB_STYLE,
102 - ]
103 - );
105 + 'section_style_review_items',
106 + [
107 + 'label' => esc_html__('Items', 'uicore-elements'),
108 + 'tab' => Controls_Manager::TAB_STYLE,
109 + ]
110 + );
104 111
105 - $this->TRAIT_register_all_item_style_controls(false);
112 + $this->TRAIT_register_all_item_style_controls(false);
106 113
107 114 $this->end_controls_section();
108 115
109 116 $this->TRAIT_register_style_controls(); // Other Components Style Controls
@@ -115,9 +122,9 @@
115 122 'tab' => Controls_Manager::TAB_STYLE,
116 123 ]
117 124 );
118 125
119 - $this->TRAIT_register_testimonial_animation_controls();
126 + $this->TRAIT_register_testimonial_animation_controls();
120 127
121 128 $this->end_controls_section();
122 129 }
123 130 public function render()
@@ -123,17 +130,19 @@
123 130 public function render()
124 131 {
125 132 $settings = $this->get_settings_for_display();
126 133 $layout = $settings['layout'];
127 - $masonry = $settings['masonry'] === 'yes' ? 'ui-e-maso' : '';
134 + $masonry = $this->is_option('masonry', 'yes')
135 + ? 'ui-e-maso'
136 + : '';
128 137
129 138 $this->add_render_attribute('review-card', 'class', ['ui-e-grid', $masonry]);
130 - ?>
139 +?>
131 140 <div <?php $this->print_render_attribute_string('review-card'); ?>>
132 - <?php foreach ( $settings['review_items'] as $index => $item ) : ?>
133 - <?php $this->TRAIT_render_review_item($item, $layout); ?>
141 + <?php foreach ($settings['review_items'] as $index => $item) : ?>
142 + <?php $this->TRAIT_render_review_item($item, $layout); ?>
134 143 <?php endforeach; ?>
135 144 </div>
136 - <?php
145 +<?php
137 146 }
138 147 }
139 -\Elementor\Plugin::instance()->widgets_manager->register(new TestimonialGrid());
148 +\Elementor\Plugin::instance()->widgets_manager->register(new TestimonialGrid());