PluginProbe ʕ •ᴥ•ʔ
Premium Addons for Elementor – Powerful Elementor Templates & Widgets / 4.11.77
Premium Addons for Elementor – Powerful Elementor Templates & Widgets v4.11.77
4.11.79 4.11.78 4.11.77 4.11.76 4.11.75 3.20.5 4.11.69 3.20.6 4.11.7 3.20.7 4.11.70 3.20.8 4.11.71 3.20.9 4.11.72 3.21.1 4.11.73 3.21.2 4.11.74 3.21.3 4.11.8 3.21.4 4.11.9 3.21.5 4.2.0 3.21.6 4.2.1 3.3.0 4.2.2 3.3.1 4.2.3 3.3.2 4.2.4 3.3.3 4.2.5 3.3.4 4.2.6 3.3.5 4.2.7 3.3.6 4.2.8 3.3.7 4.2.9 3.3.8 4.3.0 3.3.9 4.3.1 3.4.0 4.3.2 3.4.1 4.3.3 3.4.2 4.3.4 3.4.3 4.3.5 3.4.4 4.3.6 3.4.5 4.3.7 3.4.6 4.3.8 3.4.7 4.3.9 3.4.8 4.4.0 3.4.9 4.4.1 3.5.0 4.4.2 3.5.1 4.4.3 3.5.2 4.4.4 3.5.3 4.4.5 3.5.4 4.4.6 3.5.5 4.4.7 3.5.6 4.4.8 3.5.7 4.4.9 3.5.8 4.5.0 3.5.9 4.5.1 3.6.0 4.5.2 3.6.1 4.5.3 3.6.2 4.5.4 3.6.3 4.5.5 3.6.4 4.5.6 3.6.5 4.5.7 3.6.6 4.5.8 3.6.7 4.5.9 3.6.8 4.6.0 3.6.9 4.6.1 3.7.0 4.7.0 3.7.1 4.7.1 3.7.2 4.7.2 3.7.3 4.7.3 3.7.4 4.7.4 3.7.5 4.7.5 3.7.6 4.7.6 3.7.7 4.7.7 3.7.8 4.7.8 3.7.9 4.7.9 3.8.0 4.8.0 3.8.1 4.8.1 3.8.2 4.8.10 3.8.3 4.8.11 3.8.4 4.8.2 3.8.5 4.8.3 3.8.6 4.8.4 3.8.7 4.8.5 3.8.8 4.8.6 3.8.9 4.8.7 3.9.0 4.8.8 3.9.1 4.8.9 3.9.2 4.9.0 3.9.3 4.9.0-beta1 3.9.4 4.9.0-beta2 3.9.5 4.9.1 3.9.6 4.9.10 3.9.7 4.9.11 3.9.8 4.9.12 3.9.9 4.9.13 4.0.1 4.9.14 4.0.3 4.9.15 4.0.4 4.9.16 4.0.5 4.9.17 4.0.6 4.9.18 4.0.7 4.9.19 4.0.8 4.9.2 4.0.9 4.9.20 4.1.0 4.9.21 4.1.1 4.9.22 4.1.2 4.9.23 4.1.3 4.9.24 trunk 4.1.4 4.9.25 1.0 4.1.5 4.9.26 1.01 4.1.6 4.9.27 1.02 4.1.7 4.9.28 1.03 4.1.8 4.9.29 1.04 4.1.9 4.9.3 1.05 4.10.0 4.9.30 1.06 4.10.1 4.9.31 1.07 4.10.10 4.9.32 1.08 4.10.11 4.9.33 1.09 4.10.12 4.9.34 2.0 4.10.13 4.9.35 2.0.1 4.10.14 4.9.36 2.0.2 4.10.15 4.9.37 2.0.3 4.10.16 4.9.38 2.0.4 4.10.17 4.9.39 2.0.5 4.10.18 4.9.4 2.0.6 4.10.19 4.9.40 2.0.7 4.10.2 4.9.41 2.0.8 4.10.20 4.9.42 2.0.9 4.10.21 4.9.43 2.1.0 4.10.22 4.9.45 2.1.1 4.10.23 4.9.46 2.1.2 4.10.24 4.9.47 2.1.3 4.10.25 4.9.48 2.1.4 4.10.26 4.9.49 2.1.5 4.10.27 4.9.5 2.1.5-beta1 4.10.28 4.9.50 2.1.6 4.10.29 4.9.51 2.1.7 4.10.3 4.9.52 2.1.8 4.10.30 4.9.53 2.1.9 4.10.31 4.9.54 2.2.0 4.10.32 4.9.55 2.2.1 4.10.33 4.9.56 2.2.2 4.10.34 4.9.57 2.2.3 4.10.35 4.9.6 2.2.4 4.10.36 4.9.7 2.2.5 4.10.37 4.9.8 2.2.6 4.10.38 4.9.9 2.2.7 4.10.39 2.2.8 4.10.4 2.2.9 4.10.40 2.3.0 4.10.41 2.3.1 4.10.42 2.3.2 4.10.43 2.3.3 4.10.44 2.3.4 4.10.45 2.3.5 4.10.46 2.3.6 4.10.47 2.3.7 4.10.48 2.3.8 4.10.49 2.3.9 4.10.5 2.4.0 4.10.50 2.4.1 4.10.51 2.5.0 4.10.52 2.5.1 4.10.53 2.5.2 4.10.54 2.5.3 4.10.55 2.5.4 4.10.56 2.5.5 4.10.57 2.5.6 4.10.58 2.5.7 4.10.59 2.5.8 4.10.6 2.5.9 4.10.60 2.6.0 4.10.61 2.6.1 4.10.62 2.6.2 4.10.63 2.6.3 4.10.64 2.6.4 4.10.65 2.6.5 4.10.66 2.6.6 4.10.67 2.6.7 4.10.68 2.6.8 4.10.69 2.6.9 4.10.7 2.7.0 4.10.70 2.7.1 4.10.71 2.7.2 4.10.72 2.7.3 4.10.73 2.7.4 4.10.74 2.7.5 4.10.75 2.7.6 4.10.76 2.7.7 4.10.77 2.7.8 4.10.78 2.7.9 4.10.79 2.8.0 4.10.8 2.8.1 4.10.80 2.8.2 4.10.81 2.8.3 4.10.82 2.8.4 4.10.83 2.8.5 4.10.84 2.8.6 4.10.85 2.8.7 4.10.86 2.8.8 4.10.87 2.8.9 4.10.88 2.9.0 4.10.89 2.9.1 4.10.9 2.9.2 4.10.90 2.9.3 4.11.0 2.9.4 4.11.1 2.9.5 4.11.10 2.9.6 4.11.11 2.9.7 4.11.12 2.9.8 4.11.13 2.9.9 4.11.14 3.0.0 4.11.15 3.0.1 4.11.16 3.0.2 4.11.17 3.0.3 4.11.18 3.0.4 4.11.19 3.0.5 4.11.2 3.0.6 4.11.20 3.0.7 4.11.21 3.0.8 4.11.22 3.0.9 4.11.23 3.1.0 4.11.24 3.1.1 4.11.25 3.1.2 4.11.26 3.1.3 4.11.27 3.1.4 4.11.28 3.1.5 4.11.29 3.1.6 4.11.3 3.1.7 4.11.30 3.1.8 4.11.31 3.1.9 4.11.32 3.10.0 4.11.33 3.10.1 4.11.34 3.10.2 4.11.35 3.10.3 4.11.36 3.10.4 4.11.37 3.10.5 4.11.38 3.10.6 4.11.39 3.10.7 4.11.4 3.10.8 4.11.40 3.10.9 4.11.41 3.11.0 4.11.42 3.11.1 4.11.43 3.11.2 4.11.44 3.11.3 4.11.45 3.11.4 4.11.46 3.11.5 4.11.47 3.11.6 4.11.48 3.11.7 4.11.49 3.11.8 4.11.5 3.11.9 4.11.50 3.12.0 4.11.51 3.12.1 4.11.52 3.12.2 4.11.53 3.12.3 4.11.54 3.2.0 4.11.55 3.2.1 4.11.56 3.2.2 4.11.57 3.2.3 4.11.58 3.2.4 4.11.59 3.2.5 4.11.6 3.2.6 4.11.60 3.2.7 4.11.61 3.2.8 4.11.62 3.2.9 4.11.63 3.20.0 4.11.64 3.20.1 4.11.65 3.20.2 4.11.66 3.20.3 4.11.67 3.20.4 4.11.68
premium-addons-for-elementor / widgets / premium-person.php
premium-addons-for-elementor / widgets Last commit date
dep 1 month ago premium-banner.php 3 weeks ago premium-blog.php 3 weeks ago premium-button.php 3 weeks ago premium-carousel.php 3 weeks ago premium-contactform.php 3 weeks ago premium-countdown.php 3 weeks ago premium-counter.php 3 weeks ago premium-dual-header.php 3 weeks ago premium-fancytext.php 3 weeks ago premium-grid.php 3 weeks ago premium-icon-list.php 3 weeks ago premium-image-button.php 3 weeks ago premium-image-scroll.php 3 weeks ago premium-image-separator.php 3 weeks ago premium-lottie.php 3 weeks ago premium-maps.php 3 weeks ago premium-media-wheel.php 3 weeks ago premium-mobile-menu.php 3 weeks ago premium-modalbox.php 3 weeks ago premium-nav-menu.php 3 weeks ago premium-notifications.php 3 weeks ago premium-person.php 3 weeks ago premium-pinterest-feed.php 3 weeks ago premium-post-ticker.php 3 weeks ago premium-pricing-table.php 3 weeks ago premium-progressbar.php 3 weeks ago premium-search-form.php 3 weeks ago premium-svg-drawer.php 3 weeks ago premium-tcloud.php 3 weeks ago premium-testimonials.php 3 weeks ago premium-textual-showcase.php 3 weeks ago premium-tiktok-feed.php 3 weeks ago premium-title.php 3 weeks ago premium-videobox.php 3 weeks ago premium-vscroll.php 3 weeks ago premium-weather.php 3 weeks ago premium-world-clock.php 3 weeks ago
premium-person.php
2684 lines
1 <?php
2 /**
3 * Premium Persons.
4 */
5
6 namespace PremiumAddons\Widgets;
7
8 // Elementor Classes.
9 use Elementor\Plugin;
10 use Elementor\Widget_Base;
11 use Elementor\Utils;
12 use Elementor\Control_Media;
13 use Elementor\Controls_Manager;
14 use Elementor\Core\Kits\Documents\Tabs\Global_Colors;
15 use Elementor\Repeater;
16 use Elementor\Core\Kits\Documents\Tabs\Global_Typography;
17 use Elementor\Group_Control_Image_Size;
18 use Elementor\Group_Control_Typography;
19 use Elementor\Group_Control_Css_Filter;
20 use Elementor\Group_Control_Box_Shadow;
21 use Elementor\Group_Control_Text_Shadow;
22 use Elementor\Group_Control_Border;
23
24 // PremiumAddons Classes.
25 use PremiumAddons\Includes\Helper_Functions;
26
27 if ( ! defined( 'ABSPATH' ) ) {
28 exit; // If this file is called directly, abort.
29 }
30
31 /**
32 * Class Premium_Person
33 */
34 class Premium_Person extends Widget_Base {
35
36 /**
37 * Retrieve Widget Name.
38 *
39 * @since 1.0.0
40 * @access public
41 */
42 public function get_name() {
43 return 'premium-addon-person';
44 }
45
46 /**
47 * Retrieve Widget Title.
48 *
49 * @since 1.0.0
50 * @access public
51 */
52 public function get_title() {
53 return __( 'Team Members', 'premium-addons-for-elementor' );
54 }
55
56 /**
57 * Retrieve Widget Icon.
58 *
59 * @since 1.0.0
60 * @access public
61 *
62 * @return string widget icon.
63 */
64 public function get_icon() {
65 return 'pa-person';
66 }
67
68 /**
69 * Retrieve Widget Dependent CSS.
70 *
71 * @since 1.0.0
72 * @access public
73 *
74 * @return array CSS style handles.
75 */
76 public function get_style_depends() {
77 return array(
78 'pa-glass',
79 'font-awesome-5-all',
80 'pa-slick',
81 'premium-addons',
82 );
83 }
84
85 /**
86 * Retrieve Widget Dependent JS.
87 *
88 * @since 1.0.0
89 * @access public
90 *
91 * @return array JS script handles.
92 */
93 public function get_script_depends() {
94
95 $is_edit = Helper_Functions::is_edit_mode();
96
97 $scripts = array( 'imagesloaded' );
98
99 if ( $is_edit ) {
100
101 $scripts = array_merge( $scripts, array( 'pa-glass', 'pa-slick' ) );
102
103 } else {
104 $settings = $this->get_settings();
105
106 if ( 'yes' === $settings['carousel'] ) {
107 $scripts[] = 'pa-slick';
108 }
109
110 // Check if glassmorphism module is enabled
111 if ( 'none' !== $settings['body_lq_effect'] ) {
112 $scripts[] = 'pa-glass';
113 }
114 }
115
116 $scripts[] = 'premium-addons';
117
118 return $scripts;
119 }
120
121 /**
122 * Retrieve Widget Categories.
123 *
124 * @since 1.5.1
125 * @access public
126 *
127 * @return array Widget categories.
128 */
129 public function get_categories() {
130 return array( 'premium-elements' );
131 }
132
133 /**
134 * Retrieve Widget Keywords.
135 *
136 * @since 1.0.0
137 * @access public
138 *
139 * @return string Widget keywords.
140 */
141 public function get_keywords() {
142 return array( 'pa', 'premium', 'premium team members', 'person', 'carousel', 'slider', 'group' );
143 }
144
145 protected function is_dynamic_content(): bool {
146 return false;
147 }
148
149 /**
150 * Retrieve Widget Support URL.
151 *
152 * @access public
153 *
154 * @return string support URL.
155 */
156 public function get_custom_help_url() {
157 return 'https://premiumaddons.com/support/';
158 }
159
160 public function has_widget_inner_wrapper(): bool {
161 return ! Helper_Functions::check_elementor_experiment( 'e_optimized_markup' );
162 }
163
164 /**
165 * Register Persons controls.
166 *
167 * @since 1.0.0
168 * @access protected
169 */
170 protected function register_controls() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
171
172 $this->start_controls_section(
173 'premium_person_general_settings',
174 array(
175 'label' => __( 'General Settings', 'premium-addons-for-elementor' ),
176 )
177 );
178
179 $demo = Helper_Functions::get_campaign_link( 'https://premiumaddons.com/elementor-team-members-widget/', 'members', 'wp-editor', 'demo' );
180 Helper_Functions::add_templates_controls( $this, 'team-members', $demo );
181
182 $this->add_control(
183 'multiple',
184 array(
185 'label' => __( 'Multiple Member', 'premium-addons-for-elementor' ),
186 'description' => __( 'Enable this option if you need to add multiple persons', 'premium-addons-for-elementor' ),
187 'type' => Controls_Manager::SWITCHER,
188 )
189 );
190
191 $this->add_control(
192 'premium_person_style',
193 array(
194 'label' => __( 'Style', 'premium-addons-for-elementor' ),
195 'type' => Controls_Manager::SELECT,
196 'default' => 'style1',
197 'options' => array(
198 'style1' => __( 'Style 1', 'premium-addons-for-elementor' ),
199 'style2' => __( 'Style 2', 'premium-addons-for-elementor' ),
200 'style3' => __( 'Style 3', 'premium-addons-for-elementor' ),
201 ),
202 'label_block' => true,
203 'render_type' => 'template',
204 )
205 );
206
207 $this->add_control(
208 'title_rotate',
209 array(
210 'label' => __( 'Title Rotate', 'premium-addons-for-elementor' ),
211 'type' => Controls_Manager::SELECT,
212 'options' => array(
213 'cw' => __( '90 Degrees', 'premium-addons-for-elementor' ),
214 'ccw' => __( '-90 Degrees', 'premium-addons-for-elementor' ),
215 ),
216 'default' => 'cw',
217 'prefix_class' => 'premium-persons-title-',
218 'label_block' => true,
219 'condition' => array(
220 'premium_person_style' => 'style3',
221 ),
222 )
223 );
224
225 $this->add_group_control(
226 Group_Control_Image_Size::get_type(),
227 array(
228 'name' => 'thumbnail',
229 'default' => 'full',
230 )
231 );
232
233 $this->add_responsive_control(
234 'premium_person_image_width',
235 array(
236 'label' => __( 'Width', 'premium-addons-for-elementor' ),
237 'type' => Controls_Manager::SLIDER,
238 'description' => __( 'Enter image width in (PX, EM, %), default is 100%', 'premium-addons-for-elementor' ),
239 'size_units' => array( 'px', 'em', '%', 'custom' ),
240 'range' => array(
241 'px' => array(
242 'min' => 1,
243 'max' => 800,
244 ),
245 'em' => array(
246 'min' => 1,
247 'max' => 50,
248 ),
249 ),
250 'default' => array(
251 'unit' => '%',
252 'size' => '100',
253 ),
254 'label_block' => true,
255 'selectors' => array(
256 '{{WRAPPER}} .premium-persons-container' => 'width: {{SIZE}}{{UNIT}};',
257 ),
258 )
259 );
260
261 $this->add_responsive_control(
262 'premium_person_align',
263 array(
264 'label' => __( 'Alignment', 'premium-addons-for-elementor' ),
265 'type' => Controls_Manager::CHOOSE,
266 'options' => array(
267 'flex-start' => array(
268 'title' => __( 'Left', 'premium-addons-for-elementor' ),
269 'icon' => 'eicon-text-align-left',
270 ),
271 'center' => array(
272 'title' => __( 'Center', 'premium-addons-for-elementor' ),
273 'icon' => 'eicon-text-align-center',
274 ),
275 'flex-end' => array(
276 'title' => __( 'Right', 'premium-addons-for-elementor' ),
277 'icon' => 'eicon-text-align-right',
278 ),
279 ),
280 'default' => 'center',
281 'selectors' => array(
282 '{{WRAPPER}}' => 'justify-content: {{VALUE}};',
283 ),
284 )
285 );
286
287 $this->add_control(
288 'premium_person_hover_image_effect',
289 array(
290 'label' => __( 'Hover Effect', 'premium-addons-for-elementor' ),
291 'type' => Controls_Manager::SELECT,
292 'options' => array(
293 'none' => __( 'None', 'premium-addons-for-elementor' ),
294 'zoomin' => __( 'Zoom In', 'premium-addons-for-elementor' ),
295 'zoomout' => __( 'Zoom Out', 'premium-addons-for-elementor' ),
296 'scale' => __( 'Scale', 'premium-addons-for-elementor' ),
297 'grayscale' => __( 'Grayscale', 'premium-addons-for-elementor' ),
298 'blur' => __( 'Blur', 'premium-addons-for-elementor' ),
299 'bright' => __( 'Bright', 'premium-addons-for-elementor' ),
300 'sepia' => __( 'Sepia', 'premium-addons-for-elementor' ),
301 'trans' => __( 'Translate', 'premium-addons-for-elementor' ),
302 ),
303 'default' => 'zoomin',
304 'label_block' => true,
305 )
306 );
307
308 $this->add_responsive_control(
309 'premium_person_text_align',
310 array(
311 'label' => __( 'Content Alignment', 'premium-addons-for-elementor' ),
312 'type' => Controls_Manager::CHOOSE,
313 'options' => array(
314 'left' => array(
315 'title' => __( 'Left', 'premium-addons-for-elementor' ),
316 'icon' => 'eicon-text-align-left',
317 ),
318 'center' => array(
319 'title' => __( 'Center', 'premium-addons-for-elementor' ),
320 'icon' => 'eicon-text-align-center',
321 ),
322 'right' => array(
323 'title' => __( 'Right', 'premium-addons-for-elementor' ),
324 'icon' => 'eicon-text-align-right',
325 ),
326 ),
327 'default' => 'left',
328 'selectors' => array(
329 '{{WRAPPER}} .premium-person-info' => 'text-align: {{VALUE}};',
330 ),
331 )
332 );
333
334 $this->add_control(
335 'premium_person_name_heading',
336 array(
337 'label' => __( 'Name Tag', 'premium-addons-for-elementor' ),
338 'type' => Controls_Manager::SELECT,
339 'default' => 'h2',
340 'options' => array(
341 'h1' => 'H1',
342 'h2' => 'H2',
343 'h3' => 'H3',
344 'h4' => 'H4',
345 'h5' => 'H5',
346 'h6' => 'H6',
347 'div' => 'div',
348 'span' => 'span',
349 'p' => 'p',
350 ),
351 'label_block' => true,
352 )
353 );
354
355 $this->add_control(
356 'premium_person_title_heading',
357 array(
358 'label' => __( 'Title Tag', 'premium-addons-for-elementor' ),
359 'type' => Controls_Manager::SELECT,
360 'default' => 'h4',
361 'options' => array(
362 'h1' => 'H1',
363 'h2' => 'H2',
364 'h3' => 'H3',
365 'h4' => 'H4',
366 'h5' => 'H5',
367 'h6' => 'H6',
368 'div' => 'div',
369 'span' => 'span',
370 'p' => 'p',
371 ),
372 'label_block' => true,
373 )
374 );
375
376 $this->add_responsive_control(
377 'persons_per_row',
378 array(
379 'label' => __( 'Members/Row', 'premium-addons-for-elementor' ),
380 'type' => Controls_Manager::SELECT,
381 'options' => array(
382 '100%' => __( '1 Column', 'premium-addons-for-elementor' ),
383 '50%' => __( '2 Columns', 'premium-addons-for-elementor' ),
384 '33.33%' => __( '3 Columns', 'premium-addons-for-elementor' ),
385 '25%' => __( '4 Columns', 'premium-addons-for-elementor' ),
386 '20%' => __( '5 Columns', 'premium-addons-for-elementor' ),
387 '16.667%' => __( '6 Columns', 'premium-addons-for-elementor' ),
388 ),
389 'default' => '33.33%',
390 'tablet_default' => '100%',
391 'mobile_default' => '100%',
392 'render_type' => 'template',
393 'selectors' => array(
394 '{{WRAPPER}} .premium-person-container' => 'width: {{VALUE}}',
395 ),
396 'condition' => array(
397 'multiple' => 'yes',
398 ),
399 'frontend_available' => true,
400 )
401 );
402
403 $this->add_responsive_control(
404 'spacing',
405 array(
406 'label' => __( 'Spacing', 'premium-addons-for-elementor' ),
407 'type' => Controls_Manager::DIMENSIONS,
408 'size_units' => array( 'px', '%', 'em' ),
409 'default' => array(
410 'top' => 5,
411 'right' => 5,
412 'bottom' => 5,
413 'left' => 5,
414 ),
415 'condition' => array(
416 'multiple' => 'yes',
417 ),
418 'selectors' => array(
419 '{{WRAPPER}} .premium-person-container' => 'padding: 0 {{RIGHT}}{{UNIT}} 0 {{LEFT}}{{UNIT}}; margin: {{TOP}}{{UNIT}} 0 {{BOTTOM}}{{UNIT}} 0',
420 ' {{WRAPPER}} .premium-person-style1 .premium-person-info' => 'left: {{LEFT}}{{UNIT}}; right: {{RIGHT}}{{UNIT}}',
421 ),
422 )
423 );
424
425 $this->add_control(
426 'multiple_equal_height',
427 array(
428 'label' => __( 'Equal Height', 'premium-addons-for-elementor' ),
429 'type' => Controls_Manager::SWITCHER,
430 'default' => 'yes',
431 'description' => __( 'This option searches for the image with the largest height and applies that height to the other images', 'premium-addons-for-elementor' ),
432 'condition' => array(
433 'multiple' => 'yes',
434 'custom_height[size]' => '',
435 ),
436 )
437 );
438
439 $this->add_responsive_control(
440 'custom_height',
441 array(
442 'label' => __( 'Custom Height', 'premium-addons-for-elementor' ),
443 'type' => Controls_Manager::SLIDER,
444 'size_units' => array( 'px', 'em', 'custom' ),
445 'range' => array(
446 'px' => array(
447 'min' => 0,
448 'max' => 500,
449 ),
450 'em' => array(
451 'min' => 0,
452 'max' => 50,
453 ),
454 ),
455 'condition' => array(
456 'multiple' => 'yes',
457 ),
458 'selectors' => array(
459 '{{WRAPPER}} .premium-person-image-container img' => 'height: {{SIZE}}{{UNIT}} !important;',
460 ),
461 )
462 );
463
464 $this->end_controls_section();
465
466 $this->start_controls_section(
467 'premium_person_settings',
468 array(
469 'label' => __( 'Single Member Settings', 'premium-addons-for-elementor' ),
470 'condition' => array(
471 'multiple!' => 'yes',
472 ),
473 )
474 );
475
476 $this->add_control(
477 'premium_person_image',
478 array(
479 'label' => __( 'Image', 'premium-addons-for-elementor' ),
480 'type' => Controls_Manager::MEDIA,
481 'dynamic' => array( 'active' => true ),
482 'default' => array(
483 'url' => Utils::get_placeholder_image_src(),
484 ),
485 'label_block' => true,
486 )
487 );
488
489 $this->add_control(
490 'premium_person_name',
491 array(
492 'label' => __( 'Name', 'premium-addons-for-elementor' ),
493 'type' => Controls_Manager::TEXT,
494 'dynamic' => array( 'active' => true ),
495 'default' => 'John Frank',
496 'separator' => 'before',
497 'label_block' => true,
498 )
499 );
500
501 $this->add_control(
502 'premium_person_title',
503 array(
504 'label' => __( 'Title', 'premium-addons-for-elementor' ),
505 'type' => Controls_Manager::TEXT,
506 'dynamic' => array( 'active' => true ),
507 'default' => __( 'Developer', 'premium-addons-for-elementor' ),
508 'label_block' => true,
509 )
510 );
511
512 $this->add_control(
513 'premium_person_content',
514 array(
515 'label' => __( 'Description', 'premium-addons-for-elementor' ),
516 'type' => Controls_Manager::WYSIWYG,
517 'dynamic' => array( 'active' => true ),
518 'default' => __( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit', 'premium-addons-for-elementor' ),
519 )
520 );
521
522 $this->add_control(
523 'premium_person_profile',
524 array(
525 'label' => __( 'Profile Link', 'premium-addons-for-elementor' ),
526 'type' => Controls_Manager::URL,
527 'dynamic' => array( 'active' => true ),
528 'default' => array(
529 'url' => '',
530 ),
531 'label_block' => true,
532 )
533 );
534
535 $this->add_control(
536 'premium_person_social_enable',
537 array(
538 'label' => __( 'Enable Social Icons', 'premium-addons-for-elementor' ),
539 'type' => Controls_Manager::SWITCHER,
540 'default' => 'yes',
541 'separator' => 'before',
542 )
543 );
544
545 $this->add_control(
546 'premium_person_facebook',
547 array(
548 'label' => __( 'Facebook', 'premium-addons-for-elementor' ),
549 'type' => Controls_Manager::TEXT,
550 'dynamic' => array( 'active' => true ),
551 'default' => '#',
552 'label_block' => true,
553 'condition' => array(
554 'premium_person_social_enable' => 'yes',
555 ),
556 'ai' => array(
557 'active' => false,
558 ),
559 )
560 );
561
562 $this->add_control(
563 'premium_person_twitter',
564 array(
565 'label' => __( 'Twitter', 'premium-addons-for-elementor' ),
566 'type' => Controls_Manager::TEXT,
567 'dynamic' => array( 'active' => true ),
568 'default' => '#',
569 'label_block' => true,
570 'condition' => array(
571 'premium_person_social_enable' => 'yes',
572 ),
573 'ai' => array(
574 'active' => false,
575 ),
576 )
577 );
578
579 $this->add_control(
580 'premium_person_linkedin',
581 array(
582 'label' => __( 'LinkedIn', 'premium-addons-for-elementor' ),
583 'type' => Controls_Manager::TEXT,
584 'dynamic' => array( 'active' => true ),
585 'label_block' => true,
586 'condition' => array(
587 'premium_person_social_enable' => 'yes',
588 ),
589 'ai' => array(
590 'active' => false,
591 ),
592 )
593 );
594
595 $this->add_control(
596 'premium_person_google',
597 array(
598 'label' => __( 'Google+', 'premium-addons-for-elementor' ),
599 'type' => Controls_Manager::TEXT,
600 'dynamic' => array( 'active' => true ),
601 'label_block' => true,
602 'condition' => array(
603 'premium_person_social_enable' => 'yes',
604 ),
605 'ai' => array(
606 'active' => false,
607 ),
608 )
609 );
610
611 $this->add_control(
612 'premium_person_youtube',
613 array(
614 'label' => __( 'YouTube', 'premium-addons-for-elementor' ),
615 'type' => Controls_Manager::TEXT,
616 'dynamic' => array( 'active' => true ),
617 'label_block' => true,
618 'condition' => array(
619 'premium_person_social_enable' => 'yes',
620 ),
621 'ai' => array(
622 'active' => false,
623 ),
624 )
625 );
626
627 $this->add_control(
628 'premium_person_instagram',
629 array(
630 'label' => __( 'Instagram', 'premium-addons-for-elementor' ),
631 'type' => Controls_Manager::TEXT,
632 'dynamic' => array( 'active' => true ),
633 'default' => '#',
634 'label_block' => true,
635 'condition' => array(
636 'premium_person_social_enable' => 'yes',
637 ),
638 'ai' => array(
639 'active' => false,
640 ),
641 )
642 );
643
644 $this->add_control(
645 'premium_person_skype',
646 array(
647 'label' => __( 'Skype', 'premium-addons-for-elementor' ),
648 'type' => Controls_Manager::TEXT,
649 'dynamic' => array( 'active' => true ),
650 'label_block' => true,
651 'condition' => array(
652 'premium_person_social_enable' => 'yes',
653 ),
654 'ai' => array(
655 'active' => false,
656 ),
657 )
658 );
659
660 $this->add_control(
661 'premium_person_pinterest',
662 array(
663 'label' => __( 'Pinterest', 'premium-addons-for-elementor' ),
664 'type' => Controls_Manager::TEXT,
665 'dynamic' => array( 'active' => true ),
666 'label_block' => true,
667 'condition' => array(
668 'premium_person_social_enable' => 'yes',
669 ),
670 'ai' => array(
671 'active' => false,
672 ),
673 )
674 );
675
676 $this->add_control(
677 'premium_person_dribbble',
678 array(
679 'label' => __( 'Dribbble', 'premium-addons-for-elementor' ),
680 'type' => Controls_Manager::TEXT,
681 'dynamic' => array( 'active' => true ),
682 'default' => '#',
683 'label_block' => true,
684 'condition' => array(
685 'premium_person_social_enable' => 'yes',
686 ),
687 'ai' => array(
688 'active' => false,
689 ),
690 )
691 );
692
693 $this->add_control(
694 'premium_person_behance',
695 array(
696 'label' => __( 'Behance', 'premium-addons-for-elementor' ),
697 'type' => Controls_Manager::TEXT,
698 'dynamic' => array( 'active' => true ),
699 'label_block' => true,
700 'condition' => array(
701 'premium_person_social_enable' => 'yes',
702 ),
703 'ai' => array(
704 'active' => false,
705 ),
706 )
707 );
708
709 $this->add_control(
710 'premium_person_whatsapp',
711 array(
712 'label' => __( 'WhatsApp', 'premium-addons-for-elementor' ),
713 'type' => Controls_Manager::TEXT,
714 'dynamic' => array( 'active' => true ),
715 'label_block' => true,
716 'condition' => array(
717 'premium_person_social_enable' => 'yes',
718 ),
719 'ai' => array(
720 'active' => false,
721 ),
722 )
723 );
724
725 $this->add_control(
726 'premium_person_telegram',
727 array(
728 'label' => __( 'Telegram', 'premium-addons-for-elementor' ),
729 'type' => Controls_Manager::TEXT,
730 'dynamic' => array( 'active' => true ),
731 'label_block' => true,
732 'condition' => array(
733 'premium_person_social_enable' => 'yes',
734 ),
735 'ai' => array(
736 'active' => false,
737 ),
738 )
739 );
740
741 $this->add_control(
742 'premium_person_mail',
743 array(
744 'label' => __( 'Email Address', 'premium-addons-for-elementor' ),
745 'type' => Controls_Manager::TEXT,
746 'dynamic' => array( 'active' => true ),
747 'label_block' => true,
748 'condition' => array(
749 'premium_person_social_enable' => 'yes',
750 ),
751 'ai' => array(
752 'active' => false,
753 ),
754 )
755 );
756
757 $this->add_control(
758 'premium_person_site',
759 array(
760 'label' => __( 'Website', 'premium-addons-for-elementor' ),
761 'type' => Controls_Manager::TEXT,
762 'dynamic' => array( 'active' => true ),
763 'label_block' => true,
764 'condition' => array(
765 'premium_person_social_enable' => 'yes',
766 ),
767 'ai' => array(
768 'active' => false,
769 ),
770 )
771 );
772
773 $this->add_control(
774 'premium_person_number',
775 array(
776 'label' => __( 'Phone Number', 'premium-addons-for-elementor' ),
777 'type' => Controls_Manager::TEXT,
778 'dynamic' => array( 'active' => true ),
779 'description' => __( 'Example: tel: +012 345 678 910. Please note that this icon will show only on mobile devices', 'premium-addons-for-elementor' ),
780 'label_block' => true,
781 'condition' => array(
782 'premium_person_social_enable' => 'yes',
783 ),
784 'ai' => array(
785 'active' => false,
786 ),
787 )
788 );
789
790 $this->add_control(
791 'phone_notice',
792 array(
793 'raw' => __( 'Please note that Phone Number icon will show only on mobile devices.', 'premium-addons-for-elementor' ),
794 'type' => Controls_Manager::RAW_HTML,
795 'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
796 'condition' => array(
797 'premium_person_social_enable' => 'yes',
798 ),
799 )
800 );
801
802 $this->end_controls_section();
803
804 $this->start_controls_section(
805 'multiple_settings',
806 array(
807 'label' => __( 'Multiple Members Settings', 'premium-addons-for-elementor' ),
808 'condition' => array(
809 'multiple' => 'yes',
810 ),
811 )
812 );
813
814 $repeater = new REPEATER();
815
816 $repeater->add_control(
817 'multiple_image',
818 array(
819 'label' => __( 'Image', 'premium-addons-for-elementor' ),
820 'type' => Controls_Manager::MEDIA,
821 'dynamic' => array( 'active' => true ),
822 'default' => array(
823 'url' => Utils::get_placeholder_image_src(),
824 ),
825 )
826 );
827
828 $repeater->add_control(
829 'multiple_name',
830 array(
831 'label' => __( 'Name', 'premium-addons-for-elementor' ),
832 'type' => Controls_Manager::TEXT,
833 'dynamic' => array( 'active' => true ),
834 'default' => 'John Frank',
835 'separator' => 'before',
836 'label_block' => true,
837 )
838 );
839
840 $repeater->add_control(
841 'multiple_title',
842 array(
843 'label' => __( 'Title', 'premium-addons-for-elementor' ),
844 'type' => Controls_Manager::TEXT,
845 'dynamic' => array( 'active' => true ),
846 'default' => __( 'Developer', 'premium-addons-for-elementor' ),
847 'label_block' => true,
848 )
849 );
850
851 $repeater->add_control(
852 'multiple_description',
853 array(
854 'label' => __( 'Description', 'premium-addons-for-elementor' ),
855 'type' => Controls_Manager::WYSIWYG,
856 'dynamic' => array( 'active' => true ),
857 'default' => __( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit', 'premium-addons-for-elementor' ),
858 )
859 );
860
861 $repeater->add_control(
862 'multiple_profile',
863 array(
864 'label' => __( 'Profile Link', 'premium-addons-for-elementor' ),
865 'type' => Controls_Manager::URL,
866 'dynamic' => array( 'active' => true ),
867 'default' => array(
868 'url' => '',
869 ),
870 'label_block' => true,
871 )
872 );
873
874 $repeater->add_control(
875 'multiple_social_enable',
876 array(
877 'label' => __( 'Enable Social Icons', 'premium-addons-for-elementor' ),
878 'type' => Controls_Manager::SWITCHER,
879 'default' => 'yes',
880 'separator' => 'before',
881 )
882 );
883
884 $repeater->add_control(
885 'multiple_facebook',
886 array(
887 'label' => __( 'Facebook', 'premium-addons-for-elementor' ),
888 'type' => Controls_Manager::TEXT,
889 'dynamic' => array( 'active' => true ),
890 'default' => '#',
891 'label_block' => true,
892 'condition' => array(
893 'multiple_social_enable' => 'yes',
894 ),
895 )
896 );
897
898 $repeater->add_control(
899 'multiple_twitter',
900 array(
901 'label' => __( 'Twitter', 'premium-addons-for-elementor' ),
902 'type' => Controls_Manager::TEXT,
903 'dynamic' => array( 'active' => true ),
904 'default' => '#',
905 'label_block' => true,
906 'condition' => array(
907 'multiple_social_enable' => 'yes',
908 ),
909 )
910 );
911
912 $repeater->add_control(
913 'multiple_linkedin',
914 array(
915 'label' => __( 'LinkedIn', 'premium-addons-for-elementor' ),
916 'type' => Controls_Manager::TEXT,
917 'dynamic' => array( 'active' => true ),
918 'label_block' => true,
919 'condition' => array(
920 'multiple_social_enable' => 'yes',
921 ),
922 )
923 );
924
925 $repeater->add_control(
926 'multiple_google',
927 array(
928 'label' => __( 'Google+', 'premium-addons-for-elementor' ),
929 'type' => Controls_Manager::TEXT,
930 'dynamic' => array( 'active' => true ),
931 'label_block' => true,
932 'condition' => array(
933 'multiple_social_enable' => 'yes',
934 ),
935 )
936 );
937
938 $repeater->add_control(
939 'multiple_youtube',
940 array(
941 'label' => __( 'YouTube', 'premium-addons-for-elementor' ),
942 'type' => Controls_Manager::TEXT,
943 'dynamic' => array( 'active' => true ),
944 'label_block' => true,
945 'condition' => array(
946 'multiple_social_enable' => 'yes',
947 ),
948 )
949 );
950
951 $repeater->add_control(
952 'multiple_instagram',
953 array(
954 'label' => __( 'Instagram', 'premium-addons-for-elementor' ),
955 'type' => Controls_Manager::TEXT,
956 'dynamic' => array( 'active' => true ),
957 'default' => '#',
958 'label_block' => true,
959 'condition' => array(
960 'multiple_social_enable' => 'yes',
961 ),
962 )
963 );
964
965 $repeater->add_control(
966 'multiple_skype',
967 array(
968 'label' => __( 'Skype', 'premium-addons-for-elementor' ),
969 'type' => Controls_Manager::TEXT,
970 'dynamic' => array( 'active' => true ),
971 'label_block' => true,
972 'condition' => array(
973 'multiple_social_enable' => 'yes',
974 ),
975 )
976 );
977
978 $repeater->add_control(
979 'multiple_pinterest',
980 array(
981 'label' => __( 'Pinterest', 'premium-addons-for-elementor' ),
982 'type' => Controls_Manager::TEXT,
983 'dynamic' => array( 'active' => true ),
984 'label_block' => true,
985 'condition' => array(
986 'multiple_social_enable' => 'yes',
987 ),
988 )
989 );
990
991 $repeater->add_control(
992 'multiple_dribbble',
993 array(
994 'label' => __( 'Dribbble', 'premium-addons-for-elementor' ),
995 'type' => Controls_Manager::TEXT,
996 'dynamic' => array( 'active' => true ),
997 'default' => '#',
998 'label_block' => true,
999 'condition' => array(
1000 'multiple_social_enable' => 'yes',
1001 ),
1002 )
1003 );
1004
1005 $repeater->add_control(
1006 'multiple_behance',
1007 array(
1008 'label' => __( 'Behance', 'premium-addons-for-elementor' ),
1009 'type' => Controls_Manager::TEXT,
1010 'dynamic' => array( 'active' => true ),
1011 'label_block' => true,
1012 'condition' => array(
1013 'multiple_social_enable' => 'yes',
1014 ),
1015 )
1016 );
1017
1018 $repeater->add_control(
1019 'multiple_whatsapp',
1020 array(
1021 'label' => __( 'WhatsApp', 'premium-addons-for-elementor' ),
1022 'type' => Controls_Manager::TEXT,
1023 'dynamic' => array( 'active' => true ),
1024 'label_block' => true,
1025 'condition' => array(
1026 'multiple_social_enable' => 'yes',
1027 ),
1028 )
1029 );
1030
1031 $repeater->add_control(
1032 'multiple_telegram',
1033 array(
1034 'label' => __( 'Telegram', 'premium-addons-for-elementor' ),
1035 'type' => Controls_Manager::TEXT,
1036 'dynamic' => array( 'active' => true ),
1037 'label_block' => true,
1038 'condition' => array(
1039 'multiple_social_enable' => 'yes',
1040 ),
1041 )
1042 );
1043
1044 $repeater->add_control(
1045 'multiple_mail',
1046 array(
1047 'label' => __( 'Email Address', 'premium-addons-for-elementor' ),
1048 'type' => Controls_Manager::TEXT,
1049 'dynamic' => array( 'active' => true ),
1050 'label_block' => true,
1051 'condition' => array(
1052 'multiple_social_enable' => 'yes',
1053 ),
1054 )
1055 );
1056
1057 $repeater->add_control(
1058 'multiple_site',
1059 array(
1060 'label' => __( 'Website', 'premium-addons-for-elementor' ),
1061 'type' => Controls_Manager::TEXT,
1062 'dynamic' => array( 'active' => true ),
1063 'label_block' => true,
1064 'condition' => array(
1065 'multiple_social_enable' => 'yes',
1066 ),
1067 )
1068 );
1069
1070 $repeater->add_control(
1071 'multiple_number',
1072 array(
1073 'label' => __( 'Phone Number', 'premium-addons-for-elementor' ),
1074 'type' => Controls_Manager::TEXT,
1075 'dynamic' => array( 'active' => true ),
1076 'description' => __( 'Example: tel: +012 345 678 910', 'premium-addons-for-elementor' ),
1077 'label_block' => true,
1078 'condition' => array(
1079 'multiple_social_enable' => 'yes',
1080 ),
1081 )
1082 );
1083
1084 $repeater->add_control(
1085 'phone_notice',
1086 array(
1087 'raw' => __( 'Please note that Phone Number icon will show only on mobile devices.', 'premium-addons-for-elementor' ),
1088 'type' => Controls_Manager::RAW_HTML,
1089 'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
1090 'condition' => array(
1091 'multiple_social_enable' => 'yes',
1092 ),
1093 )
1094 );
1095
1096 $this->add_control(
1097 'multiple_persons',
1098 array(
1099 'label' => __( 'Members', 'premium-addons-for-elementor' ),
1100 'type' => Controls_Manager::REPEATER,
1101 'default' => array(
1102 array(
1103 'multiple_name' => 'John Frank',
1104 ),
1105 array(
1106 'multiple_name' => 'John Frank',
1107 ),
1108 array(
1109 'multiple_name' => 'John Frank',
1110 ),
1111 ),
1112 'fields' => $repeater->get_controls(),
1113 'title_field' => '{{{multiple_name}}} - {{{multiple_title}}}',
1114 'prevent_empty' => false,
1115 )
1116 );
1117
1118 $this->add_control(
1119 'carousel',
1120 array(
1121 'label' => __( 'Carousel', 'premium-addons-for-elementor' ),
1122 'type' => Controls_Manager::SWITCHER,
1123 'frontend_available' => true,
1124 )
1125 );
1126
1127 $this->add_control(
1128 'carousel_play',
1129 array(
1130 'label' => __( 'Auto Play', 'premium-addons-for-elementor' ),
1131 'type' => Controls_Manager::SWITCHER,
1132 'condition' => array(
1133 'carousel' => 'yes',
1134 ),
1135 'frontend_available' => true,
1136 )
1137 );
1138
1139 $this->add_control(
1140 'speed',
1141 array(
1142 'label' => __( 'Autoplay Speed', 'premium-addons-for-elementor' ),
1143 'description' => __( 'Autoplay Speed means at which time the next slide should come. Set a value in milliseconds (ms)', 'premium-addons-for-elementor' ),
1144 'type' => Controls_Manager::NUMBER,
1145 'default' => 5000,
1146 'condition' => array(
1147 'carousel' => 'yes',
1148 'carousel_play' => 'yes',
1149 ),
1150 'frontend_available' => true,
1151 )
1152 );
1153
1154 $this->add_responsive_control(
1155 'carousel_arrows_pos',
1156 array(
1157 'label' => __( 'Arrows Position', 'premium-addons-for-elementor' ),
1158 'type' => Controls_Manager::SLIDER,
1159 'size_units' => array( 'px', 'em' ),
1160 'range' => array(
1161 'px' => array(
1162 'min' => -100,
1163 'max' => 100,
1164 ),
1165 'em' => array(
1166 'min' => -10,
1167 'max' => 10,
1168 ),
1169 ),
1170 'condition' => array(
1171 'carousel' => 'yes',
1172 ),
1173 'selectors' => array(
1174 '{{WRAPPER}} .premium-persons-container a.carousel-arrow.carousel-next' => 'right: {{SIZE}}{{UNIT}};',
1175 '{{WRAPPER}} .premium-persons-container a.carousel-arrow.carousel-prev' => 'left: {{SIZE}}{{UNIT}};',
1176 ),
1177 )
1178 );
1179
1180 $this->end_controls_section();
1181
1182 $this->start_controls_section(
1183 'section_pa_docs',
1184 array(
1185 'label' => __( 'Help & Docs', 'premium-addons-for-elementor' ),
1186 )
1187 );
1188
1189 $doc1_url = Helper_Functions::get_campaign_link( 'https://premiumaddons.com/docs/persons-widget-tutorial/', 'members-widget', 'wp-editor', 'get-support' );
1190 $doc2_url = Helper_Functions::get_campaign_link( 'https://premiumaddons.com/docs/why-im-not-able-to-see-elementor-font-awesome-5-icons-in-premium-add-ons', 'members-widget', 'wp-editor', 'get-support' );
1191
1192 $this->add_control(
1193 'doc_1',
1194 array(
1195 'type' => Controls_Manager::RAW_HTML,
1196 'raw' => sprintf( '<a href="%s" target="_blank">%s</a>', $doc1_url, __( 'Getting started »', 'premium-addons-for-elementor' ) ),
1197 'content_classes' => 'editor-pa-doc',
1198 )
1199 );
1200
1201 $this->add_control(
1202 'doc_2',
1203 array(
1204 'type' => Controls_Manager::RAW_HTML,
1205 'raw' => sprintf( '<a href="%s" target="_blank">%s</a>', $doc2_url, __( 'I\'m not able to see the social icons in the widget »', 'premium-addons-for-elementor' ) ),
1206 'content_classes' => 'editor-pa-doc',
1207 )
1208 );
1209
1210 Helper_Functions::register_element_feedback_controls( $this );
1211
1212 $this->end_controls_section();
1213
1214 $this->start_controls_section(
1215 'premium_person_image_style',
1216 array(
1217 'label' => __( 'Image', 'premium-addons-for-elementor' ),
1218 'tab' => Controls_Manager::TAB_STYLE,
1219 )
1220 );
1221
1222 $this->add_responsive_control(
1223 'image_border_radius',
1224 array(
1225 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
1226 'type' => Controls_Manager::DIMENSIONS,
1227 'size_units' => array( 'px', 'em', '%' ),
1228 'selectors' => array(
1229 '{{WRAPPER}} .premium-person-image-container' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1230 ),
1231 'condition' => array(
1232 'premium_person_style' => 'style2',
1233 ),
1234 )
1235 );
1236
1237 $this->add_control(
1238 'image_adv_radius',
1239 array(
1240 'label' => __( 'Advanced Border Radius', 'premium-addons-for-elementor' ),
1241 'type' => Controls_Manager::SWITCHER,
1242 'description' => __( 'Apply custom radius values. Get the radius value from ', 'premium-addons-for-elementor' ) . '<a href="https://9elements.github.io/fancy-border-radius/" target="_blank">here</a>' . __( '. See ', 'premium-addons-for-elementor' ) . '<a href="https://www.youtube.com/watch?v=S0BJazLHV-M" target="_blank">tutorial</a>',
1243 'condition' => array(
1244 'premium_person_style' => 'style2',
1245 ),
1246 )
1247 );
1248
1249 $this->add_control(
1250 'image_adv_radius_value',
1251 array(
1252 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
1253 'type' => Controls_Manager::TEXT,
1254 'dynamic' => array( 'active' => true ),
1255 'selectors' => array(
1256 '{{WRAPPER}} .premium-person-image-container' => 'border-radius: {{VALUE}};',
1257 ),
1258 'condition' => array(
1259 'premium_person_style' => 'style2',
1260 'image_adv_radius' => 'yes',
1261 ),
1262 'ai' => array(
1263 'active' => false,
1264 ),
1265 )
1266 );
1267
1268 $this->add_group_control(
1269 Group_Control_Css_Filter::get_type(),
1270 array(
1271 'name' => 'css_filters',
1272 'selector' => '{{WRAPPER}} .premium-person-container img',
1273 )
1274 );
1275
1276 $this->add_group_control(
1277 Group_Control_Css_Filter::get_type(),
1278 array(
1279 'name' => 'hover_css_filters',
1280 'label' => __( 'Hover CSS Filters', 'premium-addons-for-elementor' ),
1281 'selector' => '{{WRAPPER}} .premium-person-container:hover img',
1282 )
1283 );
1284
1285 $this->add_group_control(
1286 Group_Control_Box_Shadow::get_type(),
1287 array(
1288 'name' => 'premium_person_shadow',
1289 'selector' => '{{WRAPPER}} .premium-person-social',
1290 'condition' => array(
1291 'premium_person_style' => 'style2',
1292 ),
1293 )
1294 );
1295
1296 $this->add_control(
1297 'blend_mode',
1298 array(
1299 'label' => __( 'Blend Mode', 'premium-addons-for-elementor' ),
1300 'type' => Controls_Manager::SELECT,
1301 'options' => array(
1302 '' => __( 'Normal', 'premium-addons-for-elementor' ),
1303 'multiply' => 'Multiply',
1304 'screen' => 'Screen',
1305 'overlay' => 'Overlay',
1306 'darken' => 'Darken',
1307 'lighten' => 'Lighten',
1308 'color-dodge' => 'Color Dodge',
1309 'saturation' => 'Saturation',
1310 'color' => 'Color',
1311 'luminosity' => 'Luminosity',
1312 ),
1313 'separator' => 'before',
1314 'selectors' => array(
1315 '{{WRAPPER}} .premium-person-image-container img' => 'mix-blend-mode: {{VALUE}}',
1316 ),
1317 )
1318 );
1319
1320 $this->end_controls_section();
1321
1322 $this->start_controls_section(
1323 'premium_person_name_style',
1324 array(
1325 'label' => __( 'Name', 'premium-addons-for-elementor' ),
1326 'tab' => Controls_Manager::TAB_STYLE,
1327 )
1328 );
1329
1330 $this->add_control(
1331 'premium_person_name_color',
1332 array(
1333 'label' => __( 'Color', 'premium-addons-for-elementor' ),
1334 'type' => Controls_Manager::COLOR,
1335 'global' => array(
1336 'default' => Global_Colors::COLOR_PRIMARY,
1337 ),
1338 'selectors' => array(
1339 '{{WRAPPER}} .premium-person-name' => 'color: {{VALUE}};',
1340 ),
1341 )
1342 );
1343
1344 $this->add_control(
1345 'premium_person_name_color_hover',
1346 array(
1347 'label' => __( 'Hover Color', 'premium-addons-for-elementor' ),
1348 'type' => Controls_Manager::COLOR,
1349 'global' => array(
1350 'default' => Global_Colors::COLOR_SECONDARY,
1351 ),
1352 'selectors' => array(
1353 '{{WRAPPER}} .premium-person-link:hover .premium-person-name' => 'color: {{VALUE}} ;',
1354 ),
1355 )
1356 );
1357
1358 $this->add_group_control(
1359 Group_Control_Typography::get_type(),
1360 array(
1361 'name' => 'name_typography',
1362 'global' => array(
1363 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
1364 ),
1365 'selector' => '{{WRAPPER}} .premium-person-name',
1366 )
1367 );
1368
1369 $this->add_group_control(
1370 Group_Control_Text_Shadow::get_type(),
1371 array(
1372 'name' => 'name_shadow',
1373 'selector' => '{{WRAPPER}} .premium-person-name',
1374 )
1375 );
1376
1377 $this->add_responsive_control(
1378 'name_padding',
1379 array(
1380 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
1381 'type' => Controls_Manager::DIMENSIONS,
1382 'size_units' => array( 'px', 'em', '%' ),
1383 'selectors' => array(
1384 '{{WRAPPER}} .premium-person-name' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1385 ),
1386 )
1387 );
1388
1389 $this->end_controls_section();
1390
1391 $this->start_controls_section(
1392 'premium_person_title_style',
1393 array(
1394 'label' => __( 'Job Title', 'premium-addons-for-elementor' ),
1395 'tab' => Controls_Manager::TAB_STYLE,
1396 )
1397 );
1398
1399 $this->add_control(
1400 'premium_person_title_color',
1401 array(
1402 'label' => __( 'Color', 'premium-addons-for-elementor' ),
1403 'type' => Controls_Manager::COLOR,
1404 'global' => array(
1405 'default' => Global_Colors::COLOR_SECONDARY,
1406 ),
1407 'selectors' => array(
1408 '{{WRAPPER}} .premium-person-title' => 'color: {{VALUE}};',
1409 ),
1410 )
1411 );
1412
1413 $this->add_group_control(
1414 Group_Control_Typography::get_type(),
1415 array(
1416 'name' => 'title_typography',
1417 'global' => array(
1418 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
1419 ),
1420 'selector' => '{{WRAPPER}} .premium-person-title',
1421 )
1422 );
1423
1424 $this->add_group_control(
1425 Group_Control_Text_Shadow::get_type(),
1426 array(
1427 'name' => 'title_shadow',
1428 'selector' => '{{WRAPPER}} .premium-person-title',
1429 )
1430 );
1431
1432 $this->add_responsive_control(
1433 'title_margin',
1434 array(
1435 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
1436 'type' => Controls_Manager::DIMENSIONS,
1437 'size_units' => array( 'px', 'em', '%' ),
1438 'selectors' => array(
1439 '{{WRAPPER}} .premium-person-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1440 ),
1441 )
1442 );
1443
1444 $this->add_responsive_control(
1445 'title_padding',
1446 array(
1447 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
1448 'type' => Controls_Manager::DIMENSIONS,
1449 'size_units' => array( 'px', 'em', '%' ),
1450 'selectors' => array(
1451 '{{WRAPPER}} .premium-person-title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1452 ),
1453 )
1454 );
1455
1456 $this->end_controls_section();
1457
1458 $this->start_controls_section(
1459 'premium_person_description_style',
1460 array(
1461 'label' => __( 'Description', 'premium-addons-for-elementor' ),
1462 'tab' => Controls_Manager::TAB_STYLE,
1463 )
1464 );
1465
1466 $this->add_control(
1467 'premium_person_description_color',
1468 array(
1469 'label' => __( 'Color', 'premium-addons-for-elementor' ),
1470 'type' => Controls_Manager::COLOR,
1471 'global' => array(
1472 'default' => Global_Colors::COLOR_TEXT,
1473 ),
1474 'selectors' => array(
1475 '{{WRAPPER}} .premium-person-content' => 'color: {{VALUE}};',
1476 ),
1477 )
1478 );
1479
1480 $this->add_group_control(
1481 Group_Control_Typography::get_type(),
1482 array(
1483 'name' => 'description_typography',
1484 'global' => array(
1485 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
1486 ),
1487 'selector' => '{{WRAPPER}} .premium-person-content',
1488 )
1489 );
1490
1491 $this->add_group_control(
1492 Group_Control_Text_Shadow::get_type(),
1493 array(
1494 'name' => 'description_shadow',
1495 'selector' => '{{WRAPPER}} .premium-person-content',
1496 )
1497 );
1498
1499 $this->add_responsive_control(
1500 'description_padding',
1501 array(
1502 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
1503 'type' => Controls_Manager::DIMENSIONS,
1504 'size_units' => array( 'px', 'em', '%' ),
1505 'selectors' => array(
1506 '{{WRAPPER}} .premium-person-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1507 ),
1508 )
1509 );
1510
1511 $this->end_controls_section();
1512
1513 $this->start_controls_section(
1514 'premium_person_social_icon_style',
1515 array(
1516 'label' => __( 'Social Icons', 'premium-addons-for-elementor' ),
1517 'tab' => Controls_Manager::TAB_STYLE,
1518 'condition' => array(
1519 'premium_person_social_enable' => 'yes',
1520 ),
1521 )
1522 );
1523
1524 $this->add_responsive_control(
1525 'premium_person_social_size',
1526 array(
1527 'label' => __( 'Size', 'premium-addons-for-elementor' ),
1528 'type' => Controls_Manager::SLIDER,
1529 'size_units' => array( 'px', 'em', '%' ),
1530 'label_block' => true,
1531 'selectors' => array(
1532 '{{WRAPPER}} .premium-person-list-item i' => 'font-size: {{SIZE}}{{UNIT}};',
1533 ),
1534 )
1535 );
1536
1537 $this->add_control(
1538 'premium_person_social_color',
1539 array(
1540 'label' => __( 'Color', 'premium-addons-for-elementor' ),
1541 'type' => Controls_Manager::COLOR,
1542 'global' => array(
1543 'default' => Global_Colors::COLOR_PRIMARY,
1544 ),
1545 'selectors' => array(
1546 '{{WRAPPER}} .premium-person-list-item i' => 'color: {{VALUE}};',
1547 ),
1548 )
1549 );
1550
1551 $this->add_control(
1552 'premium_person_social_hover_color',
1553 array(
1554 'label' => __( 'Hover Color', 'premium-addons-for-elementor' ),
1555 'type' => Controls_Manager::COLOR,
1556 'global' => array(
1557 'default' => Global_Colors::COLOR_SECONDARY,
1558 ),
1559 'selectors' => array(
1560 '{{WRAPPER}} .premium-person-list-item:hover i' => 'color: {{VALUE}}',
1561 ),
1562 )
1563 );
1564
1565 $this->add_control(
1566 'premium_person_social_background',
1567 array(
1568 'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
1569 'type' => Controls_Manager::COLOR,
1570 'selectors' => array(
1571 '{{WRAPPER}} .premium-person-list-item a' => 'background-color: {{VALUE}}',
1572 ),
1573 )
1574 );
1575
1576 $this->add_control(
1577 'premium_person_social_default_colors',
1578 array(
1579 'label' => __( 'Brands Default Colors', 'premium-addons-for-elementor' ),
1580 'type' => Controls_Manager::SWITCHER,
1581 'prefix_class' => 'premium-person-defaults-',
1582 )
1583 );
1584
1585 $this->add_control(
1586 'premium_person_social_hover_background',
1587 array(
1588 'label' => __( 'Hover Background Color', 'premium-addons-for-elementor' ),
1589 'type' => Controls_Manager::COLOR,
1590 'selectors' => array(
1591 '{{WRAPPER}} li.premium-person-list-item:hover a' => 'background-color: {{VALUE}}',
1592 ),
1593 'condition' => array(
1594 'premium_person_social_default_colors!' => 'yes',
1595 ),
1596 )
1597 );
1598
1599 $this->add_group_control(
1600 Group_Control_Border::get_type(),
1601 array(
1602 'name' => 'premium_person_social_border',
1603 'selector' => '{{WRAPPER}} .premium-person-list-item a',
1604 )
1605 );
1606
1607 $this->add_responsive_control(
1608 'premium_person_social_radius',
1609 array(
1610 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
1611 'type' => Controls_Manager::DIMENSIONS,
1612 'size_units' => array( 'px', 'em', '%' ),
1613 'selectors' => array(
1614 '{{WRAPPER}} .premium-person-list-item a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
1615 ),
1616 'condition' => array(
1617 'social_adv_radius!' => 'yes',
1618 ),
1619 )
1620 );
1621
1622 $this->add_control(
1623 'social_adv_radius',
1624 array(
1625 'label' => __( 'Advanced Border Radius', 'premium-addons-for-elementor' ),
1626 'type' => Controls_Manager::SWITCHER,
1627 'description' => __( 'Apply custom radius values. Get the radius value from ', 'premium-addons-for-elementor' ) . '<a href="https://9elements.github.io/fancy-border-radius/" target="_blank">here</a>' . __( '. See ', 'premium-addons-for-elementor' ) . '<a href="https://www.youtube.com/watch?v=S0BJazLHV-M" target="_blank">tutorial</a>',
1628 )
1629 );
1630
1631 $this->add_control(
1632 'social_adv_radius_value',
1633 array(
1634 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
1635 'type' => Controls_Manager::TEXT,
1636 'dynamic' => array( 'active' => true ),
1637 'selectors' => array(
1638 '{{WRAPPER}} .premium-person-list-item a' => 'border-radius: {{VALUE}};',
1639 ),
1640 'condition' => array(
1641 'social_adv_radius' => 'yes',
1642 ),
1643 'ai' => array(
1644 'active' => false,
1645 ),
1646 )
1647 );
1648
1649 $this->add_responsive_control(
1650 'premium_person_social_margin',
1651 array(
1652 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
1653 'type' => Controls_Manager::DIMENSIONS,
1654 'size_units' => array( 'px', 'em', '%' ),
1655 'selectors' => array(
1656 '{{WRAPPER}} .premium-person-list-item a' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1657 ),
1658 )
1659 );
1660
1661 $this->add_responsive_control(
1662 'premium_person_social_padding',
1663 array(
1664 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
1665 'type' => Controls_Manager::DIMENSIONS,
1666 'size_units' => array( 'px', 'em', '%' ),
1667 'selectors' => array(
1668 '{{WRAPPER}} .premium-person-list-item a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1669 ),
1670 )
1671 );
1672
1673 $this->end_controls_section();
1674
1675 $this->start_controls_section(
1676 'premium_person_general_style',
1677 array(
1678 'label' => __( 'Content', 'premium-addons-for-elementor' ),
1679 'tab' => Controls_Manager::TAB_STYLE,
1680 )
1681 );
1682
1683 $this->add_control(
1684 'premium_person_content_background_color',
1685 array(
1686 'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
1687 'type' => Controls_Manager::COLOR,
1688 'default' => 'rgba(245,245,245,0.97)',
1689 'selectors' => array(
1690 '{{WRAPPER}} .premium-person-info' => 'background-color: {{VALUE}};',
1691 ),
1692 )
1693 );
1694
1695 $this->add_control(
1696 'body_lq_effect',
1697 array(
1698 'label' => __( 'Liquid Glass Effect', 'premium-addons-for-elementor' ),
1699 'type' => Controls_Manager::SELECT,
1700 'description' => sprintf(
1701 /* translators: 1: `<a>` opening tag, 2: `</a>` closing tag. */
1702 esc_html__( 'Important: Make sure this element has a semi-transparent background color to see the effect. See all presets from %1$shere%2$s.', 'premium-addons-for-elementor' ),
1703 '<a href="https://premiumaddons.com/liquid-glass/" target="_blank">',
1704 '</a>'
1705 ),
1706 'options' => array(
1707 'none' => __( 'None', 'premium-addons-for-elementor' ),
1708 'glass1' => __( 'Preset 01', 'premium-addons-for-elementor' ),
1709 'glass2' => __( 'Preset 02', 'premium-addons-for-elementor' ),
1710 'glass3' => apply_filters( 'pa_pro_label', __( 'Preset 03 (Pro)', 'premium-addons-for-elementor' ) ),
1711 'glass4' => apply_filters( 'pa_pro_label', __( 'Preset 04 (Pro)', 'premium-addons-for-elementor' ) ),
1712 'glass5' => apply_filters( 'pa_pro_label', __( 'Preset 05 (Pro)', 'premium-addons-for-elementor' ) ),
1713 'glass6' => apply_filters( 'pa_pro_label', __( 'Preset 06 (Pro)', 'premium-addons-for-elementor' ) ),
1714 ),
1715 'default' => 'none',
1716 'label_block' => true,
1717 'condition' => array(
1718 'premium_person_style!' => 'style3',
1719 ),
1720 )
1721 );
1722
1723 $this->add_responsive_control(
1724 'premium_person_border_bottom_width',
1725 array(
1726 'label' => __( 'Bottom Offset', 'premium-addons-for-elementor' ),
1727 'type' => Controls_Manager::SLIDER,
1728 'size_units' => array( 'px', 'em', '%' ),
1729 'range' => array(
1730 'px' => array(
1731 'min' => 0,
1732 'max' => 700,
1733 ),
1734 ),
1735 'default' => array(
1736 'size' => 20,
1737 'unit' => 'px',
1738 ),
1739 'label_block' => true,
1740 'condition' => array(
1741 'premium_person_style' => 'style1',
1742 ),
1743 'selectors' => array(
1744 '{{WRAPPER}} .premium-person-info' => 'bottom: {{SIZE}}{{UNIT}}',
1745 ),
1746 )
1747 );
1748
1749 $this->add_responsive_control(
1750 'premium_person_content_speed',
1751 array(
1752 'label' => __( 'Transition Duration (sec)', 'premium-addons-for-elementor' ),
1753 'type' => Controls_Manager::SLIDER,
1754 'range' => array(
1755 'px' => array(
1756 'min' => 0,
1757 'max' => 5,
1758 'step' => 0.1,
1759 ),
1760 ),
1761 'selectors' => array(
1762 '{{WRAPPER}} .premium-person-info, {{WRAPPER}} .premium-person-image-container img' => 'transition-duration: {{SIZE}}s',
1763 ),
1764 )
1765 );
1766
1767 $this->add_responsive_control(
1768 'premium_person_content_padding',
1769 array(
1770 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
1771 'type' => Controls_Manager::DIMENSIONS,
1772 'size_units' => array( 'px', 'em', '%' ),
1773 'selectors' => array(
1774 '{{WRAPPER}} .premium-person-info-container' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1775 ),
1776 )
1777 );
1778
1779 $this->end_controls_section();
1780
1781 $this->start_controls_section(
1782 'carousel_style',
1783 array(
1784 'label' => __( 'Carousel', 'premium-addons-for-elementor' ),
1785 'tab' => Controls_Manager::TAB_STYLE,
1786 'condition' => array(
1787 'carousel' => 'yes',
1788 ),
1789 )
1790 );
1791
1792 $this->add_control(
1793 'arrow_color',
1794 array(
1795 'label' => __( 'Color', 'premium-addons-for-elementor' ),
1796 'type' => Controls_Manager::COLOR,
1797 'global' => array(
1798 'default' => Global_Colors::COLOR_PRIMARY,
1799 ),
1800 'selectors' => array(
1801 '{{WRAPPER}} .premium-persons-container .slick-arrow' => 'color: {{VALUE}};',
1802 ),
1803 )
1804 );
1805
1806 $this->add_control(
1807 'arrow_hover_color',
1808 array(
1809 'label' => __( 'Hover Color', 'premium-addons-for-elementor' ),
1810 'type' => Controls_Manager::COLOR,
1811 'global' => array(
1812 'default' => Global_Colors::COLOR_PRIMARY,
1813 ),
1814 'selectors' => array(
1815 '{{WRAPPER}} .premium-persons-container .slick-arrow:hover' => 'color: {{VALUE}};',
1816 ),
1817 )
1818 );
1819
1820 $this->add_responsive_control(
1821 'arrow_size',
1822 array(
1823 'label' => __( 'Size', 'premium-addons-for-elementor' ),
1824 'type' => Controls_Manager::SLIDER,
1825 'size_units' => array( 'px', '%', 'em' ),
1826 'selectors' => array(
1827 '{{WRAPPER}} .premium-persons-container .slick-arrow i' => 'font-size: {{SIZE}}{{UNIT}};',
1828 ),
1829 )
1830 );
1831
1832 $this->add_control(
1833 'arrow_background',
1834 array(
1835 'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
1836 'type' => Controls_Manager::COLOR,
1837 'global' => array(
1838 'default' => Global_Colors::COLOR_SECONDARY,
1839 ),
1840 'selectors' => array(
1841 '{{WRAPPER}} .premium-persons-container .slick-arrow' => 'background-color: {{VALUE}};',
1842 ),
1843 )
1844 );
1845
1846 $this->add_control(
1847 'arrow_hover_background',
1848 array(
1849 'label' => __( 'Background Hover Color', 'premium-addons-for-elementor' ),
1850 'type' => Controls_Manager::COLOR,
1851 'global' => array(
1852 'default' => Global_Colors::COLOR_SECONDARY,
1853 ),
1854 'selectors' => array(
1855 '{{WRAPPER}} .premium-persons-container .slick-arrow:hover' => 'background-color: {{VALUE}};',
1856 ),
1857 )
1858 );
1859
1860 $this->add_control(
1861 'arrow_border_radius',
1862 array(
1863 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
1864 'type' => Controls_Manager::SLIDER,
1865 'size_units' => array( 'px', '%', 'em' ),
1866 'selectors' => array(
1867 '{{WRAPPER}} .premium-persons-container .slick-arrow' => 'border-radius: {{SIZE}}{{UNIT}};',
1868 ),
1869 )
1870 );
1871
1872 $this->add_control(
1873 'arrow_padding',
1874 array(
1875 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
1876 'type' => Controls_Manager::SLIDER,
1877 'size_units' => array( 'px', '%', 'em' ),
1878 'selectors' => array(
1879 '{{WRAPPER}} .premium-persons-container .slick-arrow' => 'padding: {{SIZE}}{{UNIT}};',
1880 ),
1881 )
1882 );
1883
1884 $this->end_controls_section();
1885 }
1886
1887 /**
1888 * Render Persons widget output on the frontend.
1889 *
1890 * Written in PHP and used to generate the final HTML.
1891 *
1892 * @since 1.0.0
1893 * @access protected
1894 */
1895 protected function render() {
1896
1897 $settings = $this->get_settings_for_display();
1898
1899 $image_effect = $settings['premium_person_hover_image_effect'];
1900
1901 $image_html = '';
1902 if ( ! empty( $settings['premium_person_image']['url'] ) ) {
1903 $image_html = Group_Control_Image_Size::get_attachment_image_html( $settings, 'thumbnail', 'premium_person_image' );
1904 }
1905
1906 $this->add_render_attribute(
1907 'persons_container',
1908 'class',
1909 array(
1910 'premium-persons-container',
1911 'premium-person-' . $settings['premium_person_style'],
1912 )
1913 );
1914
1915 $this->add_render_attribute(
1916 'person_container',
1917 'class',
1918 array(
1919 'premium-person-container',
1920 'premium-person-' . $image_effect . '-effect',
1921 )
1922 );
1923
1924 if ( 'yes' === $settings['multiple'] ) {
1925 $persons = $settings['multiple_persons'];
1926 $this->add_render_attribute( 'persons_container', 'class', 'multiple-persons' );
1927 $this->add_render_attribute( 'persons_container', 'data-persons-equal', $settings['multiple_equal_height'] );
1928 } else {
1929 $this->add_render_attribute( 'premium_person_profile', 'class', 'premium-person-link' );
1930 $this->add_link_attributes( 'premium_person_profile', $settings['premium_person_profile'] );
1931 }
1932
1933 $carousel = 'yes' === $settings['carousel'] ? true : false;
1934
1935 if ( $carousel ) {
1936
1937 $this->add_render_attribute( 'persons_container', 'data-carousel', $carousel );
1938
1939 $this->add_render_attribute(
1940 'persons_container',
1941 array(
1942 'data-rtl' => is_rtl(),
1943 )
1944 );
1945
1946 }
1947
1948 $this->add_render_attribute( 'info_container', 'class', 'premium-person-info' );
1949
1950 if ( 'none' !== $settings['body_lq_effect'] && 'style3' !== $settings['premium_person_style'] ) {
1951 $this->add_render_attribute( 'info_container', 'class', 'premium-con-lq__' . $settings['body_lq_effect'] );
1952 }
1953
1954 ?>
1955 <div <?php $this->print_render_attribute_string( 'persons_container' ); ?>>
1956 <?php if ( 'yes' !== $settings['multiple'] ) : ?>
1957 <div <?php $this->print_render_attribute_string( 'person_container' ); ?>>
1958
1959 <div class="premium-person-image-container">
1960 <?php if ( 'style3' !== $settings['premium_person_style'] && ! empty( $settings['premium_person_profile']['url'] ) ) { ?>
1961 <a <?php $this->print_render_attribute_string( 'premium_person_profile' ); ?>>
1962 <?php echo wp_kses_post( $image_html ); ?>
1963 </a>
1964 <?php
1965 } else {
1966 echo wp_kses_post( $image_html );
1967 }
1968 ?>
1969
1970 <?php if ( 'style2' === $settings['premium_person_style'] && 'yes' === $settings['premium_person_social_enable'] ) : ?>
1971 <div class="premium-person-social">
1972 <?php $this->get_social_icons(); ?>
1973 </div>
1974 <?php endif; ?>
1975 </div>
1976 <div <?php $this->print_render_attribute_string( 'info_container' ); ?>>
1977 <?php $this->render_person_info(); ?>
1978 </div>
1979 </div>
1980 <?php
1981 else :
1982 foreach ( $persons as $index => $person ) {
1983
1984 $person_image_html = '';
1985
1986 // Add profile link for each person
1987 if ( ! empty( $person['multiple_profile']['url'] ) ) {
1988 $this->add_render_attribute( 'premium_multiple_profile_' . $index, 'class', 'premium-person-link' );
1989 $this->add_link_attributes( 'premium_multiple_profile_' . $index, $person['multiple_profile'] );
1990 }
1991
1992 if ( ! empty( $person['multiple_image']['url'] ) ) {
1993
1994 $image_src = $person['multiple_image']['url'];
1995 $image_id = attachment_url_to_postid( $image_src );
1996
1997 $settings['image_data'] = Helper_Functions::get_image_data( $image_id, $person['multiple_image']['url'], $settings['thumbnail_size'] );
1998 $person_image_html = Group_Control_Image_Size::get_attachment_image_html( $settings, 'thumbnail', 'image_data' );
1999
2000 if ( 'style3' !== $settings['premium_person_style'] && ! empty( $person['multiple_profile']['url'] ) ) {
2001 $person_image_html = '<a ' . wp_kses_post( $this->get_render_attribute_string( 'premium_multiple_profile_' . $index ) ) . '>' . $person_image_html . '</a>';
2002 }
2003 }
2004
2005 ?>
2006 <div <?php $this->print_render_attribute_string( 'person_container' ); ?>>
2007 <div class="premium-person-image-container">
2008 <?php echo wp_kses_post( $person_image_html ); ?>
2009 <?php if ( 'style2' === $settings['premium_person_style'] && 'yes' === $person['multiple_social_enable'] ) : ?>
2010 <div class="premium-person-social">
2011 <?php $this->get_social_icons( $person ); ?>
2012 </div>
2013 <?php endif; ?>
2014 </div>
2015 <div <?php $this->print_render_attribute_string( 'info_container' ); ?>>
2016 <?php $this->render_person_info( $person, $index ); ?>
2017 </div>
2018 </div>
2019 <?php
2020 }
2021 endif;
2022 ?>
2023 </div>
2024 <?php
2025 }
2026
2027 /**
2028 * Get Social Icons
2029 *
2030 * Render person social icons list
2031 *
2032 * @since 3.8.4
2033 * @access protected
2034 *
2035 * @param object $person current person.
2036 */
2037 private function get_social_icons( $person = '' ) {
2038
2039 $settings = $this->get_settings_for_display();
2040
2041 $social_sites = array(
2042 'facebook' => 'fab fa-facebook-f',
2043 'twitter' => 'fab fa-twitter',
2044 'linkedin' => 'fab fa-linkedin',
2045 'google' => 'fab fa-google-plus',
2046 'youtube' => 'fab fa-youtube',
2047 'instagram' => 'fab fa-instagram',
2048 'skype' => 'fab fa-skype',
2049 'pinterest' => 'fab fa-pinterest',
2050 'dribbble' => 'fab fa-dribbble',
2051 'behance' => 'fab fa-behance',
2052 'whatsapp' => 'fab fa-whatsapp',
2053 'telegram' => 'fab fa-telegram',
2054 'mail' => 'fa fa-envelope',
2055 'site' => 'fa fa-link',
2056 'number' => 'fa fa-phone',
2057 );
2058
2059 echo '<ul class="premium-person-social-list">';
2060
2061 do_action( 'pa_before_member_icon' );
2062
2063 foreach ( $social_sites as $site => $icon ) {
2064
2065 if ( ! \Elementor\Plugin::instance()->editor->is_edit_mode() ) {
2066 if ( 'number' === $site && ! wp_is_mobile() ) {
2067 continue;
2068 }
2069 }
2070
2071 $value = ( '' === $person ) ? $settings[ 'premium_person_' . $site ] : $person[ 'multiple_' . $site ];
2072
2073 if ( ! empty( $value ) ) {
2074 $icon_class = sprintf( 'elementor-icon premium-person-list-item premium-person-%s', $site );
2075 ?>
2076 <li class="<?php echo esc_attr( $icon_class ); ?>">
2077 <a href="<?php echo esc_url( $value ); ?>" target="_blank">
2078 <i class="<?php echo esc_attr( $icon ); ?>" aria-hidden="true"></i>
2079 </a>
2080 </li>
2081 <?php
2082 }
2083 }
2084
2085 do_action( 'pa_after_member_icon' );
2086
2087 echo '</ul>';
2088 }
2089
2090 /**
2091 * Render Person Info
2092 *
2093 * @since 3.12.0
2094 * @access protected
2095 *
2096 * @param object $person current person.
2097 * @param integer $index person index.
2098 */
2099 protected function render_person_info( $person = '', $index = '' ) {
2100
2101 $settings = $this->get_settings_for_display();
2102
2103 $this->add_inline_editing_attributes( 'premium_person_name', 'advanced' );
2104 $this->add_render_attribute( 'premium_person_name', 'class', 'premium-person-name' );
2105
2106 $this->add_inline_editing_attributes( 'premium_person_title', 'advanced' );
2107 $this->add_render_attribute( 'premium_person_title', 'class', 'premium-person-title' );
2108
2109 $this->add_inline_editing_attributes( 'premium_person_content', 'advanced' );
2110 $this->add_render_attribute( 'premium_person_content', 'class', 'premium-person-content' );
2111
2112 $name_heading = Helper_Functions::validate_html_tag( $settings['premium_person_name_heading'] );
2113
2114 $title_heading = Helper_Functions::validate_html_tag( $settings['premium_person_title_heading'] );
2115
2116 $skin = $settings['premium_person_style'];
2117
2118 if ( empty( $person ) ) :
2119 ?>
2120 <div class="premium-person-info-container">
2121 <?php
2122 if ( 'style3' !== $skin && ! empty( $settings['premium_person_name'] ) ) :
2123 $name_tag_open = '<' . wp_kses_post( $name_heading ) . ' ' . $this->get_render_attribute_string( 'premium_person_name' ) . '>';
2124 $name_tag_close = '</' . wp_kses_post( $name_heading ) . '>';
2125 $name_content = wp_kses_post( $settings['premium_person_name'] );
2126 $name_html = $name_tag_open . $name_content . $name_tag_close;
2127 ?>
2128 <?php if ( ! empty( $settings['premium_person_profile']['url'] ) ) { ?>
2129 <a <?php $this->print_render_attribute_string( 'premium_person_profile' ); ?>>
2130 <?php echo $name_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
2131 </a>
2132 <?php
2133 } else {
2134 echo $name_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
2135 }
2136 ?>
2137 <?php
2138 endif;
2139
2140 if ( 'style3' === $skin ) :
2141 ?>
2142 <div class="premium-person-title-desc-wrap">
2143 <?php
2144 endif;
2145 if ( ! empty( $settings['premium_person_title'] ) ) :
2146 ?>
2147 <<?php echo wp_kses_post( $title_heading . ' ' . $this->get_render_attribute_string( 'premium_person_title' ) ); ?>>
2148 <span><?php echo wp_kses_post( $settings['premium_person_title'] ); ?></span>
2149 </<?php echo wp_kses_post( $title_heading ); ?>>
2150 <?php
2151 endif;
2152
2153 if ( ! empty( $settings['premium_person_content'] ) ) :
2154 ?>
2155 <div <?php $this->print_render_attribute_string( 'premium_person_content' ); ?>>
2156 <?php echo $this->parse_text_editor( $settings['premium_person_content'] ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
2157 </div>
2158 <?php
2159 endif;
2160 if ( 'style3' === $skin ) :
2161 ?>
2162 </div>
2163 <?php
2164 endif;
2165
2166 if ( 'style3' === $skin ) :
2167 ?>
2168 <div class="premium-person-name-icons-wrap">
2169 <?php
2170 if ( ! empty( $settings['premium_person_name'] ) ) :
2171 $name_heading_tag = esc_html( $name_heading );
2172 $name_tag_open = '<' . $name_heading_tag . ' class="premium-person-name">';
2173 $name_tag_close = '</' . $name_heading_tag . '>';
2174 $name_span = '<span ' . $this->get_render_attribute_string( 'premium_person_name' ) . '>' .
2175 wp_kses_post( $settings['premium_person_name'] ) .
2176 '</span>';
2177 $name_html = $name_tag_open . $name_span . $name_tag_close;
2178 ?>
2179 <?php if ( ! empty( $settings['premium_person_profile']['url'] ) ) { ?>
2180 <a <?php $this->print_render_attribute_string( 'premium_person_profile' ); ?>>
2181 <?php echo $name_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
2182 </a>
2183 <?php
2184 } else {
2185 echo $name_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
2186 }
2187 ?>
2188
2189 <?php
2190 endif;
2191 if ( 'yes' === $settings['premium_person_social_enable'] ) :
2192 $this->get_social_icons();
2193 endif;
2194 ?>
2195 </div>
2196 <?php
2197 endif;
2198
2199 if ( 'style1' === $settings['premium_person_style'] && 'yes' === $settings['premium_person_social_enable'] ) :
2200 $this->get_social_icons();
2201 endif;
2202 ?>
2203 </div>
2204 <?php
2205 else :
2206
2207 $name_setting_key = $this->get_repeater_setting_key( 'multiple_name', 'multiple_persons', $index );
2208 $title_setting_key = $this->get_repeater_setting_key( 'multiple_title', 'multiple_persons', $index );
2209 $desc_setting_key = $this->get_repeater_setting_key( 'multiple_description', 'multiple_persons', $index );
2210
2211 $this->add_inline_editing_attributes( $name_setting_key, 'advanced' );
2212 $this->add_render_attribute( $name_setting_key, 'class', 'premium-person-name' );
2213
2214 $this->add_inline_editing_attributes( $title_setting_key, 'advanced' );
2215 $this->add_render_attribute( $title_setting_key, 'class', 'premium-person-title' );
2216
2217 $this->add_inline_editing_attributes( $desc_setting_key, 'advanced' );
2218 $this->add_render_attribute( $desc_setting_key, 'class', 'premium-person-content' );
2219
2220 ?>
2221 <div class="premium-person-info-container">
2222 <?php
2223 if ( 'style3' !== $skin && ! empty( $person['multiple_name'] ) ) :
2224 $name_tag_open = '<' . esc_html( $name_heading ) . ' ' . $this->get_render_attribute_string( $name_setting_key ) . '>';
2225 $name_tag_close = '</' . esc_html( $name_heading ) . '>';
2226 $name_content = wp_kses_post( $person['multiple_name'] );
2227 $name_html_multiple = $name_tag_open . $name_content . $name_tag_close;
2228 ?>
2229 <?php if ( ! empty( $person['multiple_profile']['url'] ) ) { ?>
2230 <a <?php $this->print_render_attribute_string( 'premium_multiple_profile_' . $index ); ?>>
2231 <?php echo $name_html_multiple; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
2232 </a>
2233 <?php
2234 } else {
2235 echo $name_html_multiple; } // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
2236 ?>
2237
2238 <?php
2239 endif;
2240
2241 if ( 'style3' === $skin ) :
2242 ?>
2243 <div class="premium-person-title-desc-wrap">
2244 <?php
2245 endif;
2246 if ( ! empty( $person['multiple_title'] ) ) :
2247 ?>
2248 <<?php echo wp_kses_post( $title_heading . ' ' . $this->get_render_attribute_string( $title_setting_key ) ); ?>>
2249 <span><?php echo wp_kses_post( $person['multiple_title'] ); ?></span>
2250 </<?php echo wp_kses_post( $title_heading ); ?>>
2251 <?php
2252 endif;
2253
2254 if ( ! empty( $person['multiple_description'] ) ) :
2255 ?>
2256 <div <?php $this->print_render_attribute_string( $desc_setting_key ); ?>>
2257 <?php echo $this->parse_text_editor( $person['multiple_description'] ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
2258 </div>
2259 <?php
2260 endif;
2261 if ( 'style3' === $skin ) :
2262 ?>
2263 </div>
2264 <?php
2265 endif;
2266
2267 if ( 'style3' === $skin ) :
2268
2269 ?>
2270 <div class="premium-person-name-icons-wrap">
2271 <?php
2272 if ( ! empty( $person['multiple_name'] ) ) :
2273 $name_tag_open = '<' . esc_html( $name_heading ) . ' class="premium-person-name">';
2274 $name_tag_close = '</' . esc_html( $name_heading ) . '>';
2275 $name_content = '<span ' . $this->get_render_attribute_string( $name_setting_key ) . '>' . wp_kses_post( $person['multiple_name'] ) . '</span>';
2276 $name_html_multiple = $name_tag_open . $name_content . $name_tag_close;
2277 ?>
2278 <?php if ( ! empty( $person['multiple_profile']['url'] ) ) { ?>
2279 <a <?php $this->print_render_attribute_string( 'premium_multiple_profile_' . $index ); ?>>
2280 <?php echo $name_html_multiple; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
2281 </a>
2282 <?php
2283 } else {
2284 echo $name_html_multiple; } // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
2285 ?>
2286
2287 <?php
2288 endif;
2289 if ( 'yes' === $person['multiple_social_enable'] ) :
2290 $this->get_social_icons( $person );
2291 endif;
2292 ?>
2293 </div>
2294 <?php
2295 endif;
2296
2297 if ( 'style1' === $settings['premium_person_style'] && 'yes' === $person['multiple_social_enable'] ) :
2298 $this->get_social_icons( $person );
2299 endif;
2300 ?>
2301 </div>
2302 <?php
2303 endif;
2304 }
2305
2306
2307 /**
2308 * Render Persons widget output in the editor.
2309 *
2310 * Written as a Backbone JavaScript template and used to generate the live preview.
2311 *
2312 * @since 1.0.0
2313 * @access protected
2314 */
2315 protected function content_template() {
2316 ?>
2317 <#
2318
2319 view.addInlineEditingAttributes( 'premium_person_name', 'advanced' );
2320 view.addRenderAttribute( 'premium_person_name', 'class', 'premium-person-name' );
2321
2322 view.addInlineEditingAttributes( 'premium_person_title', 'advanced' );
2323 view.addRenderAttribute( 'premium_person_title', 'class', 'premium-person-title' );
2324
2325 view.addInlineEditingAttributes( 'premium_person_content', 'advanced' );
2326 view.addRenderAttribute( 'premium_person_content', 'class', 'premium-person-content' );
2327
2328 var nameHeading = elementor.helpers.validateHTMLTag( settings.premium_person_name_heading ),
2329
2330 titleHeading = elementor.helpers.validateHTMLTag( settings.premium_person_title_heading ),
2331
2332 imageEffect = 'premium-person-' + settings.premium_person_hover_image_effect + '-effect' ;
2333
2334 skin = settings.premium_person_style;
2335
2336 view.addRenderAttribute( 'persons_container', 'class', [ 'premium-persons-container', 'premium-person-' + skin ] );
2337
2338 view.addRenderAttribute( 'person_container', 'class', [ 'premium-person-container', imageEffect ] );
2339
2340 view.addRenderAttribute( 'premium_person_profile', 'href', settings.premium_person_profile.url );
2341
2342
2343 var imageHtml = '';
2344 if ( settings.premium_person_image.url ) {
2345 var image = {
2346 id: settings.premium_person_image.id,
2347 url: settings.premium_person_image.url,
2348 size: settings.thumbnail_size,
2349 dimension: settings.thumbnail_custom_dimension,
2350 model: view.getEditModel()
2351 };
2352
2353 var image_url = elementor.imagesManager.getImageUrl( image );
2354
2355 }
2356
2357 if ( settings.multiple ) {
2358 var persons = settings.multiple_persons;
2359 view.addRenderAttribute( 'persons_container', 'class', 'multiple-persons' );
2360 view.addRenderAttribute( 'persons_container', 'data-persons-equal', settings.multiple_equal_height );
2361 }
2362
2363 var carousel = 'yes' === settings.carousel ? true : false;
2364
2365 if( carousel ) {
2366
2367 view.addRenderAttribute('persons_container', {
2368 'data-carousel': carousel,
2369 });
2370
2371 }
2372
2373
2374 function getSocialIcons( person = null ) {
2375
2376 var personSettings,
2377 socialIcons;
2378
2379 if( null === person ) {
2380 personSettings = settings;
2381 socialIcons = {
2382 facebook: settings.premium_person_facebook,
2383 twitter: settings.premium_person_twitter,
2384 linkedin: settings.premium_person_linkedin,
2385 google: settings.premium_person_google,
2386 youtube: settings.premium_person_youtube,
2387 instagram: settings.premium_person_instagram,
2388 skype: settings.premium_person_skype,
2389 pinterest: settings.premium_person_pinterest,
2390 dribbble: settings.premium_person_dribbble,
2391 behance: settings.premium_person_behance,
2392 whatsapp: settings.premium_person_whatsapp,
2393 telegram: settings.premium_person_telegram,
2394 mail: settings.premium_person_mail,
2395 site: settings.premium_person_site,
2396 number: settings.premium_person_number
2397 };
2398 } else {
2399 personSettings = person;
2400 socialIcons = {
2401 facebook: person.multiple_facebook,
2402 twitter: person.multiple_twitter,
2403 linkedin: person.multiple_linkedin,
2404 google: person.multiple_google,
2405 youtube: person.multiple_youtube,
2406 instagram: person.multiple_instagram,
2407 skype: person.multiple_skype,
2408 pinterest: person.multiple_pinterest,
2409 dribbble: person.multiple_dribbble,
2410 behance: person.multiple_behance,
2411 whatsapp: person.multiple_whatsapp,
2412 telegram: person.multiple_telegram,
2413 mail: person.multiple_mail,
2414 site: person.multiple_site,
2415 number: person.multiple_number
2416 };
2417 }
2418
2419 #>
2420 <ul class="premium-person-social-list">
2421 <# if( '' != socialIcons.facebook ) { #>
2422 <li class="elementor-icon premium-person-list-item premium-person-facebook"><a href="{{ socialIcons.facebook }}" target="_blank"><i class="fab fa-facebook-f" aria-hidden="true"></i></a></li>
2423 <# } #>
2424
2425 <# if( '' != socialIcons.twitter ) { #>
2426 <li class="elementor-icon premium-person-list-item premium-person-twitter"><a href="{{ socialIcons.twitter }}" target="_blank"><i class="fab fa-twitter" aria-hidden="true"></i></a></li>
2427 <# } #>
2428
2429 <# if( '' != socialIcons.linkedin ) { #>
2430 <li class="elementor-icon premium-person-list-item premium-person-linkedin"><a href="{{ socialIcons.linkedin }}" target="_blank"><i class="fab fa-linkedin" aria-hidden="true"></i></a></li>
2431 <# } #>
2432
2433 <# if( '' != socialIcons.google ) { #>
2434 <li class="elementor-icon premium-person-list-item premium-person-google"><a href="{{ socialIcons.google }}" target="_blank"><i class="fab fa-google-plus" aria-hidden="true"></i></a></li>
2435 <# } #>
2436
2437 <# if( '' != socialIcons.youtube ) { #>
2438 <li class="elementor-icon premium-person-list-item premium-person-youtube"><a href="{{ socialIcons.youtube }}" target="_blank"><i class="fab fa-youtube" aria-hidden="true"></i></a></li>
2439 <# } #>
2440
2441 <# if( '' != socialIcons.instagram ) { #>
2442 <li class="elementor-icon premium-person-list-item premium-person-instagram"><a href="{{ socialIcons.instagram }}" target="_blank"><i class="fab fa-instagram" aria-hidden="true"></i></a></li>
2443 <# } #>
2444
2445 <# if( '' != socialIcons.skype ) { #>
2446 <li class="elementor-icon premium-person-list-item premium-person-skype"><a href="{{ socialIcons.skype }}" target="_blank"><i class="fab fa-skype" aria-hidden="true"></i></a></li>
2447 <# } #>
2448
2449 <# if( '' != socialIcons.pinterest ) { #>
2450 <li class="elementor-icon premium-person-list-item premium-person-pinterest"><a href="{{ socialIcons.pinterest }}" target="_blank"><i class="fab fa-pinterest" aria-hidden="true"></i></a></li>
2451 <# } #>
2452
2453 <# if( '' != socialIcons.dribbble ) { #>
2454 <li class="elementor-icon premium-person-list-item premium-person-dribbble"><a href="{{ socialIcons.dribbble }}" target="_blank"><i class="fab fa-dribbble" aria-hidden="true"></i></a></li>
2455 <# } #>
2456
2457 <# if( '' != socialIcons.behance ) { #>
2458 <li class="elementor-icon premium-person-list-item premium-person-behance"><a href="{{ socialIcons.behance }}" target="_blank"><i class="fab fa-behance" aria-hidden="true"></i></a></li>
2459 <# } #>
2460
2461 <# if( '' != socialIcons.whatsapp ) { #>
2462 <li class="elementor-icon premium-person-list-item premium-person-whatsapp"><a href="{{ socialIcons.whatsapp }}" target="_blank"><i class="fab fa-whatsapp" aria-hidden="true"></i></a></li>
2463 <# } #>
2464
2465 <# if( '' != socialIcons.telegram ) { #>
2466 <li class="elementor-icon premium-person-list-item premium-person-telegram"><a href="{{ socialIcons.mail }}" target="_blank"><i class="fab fa-telegram" aria-hidden="true"></i></a></li>
2467 <# } #>
2468
2469 <# if( '' != socialIcons.mail ) { #>
2470 <li class="elementor-icon premium-person-list-item premium-person-mail"><a href="{{ socialIcons.mail }}" target="_blank"><i class="fa fa-envelope" aria-hidden="true"></i></a></li>
2471 <# } #>
2472
2473 <# if( '' != socialIcons.site ) { #>
2474 <li class="elementor-icon premium-person-list-item premium-person-site"><a href="{{ socialIcons.site }}" target="_blank"><i class="fa fa-link" aria-hidden="true"></i></a></li>
2475 <# } #>
2476
2477 <# if( '' != socialIcons.number ) { #>
2478 <li class="elementor-icon premium-person-list-item premium-person-number"><a href="{{ socialIcons.number }}" target="_blank"><i class="fa fa-phone" aria-hidden="true"></i></a></li>
2479 <# } #>
2480
2481 </ul>
2482 <# }
2483
2484 view.addRenderAttribute( 'info_container', 'class', 'premium-person-info' );
2485
2486 if( 'none' !== settings.body_lq_effect && 'style3' !== settings.premium_person_style ) {
2487 view.addRenderAttribute( 'info_container', 'class', 'premium-con-lq__' + settings.body_lq_effect );
2488 }
2489 #>
2490
2491 <div {{{ view.getRenderAttributeString('persons_container') }}}>
2492 <# if( 'yes' !== settings.multiple ) { #>
2493 <div {{{ view.getRenderAttributeString('person_container') }}}>
2494 <div class="premium-person-image-container">
2495 <# if ( '' !== settings.premium_person_profile.url ) { #>
2496 <a {{{ view.getRenderAttributeString('premium_person_profile') }}}>
2497 <img src="{{ image_url }}"/>
2498 </a>
2499 <# } else { #>
2500 <img src="{{ image_url }}"/>
2501 <# } #>
2502 <# if ( 'style2' === settings.premium_person_style && 'yes' === settings.premium_person_social_enable ) { #>
2503 <div class="premium-person-social">
2504 <# getSocialIcons(); #>
2505 </div>
2506 <# } #>
2507 </div>
2508 <div {{{ view.getRenderAttributeString('info_container') }}}>
2509 <div class="premium-person-info-container">
2510 <# if( 'style3' !== skin && '' != settings.premium_person_name ) { #>
2511 <# if ( '' !== settings.premium_person_profile.url ) { #>
2512 <a {{{ view.getRenderAttributeString('premium_person_profile') }}}>
2513 <{{{nameHeading}}} {{{ view.getRenderAttributeString('premium_person_name') }}}>
2514 {{{ settings.premium_person_name }}}
2515 </{{{nameHeading}}}>
2516 </a>
2517 <# } else { #>
2518 <{{{nameHeading}}} {{{ view.getRenderAttributeString('premium_person_name') }}}>
2519 {{{ settings.premium_person_name }}}
2520 </{{{nameHeading}}}>
2521 <# } #>
2522 <# }
2523
2524 if( 'style3' === skin ) { #>
2525 <div class="premium-person-title-desc-wrap">
2526 <# }
2527 if( '' != settings.premium_person_title ) { #>
2528 <{{{titleHeading}}} {{{ view.getRenderAttributeString('premium_person_title') }}}>
2529 <span>{{{ settings.premium_person_title }}}</span>
2530 </{{{titleHeading}}}>
2531 <# }
2532 if( '' != settings.premium_person_content ) { #>
2533 <div {{{ view.getRenderAttributeString('premium_person_content') }}}>
2534 {{{ settings.premium_person_content }}}
2535 </div>
2536 <# }
2537 if( 'style3' === skin ) { #>
2538 </div>
2539 <# }
2540
2541 if( 'style3' === skin ) { #>
2542 <div class="premium-person-name-icons-wrap">
2543 <# if( '' != settings.premium_person_name ) { #>
2544 <# if ( '' !== settings.premium_person_profile.url ) { #>
2545 <a {{{ view.getRenderAttributeString('premium_person_profile') }}}>
2546 <{{{nameHeading}}} {{{ view.getRenderAttributeString('premium_person_name') }}}>
2547 {{{ settings.premium_person_name }}}
2548 </{{{nameHeading}}}>
2549 </a>
2550 <# } else { #>
2551 <{{{nameHeading}}} {{{ view.getRenderAttributeString('premium_person_name') }}}>
2552 {{{ settings.premium_person_name }}}
2553 </{{{nameHeading}}}>
2554 <# } #>
2555 <# }
2556 if( 'yes' === settings.premium_person_social_enable ) {
2557 getSocialIcons();
2558 } #>
2559 </div>
2560 <# }
2561
2562 if ( 'style1' === settings.premium_person_style && 'yes' === settings.premium_person_social_enable ) {
2563 getSocialIcons();
2564 } #>
2565 </div>
2566 </div>
2567 </div>
2568 <# } else {
2569 _.each( persons, function( person, index ) {
2570 var nameSettingKey = view.getRepeaterSettingKey( 'multiple_name', 'multiple_persons', index ),
2571 titleSettingKey = view.getRepeaterSettingKey( 'multiple_title', 'multiple_persons', index ),
2572 descSettingKey = view.getRepeaterSettingKey( 'multiple_description', 'multiple_persons', index );
2573
2574
2575 view.addInlineEditingAttributes( nameSettingKey, 'advanced' );
2576 view.addRenderAttribute( nameSettingKey, 'class', 'premium-person-name' );
2577
2578 view.addInlineEditingAttributes( titleSettingKey, 'advanced' );
2579 view.addRenderAttribute( titleSettingKey, 'class', 'premium-person-title' );
2580
2581 view.addInlineEditingAttributes( descSettingKey, 'advanced' );
2582 view.addRenderAttribute( descSettingKey, 'class', 'premium-person-content' );
2583
2584 if ( person.multiple_profile && person.multiple_profile.url ) {
2585 profileKey = 'premium_multiple_profile_' + index;
2586 view.addRenderAttribute( profileKey, 'href', person.multiple_profile.url );
2587 }
2588 var personImageHtml = '';
2589 if ( person.multiple_image.url ) {
2590 var personImage = {
2591 id: person.multiple_image.id,
2592 url: person.multiple_image.url,
2593 size: settings.thumbnail_size,
2594 dimension: settings.thumbnail_custom_dimension,
2595 model: view.getEditModel()
2596 };
2597
2598 var personImageUrl = elementor.imagesManager.getImageUrl( personImage );
2599
2600 }
2601 #>
2602 <div {{{ view.getRenderAttributeString('person_container') }}}>
2603 <div class="premium-person-image-container">
2604 <# if ( '' !== person.multiple_profile.url) { #>
2605 <a {{{ view.getRenderAttributeString('premium_multiple_profile_' + index) }}}>
2606 <img src="{{ personImageUrl }}"/>
2607 </a>
2608 <# } else { #>
2609 <img src="{{ personImageUrl }}"/>
2610 <# } #>
2611 <# if ( 'style2' === settings.premium_person_style && 'yes' === person.multiple_social_enable ) { #>
2612 <div class="premium-person-social">
2613 <# getSocialIcons( person ); #>
2614 </div>
2615 <# } #>
2616 </div>
2617 <div {{{ view.getRenderAttributeString('info_container') }}}>
2618 <div class="premium-person-info-container">
2619 <# if( 'style3' !== skin && '' != person.multiple_name ) { #>
2620 <# if ( '' !== person.multiple_profile.url ) { #>
2621 <a {{{ view.getRenderAttributeString('premium_multiple_profile_' + index) }}}>
2622 <{{{nameHeading}}} {{{ view.getRenderAttributeString( nameSettingKey ) }}}>
2623 {{{ person.multiple_name }}}
2624 </{{{nameHeading}}}>
2625 </a>
2626 <# } else { #>
2627 <{{{nameHeading}}} {{{ view.getRenderAttributeString( nameSettingKey ) }}}>
2628 {{{ person.multiple_name }}}
2629 </{{{nameHeading}}}>
2630 <# } #>
2631 <# }
2632
2633 if( 'style3' === skin ) { #>
2634 <div class="premium-person-title-desc-wrap">
2635 <# }
2636 if( '' != person.multiple_title ) { #>
2637 <{{{titleHeading}}} {{{ view.getRenderAttributeString( titleSettingKey ) }}}>
2638 <span>{{{ person.multiple_title }}}</span>
2639 </{{{titleHeading}}}>
2640 <# }
2641 if( '' != person.multiple_description ) { #>
2642 <div {{{ view.getRenderAttributeString( descSettingKey ) }}}>
2643 {{{ person.multiple_description }}}
2644 </div>
2645 <# }
2646 if( 'style3' === skin ) { #>
2647 </div>
2648 <# }
2649
2650 if( 'style3' === skin ) { #>
2651 <div class="premium-person-name-icons-wrap">
2652 <# if( '' != settings.premium_person_name ) { #>
2653 <# if ('' !== person.multiple_profile.url ) { #>
2654 <a {{{ view.getRenderAttributeString('premium_multiple_profile_' + index) }}}>
2655 <{{{nameHeading}}} {{{ view.getRenderAttributeString( nameSettingKey ) }}}>
2656 {{{ person.multiple_name }}}
2657 </{{{nameHeading}}}>
2658 </a>
2659 <# } else { #>
2660 <{{{nameHeading}}} {{{ view.getRenderAttributeString( nameSettingKey ) }}}>
2661 {{{ person.multiple_name }}}
2662 </{{{nameHeading}}}>
2663 <# } #>
2664 <# }
2665 if( 'yes' === person.multiple_social_enable ) {
2666 getSocialIcons( person );
2667 } #>
2668 </div>
2669 <# }
2670
2671 if ( 'style1' === settings.premium_person_style && 'yes' === person.multiple_social_enable ) {
2672 getSocialIcons( person );
2673 } #>
2674 </div>
2675 </div>
2676 </div>
2677 <# });
2678 } #>
2679
2680 </div>
2681 <?php
2682 }
2683 }
2684