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 +26 -21 1.2.1 → 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,11 +76,12 @@
74 76 ],
75 77 ]
76 78 ];
77 79 }
78 - // TODO: remove or set as false, after 3.30, when the full deprecation of widget innet wrapper is ready
79 - public function has_widget_inner_wrapper(): bool {
80 - return true;
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');
81 84 }
82 85 protected function register_controls()
83 86 {
84 87
@@ -91,23 +94,23 @@
91 94 'tab' => Controls_Manager::TAB_CONTENT,
92 95 ]
93 96 );
94 97
95 - $this->TRAIT_register_specific_testimonial_controls('layout');
96 - $this->TRAIT_register_grid_layout_controls();
97 - $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
98 101
99 102 $this->end_controls_section();
100 103
101 104 $this->start_controls_section(
102 - 'section_style_review_items',
103 - [
104 - 'label' => esc_html__( 'Items', 'uicore-elements' ),
105 - 'tab' => Controls_Manager::TAB_STYLE,
106 - ]
107 - );
105 + 'section_style_review_items',
106 + [
107 + 'label' => esc_html__('Items', 'uicore-elements'),
108 + 'tab' => Controls_Manager::TAB_STYLE,
109 + ]
110 + );
108 111
109 - $this->TRAIT_register_all_item_style_controls(false);
112 + $this->TRAIT_register_all_item_style_controls(false);
110 113
111 114 $this->end_controls_section();
112 115
113 116 $this->TRAIT_register_style_controls(); // Other Components Style Controls
@@ -119,9 +122,9 @@
119 122 'tab' => Controls_Manager::TAB_STYLE,
120 123 ]
121 124 );
122 125
123 - $this->TRAIT_register_testimonial_animation_controls();
126 + $this->TRAIT_register_testimonial_animation_controls();
124 127
125 128 $this->end_controls_section();
126 129 }
127 130 public function render()
@@ -127,17 +130,19 @@
127 130 public function render()
128 131 {
129 132 $settings = $this->get_settings_for_display();
130 133 $layout = $settings['layout'];
131 - $masonry = $settings['masonry'] === 'yes' ? 'ui-e-maso' : '';
134 + $masonry = $this->is_option('masonry', 'yes')
135 + ? 'ui-e-maso'
136 + : '';
132 137
133 138 $this->add_render_attribute('review-card', 'class', ['ui-e-grid', $masonry]);
134 - ?>
139 +?>
135 140 <div <?php $this->print_render_attribute_string('review-card'); ?>>
136 - <?php foreach ( $settings['review_items'] as $index => $item ) : ?>
137 - <?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); ?>
138 143 <?php endforeach; ?>
139 144 </div>
140 - <?php
145 +<?php
141 146 }
142 147 }
143 -\Elementor\Plugin::instance()->widgets_manager->register(new TestimonialGrid());
148 +\Elementor\Plugin::instance()->widgets_manager->register(new TestimonialGrid());