PluginProbe ʕ •ᴥ•ʔ
Shortcodes and extra features for Phlox theme / 1.7.0
Shortcodes and extra features for Phlox theme v1.7.0
2.17.22 2.17.21 2.17.20 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.6 1.0.9 1.1.0 1.3.0 1.3.1 1.3.10 1.3.14 1.3.2 1.3.3 1.3.6 1.4.0 1.4.1 1.4.2 1.5.0 1.5.2 1.6.0 1.6.2 1.6.4 1.7.0 1.7.2 2.10.0 2.10.1 2.10.3 2.10.5 2.10.7 2.10.8 2.10.9 2.11.0 2.11.1 2.11.2 2.12.0 2.14.0 2.15.0 2.15.2 2.15.4 2.15.5 2.15.6 2.15.7 2.15.8 2.15.9 2.16.0 2.16.1 2.16.2 2.16.3 2.16.4 2.17.0 2.17.1 2.17.12 2.17.13 2.17.14 2.17.15 2.17.16 2.17.2 2.17.3 2.17.4 2.17.5 2.17.6 2.17.8 2.17.9 2.4.12 2.4.13 2.4.14 2.4.16 2.4.18 2.4.19 2.4.9 2.5.0 2.5.1 2.5.10 2.5.11 2.5.12 2.5.13 2.5.14 2.5.15 2.5.16 2.5.17 2.5.19 2.5.2 2.5.20 2.5.3 2.5.7 2.5.8 2.5.9 2.6.0 2.6.1 2.6.10 2.6.12 2.6.13 2.6.14 2.6.15 2.6.16 2.6.17 2.6.19 2.6.2 2.6.20 2.6.4 2.6.5 2.6.7 2.7.0 2.7.1 2.7.10 2.7.11 2.7.12 2.7.13 2.7.14 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 2.8.0 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.9 2.9.0 2.9.12 2.9.14 2.9.15 2.9.16 2.9.17 2.9.18 2.9.19 2.9.2 2.9.20 2.9.21 2.9.22 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 2.9.8
auxin-elements / includes / elements / text.php
auxin-elements / includes / elements Last commit date
about-widget.php 8 years ago accordion-api.php 9 years ago accordion.php 8 years ago attachment-url.php 9 years ago audio.php 8 years ago before-after.php 8 years ago button.php 8 years ago code.php 8 years ago contact-box.php 8 years ago contact-form.php 8 years ago divider.php 8 years ago dropcap.php 8 years ago facebook.php 8 years ago flickr.php 8 years ago gallery.php 8 years ago gmap.php 8 years ago highlight.php 8 years ago image.php 8 years ago instagram-feed.php 8 years ago latest-items.php 8 years ago latest-posts-slider.php 8 years ago popular-posts-widget.php 8 years ago quote.php 8 years ago recent-posts-grid-carousel.php 8 years ago recent-posts-land-style.php 8 years ago recent-posts-masonry.php 8 years ago recent-posts-tiles.php 8 years ago recent-posts-timeline.php 8 years ago recent-posts-widget.php 8 years ago recent-posts.php 9 years ago related-posts.php 9 years ago sample-element.php 9 years ago search.php 8 years ago slider.php 9 years ago socials-list.php 8 years ago staff.php 8 years ago tabs-api.php 9 years ago tabs.php 8 years ago testimonial.php 8 years ago testomonial.php 8 years ago text.php 8 years ago touch-slider.php 8 years ago video.php 8 years ago
text.php
1022 lines
1 <?php
2 /**
3 * Text element
4 *
5 *
6 * @package Auxin
7 * @license LICENSE.txt
8 * @author
9 * @link http://averta.net/phlox/
10 * @copyright (c) 2010-2017
11 */
12 function auxin_get_text_master_array( $master_array ) {
13
14 $master_array['aux_text'] = array(
15 'name' => __('Text', 'auxin-elements'),
16 'auxin_output_callback' => 'auxin_widget_column_callback',
17 'base' => 'aux_text',
18 'description' => __('Simple text block.', 'auxin-elements'),
19 'class' => 'aux-widget-text',
20 'show_settings_on_create' => true,
21 'weight' => 1,
22 'is_widget' => false,
23 'is_shortcode' => true,
24 'is_so' => true,
25 'is_vc' => true,
26 'so_api' => true,
27 'category' => THEME_NAME,
28 'group' => '',
29 'admin_enqueue_js' => '',
30 'admin_enqueue_css' => '',
31 'front_enqueue_js' => '',
32 'front_enqueue_css' => '',
33 'icon' => 'aux-element aux-pb-icons-text',
34 'custom_markup' => '',
35 'js_view' => '',
36 'html_template' => '',
37 'deprecated' => '',
38 'content_element' => '',
39 'as_parent' => '',
40 'as_child' => '',
41 'params' => array(
42 array(
43 'heading' => __('Title','auxin-elements'),
44 'description' => __('Text title, leave it empty if you don`t need title.', 'auxin-elements'),
45 'param_name' => 'title',
46 'type' => 'textfield',
47 'value' => '',
48 'def_value' => '',
49 'holder' => 'textfield',
50 'class' => 'title',
51 'description' => '',
52 'admin_label' => true,
53 'dependency' => '',
54 'weight' => '',
55 'group' => '' ,
56 'edit_field_class' => ''
57 ),
58 array(
59 'heading' => __('Subtitle','auxin-elements'),
60 'description' => '',
61 'param_name' => 'subtitle',
62 'type' => 'textfield',
63 'value' => '',
64 'def_value' => '',
65 'holder' => 'textfield',
66 'class' => 'subtitle',
67 'description' => '',
68 'admin_label' => true,
69 'dependency' => '',
70 'weight' => '',
71 'group' => '' ,
72 'edit_field_class' => ''
73 ),
74 array(
75 'heading' => __('Title link','auxin-elements'),
76 'description' => '',
77 'param_name' => 'title_link',
78 'type' => 'textfield',
79 'value' => '',
80 'def_value' => '',
81 'holder' => 'textfield',
82 'class' => 'title_link',
83 'admin_label' => true,
84 'dependency' => '',
85 'weight' => '',
86 'group' => '' ,
87 'edit_field_class' => ''
88 ),
89 array(
90 'heading' => __('Text align','auxin-elements'),
91 'description' => '',
92 'param_name' => 'text_align',
93 'type' => 'aux_visual_select',
94 'def_value' => 'top',
95 'choices' => array(
96 '' => array(
97 'label' => __('Theme Default', 'auxin-elements'),
98 'css_class' => 'axiAdminIcon-default',
99 ),
100 'left' => array(
101 'label' => __('Left', 'auxin-elements'),
102 'css_class' => 'axiAdminIcon-text-align-left',
103 ),
104 'center' => array(
105 'label' => __('Center', 'auxin-elements'),
106 'css_class' => 'axiAdminIcon-text-align-center'
107 ),
108 'right' => array(
109 'label' => __('Right', 'auxin-elements'),
110 'css_class' => 'axiAdminIcon-text-align-right'
111 )
112 ),
113 'holder' => 'dropdown',
114 'class' => 'text_align',
115 'admin_label' => true,
116 'dependency' => '',
117 'weight' => '',
118 'group' => '' ,
119 'edit_field_class' => ''
120 ),
121 array(
122 'heading' => __('Text color scheme','auxin-elements'),
123 'description' => '',
124 'param_name' => 'text_color_mode',
125 'type' => 'dropdown',
126 'def_value' => 'inherit',
127 'value' => array (
128 'inherit' => __( 'Inherit' , 'auxin-elements' ),
129 'light' => __( 'Light' , 'auxin-elements' ),
130 'dark' => __( 'Dark' , 'auxin-elements' )
131 ),
132 'holder' => 'dropdown',
133 'class' => 'text_color_mode',
134 'admin_label' => true,
135 'dependency' => '',
136 'weight' => '',
137 'group' => '' ,
138 'edit_field_class' => ''
139 ),
140 array(
141 'heading' => __('Wrapper style','auxin-elements'),
142 'description' => '',
143 'param_name' => 'wrapper_style',
144 'type' => 'aux_visual_select',
145 'def_value' => 'simple',
146 'choices' => array(
147 'simple' => array(
148 'label' => __('Simple', 'auxin-elements'),
149 'image' => AUXIN_URL . 'images/visual-select/text-normal.svg'
150 ),
151 'outline' => array(
152 'label' => __('Outlined', 'auxin-elements'),
153 'image' => AUXIN_URL . 'images/visual-select/text-outline.svg'
154 ),
155 'box' => array(
156 'label' => __('Boxed', 'auxin-elements'),
157 'image' => AUXIN_URL . 'images/visual-select/text-boxed.svg'
158 )
159 ),
160 'holder' => 'dropdown',
161 'class' => 'wrapper_style',
162 'admin_label' => true,
163 'dependency' => '',
164 'weight' => '',
165 'group' => '' ,
166 'edit_field_class' => ''
167 ),
168 array(
169 'heading' => __('Block background color', 'auxin-elements'),
170 'description' => __('Choose a background color for this block.', 'auxin-elements'),
171 'param_name' => 'wrapper_bg_color',
172 'type' => 'colorpicker',
173 'def_value' => '',
174 'value' => '',
175 'holder' => '',
176 'class' => 'wrapper_bg_color',
177 'admin_label' => true,
178 'dependency' => '',
179 'weight' => '',
180 'group' => '' ,
181 'edit_field_class' => ''
182 ),
183 array(
184 'heading' => __('Block border color', 'auxin-elements'),
185 'description' => '',
186 'param_name' => 'wrapper_border_color',
187 'type' => 'colorpicker',
188 'def_value' => '',
189 'value' => '',
190 'holder' => '',
191 'class' => 'wrapper_border_color',
192 'admin_label' => true,
193 'dependency' => '',
194 'weight' => '',
195 'group' => '' ,
196 'edit_field_class' => ''
197 ),
198 array(
199 'heading' => __('Block background image', 'auxin-elements'),
200 'description' => '',
201 'param_name' => 'wrapper_bg_image',
202 'type' => 'attach_image',
203 'def_value' => '',
204 'value' => '',
205 'holder' => '',
206 'class' => 'wrapper_bg_image',
207 'admin_label' => true,
208 'dependency' => '',
209 'weight' => '',
210 'group' => '',
211 'edit_field_class' => ''
212 ),
213 array(
214 'heading' => __('Block background overlay', 'auxin-elements'),
215 'description' => '',
216 'param_name' => 'overlay_color',
217 'type' => 'colorpicker',
218 'def_value' => '',
219 'value' => '',
220 'holder' => '',
221 'class' => 'overlay_color',
222 'admin_label' => true,
223 'dependency' => array(
224 'key' => 'wrapper_bg_image',
225 'value' => '',
226 'compare' => '!='
227 ),
228 'weight' => '',
229 'group' => '',
230 'edit_field_class' => ''
231 ),
232 array(
233 'heading' => __('Block Background Image Display', 'auxin-elements'),
234 'description' => '',
235 'param_name' => 'background_display',
236 'type' => 'dropdown',
237 'value' => array (
238 'cover' => __( 'Cover', 'auxin-elements' ),
239 'tile' => __( 'Tiled Image', 'auxin-elements' ),
240 'center' => __( 'Centered, with original size', 'auxin-elements' ),
241 'fixed' => __( 'Fixed', 'auxin-elements' )
242 ),
243 'holder' => 'dropdown',
244 'class' => 'background_display',
245 'admin_label' => true,
246 'dependency' => '',
247 'weight' => '',
248 'group' => '',
249 'edit_field_class' => ''
250 ),
251 array(
252 'heading' => __('Icon or image', 'auxin-elements' ),
253 'description' => __('Please choose an icon from avaialable icons.', 'auxin-elements'),
254 'heading' => __('Display Icon or Image', 'auxin-elements'),
255 'description' => '',
256 'param_name' => 'icon_or_image',
257 'type' => 'dropdown',
258 'def_value' => 'icon',
259 'value' => array (
260 'icon' => __( 'Icon' , 'auxin-elements' ),
261 'image' => __( 'Image' , 'auxin-elements' ),
262 ),
263 'holder' => 'dropdown',
264 'class' => 'icon_or_image',
265 'admin_label' => true,
266 'dependency' => '',
267 'weight' => '',
268 'group' => '',
269 'edit_field_class' => ''
270 ),
271 array(
272 'heading' => __('Icon', 'auxin-elements' ),
273 'description' => __('Please choose an icon from the list.', 'auxin-elements'),
274 'param_name' => 'icon',
275 'type' => 'aux_iconpicker',
276 'value' => '',
277 'def_value' => '',
278 'holder' => 'textfield',
279 'class' => 'aux_iconpicker',
280 'admin_label' => true,
281 'dependency' => array(
282 'element' => 'icon_or_image',
283 'value' => array('icon')
284 ),
285 'weight' => '',
286 'group' => '',
287 'edit_field_class' => ''
288 ),
289 array(
290 'heading' => __('Icon color','auxin-elements'),
291 'description' => __('Choose a color for icon.','auxin-elements'),
292 'param_name' => 'icon_color',
293 'type' => 'colorpicker',
294 'def_value' => '#888',
295 'value' => '#888',
296 'holder' => '',
297 'class' => 'icon_color',
298 'admin_label' => true,
299 'dependency' => array(
300 'element' => 'icon_or_image',
301 'value' => array('icon')
302 ),
303 'weight' => '',
304 'group' => '',
305 'edit_field_class' => ''
306 ),
307 array(
308 'heading' => __('Icon size','auxin-elements'),
309 'description' => '',
310 'param_name' => 'icon_size',
311 'type' => 'dropdown',
312 'def_value' => 'large',
313 'value' => array (
314 'small' => __( 'Small' , 'auxin-elements' ),
315 'medium' => __( 'Medium' , 'auxin-elements' ),
316 'large' => __( 'Large' , 'auxin-elements' ),
317 'x-large' => __( 'X-Large' , 'auxin-elements' )
318 ),
319 'holder' => 'dropdown',
320 'class' => 'icon_size',
321 'admin_label' => true,
322 'dependency' => array(
323 'element' => 'icon_or_image',
324 'value' => array('icon')
325 ),
326 'weight' => '',
327 'group' => '',
328 'edit_field_class' => ''
329 ),
330 array(
331 'heading' => __('Icon background shape','auxin-elements'),
332 'description' => '',
333 'param_name' => 'icon_shape',
334 'type' => 'aux_visual_select',
335 'def_value' => 'circle',
336 'choices' => array(
337 'circle' => array(
338 'label' => __('Circle', 'auxin-elements'),
339 'image' => AUXIN_URL . 'images/visual-select/icon-style-circle.svg'
340 ),
341 'semi-circle' => array(
342 'label' => __('Semi-circle', 'auxin-elements'),
343 'image' => AUXIN_URL . 'images/visual-select/icon-style-semi-circle.svg'
344 ),
345 'round-rect' => array(
346 'label' => __('Round Rectangle', 'auxin-elements'),
347 'image' => AUXIN_URL . 'images/visual-select/icon-style-round-rectangle.svg'
348 ),
349 'cross-rect' => array(
350 'label' => __('Cross Rectangle', 'auxin-elements'),
351 'image' => AUXIN_URL . 'images/visual-select/icon-style-cross-rectangle.svg'
352 ),
353 'rect' => array(
354 'label' => __('Rectangle', 'auxin-elements'),
355 'image' => AUXIN_URL . 'images/visual-select/icon-style-rectangle.svg'
356 ),
357 'fill' => array(
358 'label' => __('Cover', 'auxin-elements'),
359 'image' => AUXIN_URL . 'images/visual-select/icon-style-rectangle.svg'
360 ),
361 ),
362 'holder' => 'dropdown',
363 'class' => 'icon_shape',
364 'admin_label' => true,
365 'dependency' => array(
366 'element' => 'icon_or_image',
367 'value' => array('icon','image')
368 ),
369 'weight' => '',
370 'group' => '',
371 'edit_field_class' => ''
372 ),
373 array(
374 'heading' => __( 'Fill background color', 'auxin-elements' ),
375 'description' => __( 'Choose a color for fill area', 'auxin-elements' ),
376 'param_name' => 'fill_bg_color',
377 'type' => 'colorpicker',
378 'def_value' => '',
379 'value' => '',
380 'holder' => '',
381 'class' => '',
382 'admin_label' => '',
383 'dependency' => '',
384 'weight' => '',
385 'group' => '',
386 'edit_field_class' => ''
387
388
389 ),
390 array(
391 'heading' => __('Icon background color','auxin-elements'),
392 'description' => __('Choose a color for background of icon.','auxin-elements'),
393 'param_name' => 'icon_bg_color',
394 'type' => 'colorpicker',
395 'def_value' => '',
396 'value' => '',
397 'holder' => '',
398 'class' => 'icon_bg_color',
399 'admin_label' => true,
400 'dependency' => array(
401 'element' => 'icon_or_image',
402 'value' => array('icon')
403 ),
404 'weight' => '',
405 'group' => '',
406 'edit_field_class' => ''
407 ),
408 array(
409 'heading' => __( 'Icon outline color', 'auxin-elements' ),
410 'description' => __( 'Choose a color for the border around the icon.', 'auxin-elements' ),
411 'param_name' => 'icon_border_color',
412 'type' => 'colorpicker',
413 'def_value' => '',
414 'value' => '',
415 'holder' => '',
416 'class' => 'icon_border_color',
417 'admin_label' => true,
418 'dependency' => array(
419 'element' => 'icon_or_image',
420 'value' => array('icon')
421 ),
422 'weight' => '',
423 'group' => '',
424 'edit_field_class' => ''
425 ),
426 array(
427 'heading' => __('Image','auxin-elements'),
428 'description' => '',
429 'param_name' => 'image',
430 'type' => 'attach_image',
431 'def_value' => '',
432 'value' => '',
433 'holder' => '',
434 'class' => 'image',
435 'admin_label' => true,
436 'dependency' => array(
437 'element' => 'icon_or_image',
438 'value' => array('image')
439 ),
440 'weight' => '',
441 'group' => '',
442 'edit_field_class' => ''
443 ),
444 array(
445 'heading' => __('Image Size','auxin-elements'),
446 'description' => '',
447 'param_name' => 'image_size',
448 'type' => 'dropdown',
449 'def_value' => 'full',
450 'value' => array (
451 'full' => __( 'Orginal Size' , 'auxin-elements' ),
452 'large' => __( 'Large' , 'auxin-elements' ),
453 'medium' => __( 'Medium' , 'auxin-elements' ),
454 'thumbnail' => __( 'Thumbnail' , 'auxin-elements' )
455 ),
456 'holder' => 'dropdown',
457 'class' => 'image_size',
458 'admin_label' => true,
459 'dependency' => array(
460 'element' => 'icon_or_image',
461 'value' => array('image')
462 ),
463 'weight' => '',
464 'group' => '' ,
465 'edit_field_class' => ''
466 ),
467 array(
468 'heading' => __('Image or icon position','auxin-elements'),
469 'description' => '',
470 'param_name' => 'image_position',
471 'type' => 'aux_visual_select',
472 'def_value' => 'top',
473 'choices' => array(
474 'top' => array(
475 'label' => __('Top', 'auxin-elements'),
476 'image' => AUXIN_URL . 'images/visual-select/column-icon-top.svg'
477 ),
478 'left' => array(
479 'label' => __('Left', 'auxin-elements'),
480 'image' => AUXIN_URL . 'images/visual-select/column-icon-left.svg'
481 ),
482 'right' => array(
483 'label' => __('Right', 'auxin-elements'),
484 'image' => AUXIN_URL . 'images/visual-select/column-icon-right.svg'
485 )
486 ),
487 'holder' => 'dropdown',
488 'class' => 'image_position',
489 'admin_label' => true,
490 'dependency' => '',
491 'weight' => '',
492 'group' => '',
493 'edit_field_class' => ''
494 ),
495 array(
496 'heading' => __('Display button', 'auxin-elements' ),
497 'description' => __('Dsiplay a button in text widget', 'auxin-elements' ),
498 'param_name' => 'display_button',
499 'type' => 'checkbox',
500 'def_value' => '',
501 'value' => '',
502 'class' => 'display_button',
503 'admin_label' => true,
504 'dependency' => '',
505 'weight' => '',
506 'group' => '',
507 'edit_field_class' => ''
508 ),
509 array(
510 'heading' => __('Button label', 'auxin-elements' ),
511 'description' => __('The label of button.', 'auxin-elements' ),
512 'param_name' => 'btn_label',
513 'type' => 'textfield',
514 'value' => 'Button',
515 'holder' => 'textfield',
516 'class' => 'label',
517 'admin_label' => false,
518 'dependency' => array(
519 'element' => 'display_button',
520 'value' => "true",
521 ),
522 'weight' => '',
523 'group' => '' ,
524 'edit_field_class' => ''
525 ),
526 array(
527 'heading' => __('Button size','auxin-elements' ),
528 'description' => '',
529 'param_name' => 'btn_size',
530 'type' => 'dropdown',
531 'def_value' => 'medium',
532 'value' => array(
533 'exlarge' => __('Exlarge', 'auxin-elements' ),
534 'large' => __('Large' , 'auxin-elements' ),
535 'medium' => __('Medium' , 'auxin-elements' ),
536 'small' => __('Small' , 'auxin-elements' ),
537 'tiny' => __('Tiny' , 'auxin-elements' )
538 ),
539 'holder' => '',
540 'class' => 'round',
541 'admin_label' => true,
542 'dependency' => array(
543 'element' => 'display_button',
544 'value' => "true",
545 ),
546 'weight' => '',
547 'group' => '' ,
548 'edit_field_class' => ''
549 ),
550 array(
551 'heading' => __('Button shape style','auxin-elements' ),
552 'description' => '',
553 'param_name' => 'btn_border',
554 'type' => 'aux_visual_select',
555 'value' => '',
556 'class' => 'border',
557 'admin_label' => false,
558 'dependency' => array(
559 'element' => 'display_button',
560 'value' => "true",
561 ),
562 'weight' => '',
563 'group' => '' ,
564 'edit_field_class' => '',
565 'choices' => array(
566 '' => array(
567 'label' => __('Box', 'auxin-elements' ),
568 'image' => AUXIN_URL . 'images/visual-select/button-normal.svg'
569 ),
570 'round' => array(
571 'label' => __('Round', 'auxin-elements' ),
572 'image' => AUXIN_URL . 'images/visual-select/button-curved.svg'
573 ),
574 'curve' => array(
575 'label' => __('Curve', 'auxin-elements' ),
576 'image' => AUXIN_URL . 'images/visual-select/button-rounded.svg'
577 )
578 )
579 ),
580 array(
581 'heading' => __('Button style','auxin-elements' ),
582 'description' => '',
583 'param_name' => 'btn_style',
584 'type' => 'aux_visual_select',
585 'value' => '',
586 'class' => 'style',
587 'admin_label' => false,
588 'dependency' => array(
589 'element' => 'display_button',
590 'value' => "true",
591 ),
592 'weight' => '',
593 'group' => '' ,
594 'edit_field_class' => '',
595 'choices' => array(
596 '' => array(
597 'label' => __('Normal', 'auxin-elements' ),
598 'image' => AUXIN_URL . 'images/visual-select/button-normal.svg'
599 ),
600 '3d' => array(
601 'label' => __('3D', 'auxin-elements' ),
602 'image' => AUXIN_URL . 'images/visual-select/button-3d.svg'
603 ),
604 'outline' => array(
605 'label' => __('Outline', 'auxin-elements' ),
606 'image' => AUXIN_URL . 'images/visual-select/button-outline.svg'
607 )
608 )
609 ),
610 array(
611 'heading' => __('Uppercase label','auxin-elements' ),
612 'description' => '',
613 'param_name' => 'btn_uppercase',
614 'type' => 'aux_switch',
615 'value' => '1',
616 'class' => 'uppercase',
617 'admin_label' => false,
618 'dependency' => array(
619 'element' => 'display_button',
620 'value' => "true",
621 ),
622 'weight' => '',
623 'group' => '' ,
624 'edit_field_class' => ''
625 ),
626 array(
627 'heading' => __('Darken the label','auxin-elements' ),
628 'description' => __('Darken label of button while mouse over it.','auxin-elements' ),
629 'param_name' => 'btn_dark',
630 'type' => 'aux_switch',
631 'value' => '0',
632 'class' => 'dark',
633 'admin_label' => false,
634 'dependency' => array(
635 'element' => 'display_button',
636 'value' => "true",
637 ),
638 'weight' => '',
639 'group' => '' ,
640 'edit_field_class' => ''
641 ),
642 array(
643 'heading' => __('Icon for button','auxin-elements' ),
644 'description' => '',
645 'param_name' => 'btn_icon',
646 'type' => 'aux_iconpicker',
647 'value' => '',
648 'class' => 'icon-name',
649 'admin_label' => false,
650 'dependency' => array(
651 'element' => 'display_button',
652 'value' => "true",
653 ),
654 'weight' => '',
655 'group' => '' ,
656 'edit_field_class' => ''
657 ),
658 array(
659 'heading' => __('Icon alignment','auxin-elements' ),
660 'description' => '',
661 'param_name' => 'btn_icon_align',
662 'type' => 'dropdown',
663 'def_value' => 'default',
664 'value' => array(
665 'default' => __('Default' , 'auxin-elements' ),
666 'left' => __('Left' , 'auxin-elements' ),
667 'right' => __('Right' , 'auxin-elements' ),
668 'over' => __('Over' , 'auxin-elements' ),
669 'left-animate' => __('Animate from Left' , 'auxin-elements' ),
670 'right-animate' => __('Animate from Right' , 'auxin-elements' )
671 ),
672 'holder' => '',
673 'class' => 'icon-align',
674 'admin_label' => false,
675 'dependency' => array(
676 'element' => 'display_button',
677 'value' => "true",
678 ),
679 'weight' => '',
680 'group' => '' ,
681 'edit_field_class' => ''
682 ),
683 array(
684 'heading' => __('Color of button','auxin-elements' ),
685 'description' => '',
686 'param_name' => 'btn_color_name',
687 'type' => 'aux_visual_select',
688 'value' => 'carmine-pink',
689 'choices' => auxin_get_famous_colors_list(),
690 'holder' => '',
691 'class' => 'color',
692 'admin_label' => false,
693 'dependency' => array(
694 'element' => 'display_button',
695 'value' => "true",
696 ),
697 'weight' => '',
698 'group' => '' ,
699 'edit_field_class' => ''
700 ),
701 array(
702 'heading' => __('Link','auxin-elements' ),
703 'description' => __('If you want to link your button.', 'auxin-elements' ),
704 'param_name' => 'btn_link',
705 'type' => 'textfield',
706 'value' => '',
707 'holder' => '',
708 'class' => 'link',
709 'admin_label' => false,
710 'dependency' => array(
711 'element' => 'display_button',
712 'value' => "true",
713 ),
714 'weight' => '',
715 'group' => '' ,
716 'edit_field_class' => ''
717 ),
718 array(
719 'heading' => __('Open link in','auxin-elements' ),
720 'description' => '',
721 'param_name' => 'target',
722 'type' => 'dropdown',
723 'def_value' => '_self',
724 'value' => array(
725 '_self' => __('Current page' , 'auxin-elements' ),
726 '_blank' => __('New page', 'auxin-elements' )
727 ),
728 'holder' => '',
729 'class' => 'target',
730 'admin_label' => false,
731 'dependency' => array(
732 'element' => 'display_button',
733 'value' => "true",
734 ),
735 'weight' => '',
736 'group' => '' ,
737 'edit_field_class' => ''
738 ),
739 array(
740 'heading' => __('Content','auxin-elements'),
741 'description' => __('Enter a text as a text content.','auxin-elements'),
742 'param_name' => 'content',
743 'type' => 'textarea_html',
744 'value' => '',
745 'def_value' => '',
746 'holder' => 'div',
747 'class' => 'content',
748 'admin_label' => true,
749 'dependency' => '',
750 'weight' => '',
751 'group' => '' ,
752 'edit_field_class' => ''
753 ),
754 array(
755 'heading' => __('Bottom shape style','auxin-elements' ),
756 'description' => '',
757 'param_name' => 'bottom_shape_style',
758 'type' => 'aux_visual_select',
759 'value' => '',
760 'class' => 'bottom_shape_style',
761 'def_value' => 'none',
762 'admin_label' => false,
763 'dependency' => '',
764 'weight' => '',
765 'group' => '' ,
766 'edit_field_class' => '',
767 'choices' => array(
768 '' => array(
769 'label' => __('None', 'auxin-elements' ),
770 'image' => AUXIN_URL . 'images/visual-select/button-normal.svg'
771 ),
772 'wave' => array(
773 'label' => __('Wave', 'auxin-elements' ),
774 'image' => AUXIN_URL . 'images/visual-select/button-curved.svg'
775 ),
776 'tail' => array(
777 'label' => __('Tail', 'auxin-elements' ),
778 'image' => AUXIN_URL . 'images/visual-select/button-rounded.svg'
779 )
780 )
781 ),
782 array(
783 'heading' => __( 'Bottom Shape color', 'auxin-elements' ),
784 'description' => __( 'Select color for shape', 'auxin-elements' ),
785 'param_name' => 'bottom_shape_color',
786 'type' => 'colorpicker',
787 'value' => '',
788 'class' => 'bottom_shape_color',
789 'dependency' => array(
790 'element' => 'bottom_shape_style',
791 'value' => array('tail', 'wave')
792 )
793 ),
794 array(
795 'heading' => __('Extra class name','auxin-elements'),
796 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'auxin-elements'),
797 'param_name' => 'extra_classes',
798 'type' => 'textfield',
799 'value' => '',
800 'def_value' => '',
801 'holder' => 'textfield',
802 'class' => 'extra_classes',
803 'admin_label' => true,
804 'dependency' => '',
805 'weight' => '',
806 'group' => '' ,
807 'edit_field_class' => ''
808 )
809 )
810 );
811
812 return $master_array;
813 }
814
815 add_filter( 'auxin_master_array_shortcodes', 'auxin_get_text_master_array', 10, 1 );
816
817 // This is the widget call back in fact the front end out put of this widget comes from this function
818 function auxin_widget_column_callback( $atts, $shortcode_content = null ){
819
820 // Defining default attributes
821 $default_atts = array(
822 'title' => '', // section title
823 'title_link' => '', // the link on title
824 'subtitle' => '', // Text as subtitle under the title
825 'content' => '', // the link on title
826 'text_align' => '', // left, right, center
827 'text_color_mode' => 'inherit', // inherit, dark, light
828
829 'wrapper_style' => '', // box, outline,
830 'wrapper_bg_color' => '', // box, outline,
831 'wrapper_bg_image' => '', // box, background image,
832 'wrapper_border_color' => '', // border color for box,
833 'overlay_color' => '', // border color for box,
834
835 'icon' => '', // icon on column side
836 'icon_color' => '#888',
837 'icon_size' => 'large', // small, medium, large, x-large
838 'icon_shape' => 'circle', // circle, semi-circle, round-rect, rect, fill, ...
839 'icon_bg_color' => '', // empty mean inherit,
840 'icon_border_color' => '', // color or 'icon' (same color as icon)
841 'background_display' => '',
842 'fill_bg_color' => '', // color or 'icon' (same color as icon)
843
844 'image' => '', // image on column side
845 'image_size' => 'full', // image on column side
846 'image_position' => 'top', // top,left,right
847
848 'display_button' => '',
849 'btn_label' => '',
850 'btn_size' => '',
851 'btn_border' => '',
852 'btn_style' => '',
853 'btn_uppercase' => '',
854 'btn_dark' => '',
855 'btn_icon' => '',
856 'btn_icon_align' => '',
857 'btn_color_name' => '',
858 'btn_link' => '',
859 'btn_target' => '',
860
861 'bottom_shape_style' => '',
862 'bottom_shape_color' => '',
863
864 'extra_classes' => '', // custom css class names for this element
865 'custom_el_id' => '', // custom id attribute for this element
866 'base_class' => 'aux-widget-text' // base class name for container
867 );
868
869
870 if( ! empty( $atts['wrapper_style'] ) ){
871 $atts['extra_classes'] = ' aux-wrap-style-' . esc_attr( $atts['wrapper_style'] );
872
873 } elseif( ! empty( $default_atts['wrapper_style'] ) ){
874 if( ! isset( $atts['extra_classes'] ) ){
875 $atts['extra_classes'] = '';
876 }
877 $atts['extra_classes'] .= ' aux-wrap-style-' . esc_attr( $default_atts['wrapper_style'] );
878 }
879
880 $result = auxin_get_widget_scafold( $atts, $default_atts );
881
882 extract( $result['parsed_atts'] );
883
884 $icon_border_color = 'icon' == $icon_border_color ? $icon_color : $icon_border_color;
885 $content = empty( $content ) ? $shortcode_content : $content;
886
887 $main_inline_style = empty( $wrapper_bg_color ) ? '' : 'background-color:' . $wrapper_bg_color . ' !important;';
888 $main_inline_style .= empty( $wrapper_border_color ) ? '' : 'border:2px solid ' . $wrapper_border_color . ';';
889 $main_inline_style .= empty( $wrapper_bg_image ) ? '' : 'background-image:url(' . wp_get_attachment_image_url( $wrapper_bg_image, 'full' ) . ');';
890 $main_inline_style = empty( $main_inline_style ) ? '' : ' style="' . $main_inline_style . '"';
891
892 $main_classes = 'aux-ico-pos-'. ( $image_position ? esc_attr( $image_position ) : 'top' );
893 $main_classes .= empty( $content ) ? ' no-content' : '';
894 $main_classes .= empty( $text_align ) ? '' : ' aux-text-align-' . esc_attr( $text_align );
895 $main_classes .= empty( $wrapper_bg_image ) ? '' : ' aux-text-widget-bg aux-text-widget-bg-' . esc_attr($background_display );
896 $main_classes .= empty( $icon_bg_color ) && empty( $image ) && !empty( $content ) ? ' aux-text-widget-no-ico-bg' : '';
897 $main_classes .= !empty( $fill_bg_color ) ? ' aux-text-widget-fill-bg' : '';
898 $main_classes .= empty( $fill_bg_color ) && !('fill' == $icon_shape) ? ' aux-text-widget-def' : '';
899
900 $icon_box_classes = $icon_box_inline_style = '';
901
902 if ( ! empty( $image ) && is_numeric( $image ) ) {
903 if ( 'fill' == $icon_shape ) {
904 $main_classes .= ' aux-text-widget-header-fill';
905 } else {
906 $icon_box_classes .= 'aux-img-box';
907 $image_data = wp_get_attachment_image_src( $image, $image_size );
908 $icon_box_inline_style = ' width:' . $image_data[1] . 'px;';
909 }
910 }
911
912 $main_classes .= empty( $text_color_mode ) || 'inherit' == $text_color_mode ? '' : ' aux-text-color-'. esc_attr( $text_color_mode );
913
914 $icon_box_inline_style .= empty( $icon_bg_color ) ? '' : 'background-color:' . $icon_bg_color . ' !important;';
915 $icon_box_inline_style .= empty( $icon_border_color ) ? '' : 'border-color:' . $icon_border_color . ';';
916 $icon_box_inline_style = empty( $icon_box_inline_style ) ? '' : ' style="' . $icon_box_inline_style . '";';
917
918 $overlay_style = empty( $overlay_color ) ? '' : 'style="background-color:' . $overlay_color . '";';
919
920 $box_header_style = empty( $fill_bg_color ) ? '' : 'background-color: ' . $fill_bg_color . ';';
921 $box_header_style = empty( $box_header_style ) ? '' : 'style="' . $box_header_style . '"';
922
923 $icon_box_classes .= ' aux-ico-' . esc_attr( $icon_size );
924 $icon_box_classes .= ' aux-ico-shape-' . esc_attr( $icon_shape );
925
926 $icon_classes = empty( $icon ) || $icon == 'none' ? '' : esc_attr( $icon );
927 $icon_classes .= ! empty( $icon_bg_color ) || ! empty( $icon_border_color ) ? ' aux-ico-margin' : '';
928 $icon_inline_style = empty( $icon_color ) ? '' : 'style="color:' . $icon_color . ' !important;"';
929
930 $icon_border_style_tag = '';
931 if( ! empty( $icon_border_color ) && 'cross-rect' == $icon_shape ){
932 $icon_uid = uniqid( 'auxt' );
933 $icon_box_inline_style .= ' id="'. $icon_uid .'"';
934 $icon_border_style_tag = "<style>#$icon_uid:before,#$icon_uid:after{border-color:$icon_border_color;}</style>";
935 }
936
937 $bottom_shape_classes = empty( $bottom_shape_style ) ? '' : 'aux-border-shape-' . esc_attr( $bottom_shape_style );
938 $bottom_shape_color = 'wave' === $bottom_shape_style ? 'style="fill:' . esc_attr( $bottom_shape_color ) . ';"' : 'style="border-top-color:' . esc_attr( $bottom_shape_color ) . ';"';
939
940
941 if( ! empty( $image ) && is_numeric( $image ) ) {
942 // $image = auxin_get_the_resized_attachment( $image );
943 $image = wp_get_attachment_image( $image, $image_size );
944 }
945
946 $btn_atts = array(
947 'label' => $btn_label,
948 'size' => $btn_size,
949 'border' => $btn_border,
950 'style' => $btn_style,
951 'uppercase' => $btn_uppercase,
952 'dark' => $btn_dark,
953 'icon' => $btn_icon,
954 'icon_align' => $btn_icon_align,
955 'color_name' => $btn_color_name,
956 'link' => $btn_link,
957 'target' => $btn_target,
958 );
959
960 ob_start();
961
962 // widget header ------------------------------
963 echo $result['widget_header'];
964 ?>
965
966 <div class="<?php echo $main_classes; ?>" <?php echo $main_inline_style; ?>>
967 <?php if ( ! empty( $overlay_color ) ) { ?>
968 <div class="aux-text-widget-overlay" <?php echo $overlay_style; ?>></div>
969 <?php } ?>
970 <div class="aux-text-widget-header" <?php echo $box_header_style; echo $box_header_style; ?>>
971 <?php if( ! empty( $icon ) && empty( $image ) ) { ?>
972 <div class="aux-ico-box <?php echo $icon_box_classes; ?>" <?php echo $icon_box_inline_style; ?>>
973 <?php echo $icon_border_style_tag; ?>
974 <span class="aux-ico <?php echo $icon_classes; ?>" <?php echo $icon_inline_style; ?> > </span>
975 </div>
976 <?php } elseif( !empty( $image ) ) { ?>
977 <div class="aux-ico-box <?php echo $icon_box_classes; ?>" <?php echo $icon_box_inline_style; ?> >
978 <?php echo $image; ?>
979 </div>
980 <?php } ?>
981 </div>
982 <div class="aux-text-inner aux-text-widget-content">
983 <?php if( ! empty( $title ) && empty( $title_link ) ) { ?>
984 <h4 class="col-title"><?php echo $title; ?></h4>
985 <?php } elseif( ! empty( $title ) && ! empty( $title_link ) ) { ?>
986 <h4 class="col-title"><a href="<?php echo $title_link; ?>"><?php echo $title; ?></a></h4>
987 <?php } if( ! empty( $subtitle ) ) { ?>
988 <h5 class="col-subtitle"><?php echo $subtitle; ?></h5>
989 <?php } if( ! empty( $content ) ) { ?>
990 <div class="entry-content">
991 <?php $encoding_flag = defined('ENT_HTML401') ? ENT_HTML401 : ENT_QUOTES; ?>
992 <?php echo do_shortcode( html_entity_decode( $content, $encoding_flag, 'UTF-8') ); ?>
993 </div>
994 <?php } if ( ! empty( $display_button ) ) {
995 echo auxin_widget_button_callback( $btn_atts );
996 } ?>
997 </div>
998 </div>
999 <?php if ( ! empty( $bottom_shape_classes ) ) { ?>
1000 <div class="aux-text-widget-footer">
1001 <div class="aux-border-shape <?php echo $bottom_shape_classes; ?>"<?php echo $bottom_shape_color; ?>>
1002 <?php if ( 'wave' === $bottom_shape_style ){?>
1003 <svg width="100%" height="16" <?php echo $bottom_shape_color;?> >
1004 <defs>
1005 <pattern id="pattern-shape-wave" x="16" y="0" width="35" height="16" patternUnits="userSpaceOnUse" >
1006 <path d="M16 16 L35 0 L-2 0 Z" />
1007 </pattern>
1008 </defs>
1009 <rect x="0" y="0" width="100%" height="17" style="fill: url(#pattern-shape-wave);" />
1010 </svg>
1011 <?php }?>
1012 </div>
1013 </div>
1014 <?php } ?>
1015
1016 <?php
1017 // widget footer ------------------------------
1018 echo $result['widget_footer'];
1019
1020 return ob_get_clean();
1021 }
1022