PluginProbe ʕ •ᴥ•ʔ
Shortcodes and extra features for Phlox theme / 1.3.14
Shortcodes and extra features for Phlox theme v1.3.14
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 9 years ago accordion-api.php 9 years ago accordion.php 9 years ago attachment-url.php 9 years ago audio.php 9 years ago before-after.php 9 years ago button.php 9 years ago code.php 9 years ago contact-box.php 9 years ago contact-form.php 9 years ago divider.php 9 years ago dropcap.php 9 years ago facebook.php 9 years ago flickr.php 9 years ago gallery.php 9 years ago gmap.php 9 years ago highlight.php 9 years ago image.php 9 years ago instagram-feed.php 9 years ago latest-items.php 10 years ago latest-posts-slider.php 9 years ago popular-posts-widget.php 9 years ago quote.php 9 years ago recent-posts-grid-carousel.php 9 years ago recent-posts-land-style.php 9 years ago recent-posts-masonry.php 9 years ago recent-posts-tiles.php 9 years ago recent-posts-timeline.php 9 years ago recent-posts-widget.php 9 years ago recent-posts.php 9 years ago related-posts.php 9 years ago sample-element.php 9 years ago search.php 9 years ago slider.php 9 years ago socials-list.php 9 years ago tabs-api.php 9 years ago tabs.php 9 years ago text.php 9 years ago touch-slider.php 9 years ago video.php 9 years ago
text.php
1003 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' => __('[Phlox] 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' => 'auxin-element auxin-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' => __('Center', '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 'element' => 'wrapper_bg_image'
225 ),
226 'weight' => '',
227 'group' => '',
228 'edit_field_class' => ''
229 ),
230 array(
231 'heading' => __('Block Background Image Display', 'auxin-elements'),
232 'description' => '',
233 'param_name' => 'background_display',
234 'type' => 'dropdown',
235 'def_value' => 'cover',
236 'value' => array (
237 'tile' => __( 'Tiled Image', 'auxin-elements' ),
238 'cover' => __( 'Cover', 'auxin-elements' ),
239 'center' => __( 'Centered, with original size', 'auxin-elements' ),
240 'fixed' => __( 'Fixed', 'auxin-elements' )
241 ),
242 'holder' => 'dropdown',
243 'class' => 'background_display',
244 'admin_label' => true,
245 'dependency' => '',
246 'weight' => '',
247 'group' => '',
248 'edit_field_class' => ''
249 ),
250 array(
251 'heading' => __('Icon or image', 'auxin-elements' ),
252 'description' => __('Please choose an icon from avaialable icons.', 'auxin-elements'),
253 'heading' => __('Display Icon or Image', 'auxin-elements'),
254 'description' => '',
255 'param_name' => 'icon_or_image',
256 'type' => 'dropdown',
257 'def_value' => 'icon',
258 'value' => array (
259 'icon' => __( 'Icon' , 'auxin-elements' ),
260 'image' => __( 'Image' , 'auxin-elements' ),
261 ),
262 'holder' => 'dropdown',
263 'class' => 'icon_or_image',
264 'admin_label' => true,
265 'dependency' => '',
266 'weight' => '',
267 'group' => '',
268 'edit_field_class' => ''
269 ),
270 array(
271 'heading' => __('Icon', 'auxin-elements' ),
272 'description' => __('Please choose an icon from the list.', 'auxin-elements'),
273 'param_name' => 'icon',
274 'type' => 'aux_iconpicker',
275 'value' => '',
276 'def_value' => '',
277 'holder' => 'textfield',
278 'class' => 'aux_iconpicker',
279 'admin_label' => true,
280 'dependency' => array(
281 'element' => 'icon_or_image',
282 'value' => array('icon')
283 ),
284 'weight' => '',
285 'group' => '',
286 'edit_field_class' => ''
287 ),
288 array(
289 'heading' => __('Icon color','auxin-elements'),
290 'description' => __('Choose a color for icon.','auxin-elements'),
291 'param_name' => 'icon_color',
292 'type' => 'colorpicker',
293 'def_value' => '#888',
294 'value' => '#888',
295 'holder' => '',
296 'class' => 'icon_color',
297 'admin_label' => true,
298 'dependency' => array(
299 'element' => 'icon_or_image',
300 'value' => array('icon')
301 ),
302 'weight' => '',
303 'group' => '',
304 'edit_field_class' => ''
305 ),
306 array(
307 'heading' => __('Icon size','auxin-elements'),
308 'description' => '',
309 'param_name' => 'icon_size',
310 'type' => 'dropdown',
311 'def_value' => 'large',
312 'value' => array (
313 'small' => __( 'Small' , 'auxin-elements' ),
314 'medium' => __( 'Medium' , 'auxin-elements' ),
315 'large' => __( 'Large' , 'auxin-elements' ),
316 'x-large' => __( 'X-Large' , 'auxin-elements' )
317 ),
318 'holder' => 'dropdown',
319 'class' => 'icon_size',
320 'admin_label' => true,
321 'dependency' => array(
322 'element' => 'icon_or_image',
323 'value' => array('icon')
324 ),
325 'weight' => '',
326 'group' => '',
327 'edit_field_class' => ''
328 ),
329 array(
330 'heading' => __('Icon background shape','auxin-elements'),
331 'description' => '',
332 'param_name' => 'icon_shape',
333 'type' => 'aux_visual_select',
334 'def_value' => 'circle',
335 'choices' => array(
336 'circle' => array(
337 'label' => __('Circle', 'auxin-elements'),
338 'image' => AUXIN_URL . 'images/visual-select/icon-style-circle.svg'
339 ),
340 'semi-circle' => array(
341 'label' => __('Semi-circle', 'auxin-elements'),
342 'image' => AUXIN_URL . 'images/visual-select/icon-style-semi-circle.svg'
343 ),
344 'round-rect' => array(
345 'label' => __('Round Rectangle', 'auxin-elements'),
346 'image' => AUXIN_URL . 'images/visual-select/icon-style-round-rectangle.svg'
347 ),
348 'cross-rect' => array(
349 'label' => __('Cross Rectangle', 'auxin-elements'),
350 'image' => AUXIN_URL . 'images/visual-select/icon-style-cross-rectangle.svg'
351 ),
352 'rect' => array(
353 'label' => __('Rectangle', 'auxin-elements'),
354 'image' => AUXIN_URL . 'images/visual-select/icon-style-rectangle.svg'
355 ),
356 'fill' => array(
357 'label' => __('Cover', 'auxin-elements'),
358 'image' => AUXIN_URL . 'images/visual-select/icon-style-rectangle.svg'
359 ),
360 ),
361 'holder' => 'dropdown',
362 'class' => 'icon_shape',
363 'admin_label' => true,
364 'dependency' => array(
365 'element' => 'icon_or_image',
366 'value' => array('icon')
367 ),
368 'weight' => '',
369 'group' => '',
370 'edit_field_class' => ''
371 ),
372 array(
373 'heading' => __( 'Fill background color', 'auxin-elements' ),
374 'description' => __( 'Choose a color for fill area', 'auxin-elements' ),
375 'param_name' => 'fill_bg_color',
376 'type' => 'color',
377 'def_value' => '',
378 'value' => '',
379 'holder' => '',
380 'class' => '',
381 'admin_label' => '',
382 'dependency' => '',
383 'weight' => '',
384 'group' => '',
385 'edit_field_class' => ''
386
387
388 ),
389 array(
390 'heading' => __('Icon background color','auxin-elements'),
391 'description' => __('Choose a color for background of icon.','auxin-elements'),
392 'param_name' => 'icon_bg_color',
393 'type' => 'colorpicker',
394 'def_value' => '',
395 'value' => '',
396 'holder' => '',
397 'class' => 'icon_bg_color',
398 'admin_label' => true,
399 'dependency' => array(
400 'element' => 'icon_or_image',
401 'value' => array('icon')
402 ),
403 'weight' => '',
404 'group' => '',
405 'edit_field_class' => ''
406 ),
407 array(
408 'heading' => __( 'Icon outline color', 'auxin-elements' ),
409 'description' => __( 'Choose a color for the border around the icon.', 'auxin-elements' ),
410 'param_name' => 'icon_border_color',
411 'type' => 'colorpicker',
412 'def_value' => '',
413 'value' => '',
414 'holder' => '',
415 'class' => 'icon_border_color',
416 'admin_label' => true,
417 'dependency' => array(
418 'element' => 'icon_or_image',
419 'value' => array('icon')
420 ),
421 'weight' => '',
422 'group' => '',
423 'edit_field_class' => ''
424 ),
425 array(
426 'heading' => __('Image','auxin-elements'),
427 'description' => '',
428 'param_name' => 'image',
429 'type' => 'attach_image',
430 'def_value' => '',
431 'value' => '',
432 'holder' => '',
433 'class' => 'image',
434 'admin_label' => true,
435 'dependency' => array(
436 'element' => 'icon_or_image',
437 'value' => array('image')
438 ),
439 'weight' => '',
440 'group' => '',
441 'edit_field_class' => ''
442 ),
443 array(
444 'heading' => __('Image Size','auxin-elements'),
445 'description' => '',
446 'param_name' => 'image_size',
447 'type' => 'dropdown',
448 'def_value' => 'full',
449 'value' => array (
450 'full' => __( 'Orginal Size' , 'auxin-elements' ),
451 'large' => __( 'Large' , 'auxin-elements' ),
452 'medium' => __( 'Medium' , 'auxin-elements' ),
453 'thumbnail' => __( 'Thumbnail' , 'auxin-elements' )
454 ),
455 'holder' => 'dropdown',
456 'class' => 'image_size',
457 'admin_label' => true,
458 'dependency' => array(
459 'element' => 'icon_or_image',
460 'value' => array('image')
461 ),
462 'weight' => '',
463 'group' => '' ,
464 'edit_field_class' => ''
465 ),
466 array(
467 'heading' => __('Image or icon position','auxin-elements'),
468 'description' => '',
469 'param_name' => 'image_position',
470 'type' => 'aux_visual_select',
471 'def_value' => 'top',
472 'choices' => array(
473 'top' => array(
474 'label' => __('Top', 'auxin-elements'),
475 'image' => AUXIN_URL . 'images/visual-select/column-icon-top.svg'
476 ),
477 'left' => array(
478 'label' => __('Left', 'auxin-elements'),
479 'image' => AUXIN_URL . 'images/visual-select/column-icon-left.svg'
480 ),
481 'right' => array(
482 'label' => __('Right', 'auxin-elements'),
483 'image' => AUXIN_URL . 'images/visual-select/column-icon-right.svg'
484 )
485 ),
486 'holder' => 'dropdown',
487 'class' => 'image_position',
488 'admin_label' => true,
489 'dependency' => '',
490 'weight' => '',
491 'group' => '',
492 'edit_field_class' => ''
493 ),
494 array(
495 'heading' => __('Display button', 'auxin-elements' ),
496 'description' => __('Dsiplay a button in text widget', 'auxin-elements' ),
497 'param_name' => 'display_button',
498 'type' => 'checkbox',
499 'def_value' => '',
500 'value' => '',
501 'class' => 'display_button',
502 'admin_label' => true,
503 'dependency' => '',
504 'weight' => '',
505 'group' => '',
506 'edit_field_class' => ''
507 ),
508 array(
509 'heading' => __('Button label', 'auxin-elements' ),
510 'description' => __('The label of button.', 'auxin-elements' ),
511 'param_name' => 'btn_label',
512 'type' => 'textfield',
513 'value' => 'Button',
514 'holder' => 'textfield',
515 'class' => 'label',
516 'admin_label' => false,
517 'dependency' => array(
518 'element' => 'display_button',
519 'value' => true,
520 ),
521 'weight' => '',
522 'group' => '' ,
523 'edit_field_class' => ''
524 ),
525 array(
526 'heading' => __('Button size','auxin-elements' ),
527 'description' => '',
528 'param_name' => 'btn_size',
529 'type' => 'dropdown',
530 'def_value' => 'medium',
531 'value' => array(
532 'exlarge' => __('Exlarge', 'auxin-elements' ),
533 'large' => __('Large' , 'auxin-elements' ),
534 'medium' => __('Medium' , 'auxin-elements' ),
535 'small' => __('Small' , 'auxin-elements' ),
536 'tiny' => __('Tiny' , 'auxin-elements' )
537 ),
538 'holder' => '',
539 'class' => 'round',
540 'admin_label' => true,
541 'dependency' => array(
542 'element' => 'display_button',
543 'value' => true,
544 ),
545 'weight' => '',
546 'group' => '' ,
547 'edit_field_class' => ''
548 ),
549 array(
550 'heading' => __('Button shape style','auxin-elements' ),
551 'description' => '',
552 'param_name' => 'btn_border',
553 'type' => 'aux_visual_select',
554 'value' => '',
555 'class' => 'border',
556 'admin_label' => false,
557 'dependency' => array(
558 'element' => 'display_button',
559 'value' => true,
560 ),
561 'weight' => '',
562 'group' => '' ,
563 'edit_field_class' => '',
564 'choices' => array(
565 '' => array(
566 'label' => __('Box', 'auxin-elements' ),
567 'image' => AUXIN_URL . 'images/visual-select/button-normal.svg'
568 ),
569 'round' => array(
570 'label' => __('Round', 'auxin-elements' ),
571 'image' => AUXIN_URL . 'images/visual-select/button-curved.svg'
572 ),
573 'curve' => array(
574 'label' => __('Curve', 'auxin-elements' ),
575 'image' => AUXIN_URL . 'images/visual-select/button-rounded.svg'
576 )
577 )
578 ),
579 array(
580 'heading' => __('Button style','auxin-elements' ),
581 'description' => '',
582 'param_name' => 'btn_style',
583 'type' => 'aux_visual_select',
584 'value' => '',
585 'class' => 'style',
586 'admin_label' => false,
587 'dependency' => array(
588 'element' => 'display_button',
589 'value' => true,
590 ),
591 'weight' => '',
592 'group' => '' ,
593 'edit_field_class' => '',
594 'choices' => array(
595 '' => array(
596 'label' => __('Normal', 'auxin-elements' ),
597 'image' => AUXIN_URL . 'images/visual-select/button-normal.svg'
598 ),
599 '3d' => array(
600 'label' => __('3D', 'auxin-elements' ),
601 'image' => AUXIN_URL . 'images/visual-select/button-3d.svg'
602 ),
603 'outline' => array(
604 'label' => __('Outline', 'auxin-elements' ),
605 'image' => AUXIN_URL . 'images/visual-select/button-outline.svg'
606 )
607 )
608 ),
609 array(
610 'heading' => __('Uppercase label','auxin-elements' ),
611 'description' => '',
612 'param_name' => 'btn_uppercase',
613 'type' => 'aux_switch',
614 'value' => '1',
615 'class' => 'uppercase',
616 'admin_label' => false,
617 'dependency' => array(
618 'element' => 'display_button',
619 'value' => true,
620 ),
621 'weight' => '',
622 'group' => '' ,
623 'edit_field_class' => ''
624 ),
625 array(
626 'heading' => __('Darken the label','auxin-elements' ),
627 'description' => __('Darken label of button while mouse over it.','auxin-elements' ),
628 'param_name' => 'btn_dark',
629 'type' => 'aux_switch',
630 'value' => '0',
631 'class' => 'dark',
632 'admin_label' => false,
633 'dependency' => array(
634 'element' => 'display_button',
635 'value' => true,
636 ),
637 'weight' => '',
638 'group' => '' ,
639 'edit_field_class' => ''
640 ),
641 array(
642 'heading' => __('Icon for button','auxin-elements' ),
643 'description' => '',
644 'param_name' => 'btn_icon',
645 'type' => 'aux_iconpicker',
646 'value' => '',
647 'class' => 'icon-name',
648 'admin_label' => false,
649 'dependency' => array(
650 'element' => 'display_button',
651 'value' => true,
652 ),
653 'weight' => '',
654 'group' => '' ,
655 'edit_field_class' => ''
656 ),
657 array(
658 'heading' => __('Icon alignment','auxin-elements' ),
659 'description' => '',
660 'param_name' => 'btn_icon_align',
661 'type' => 'dropdown',
662 'def_value' => 'default',
663 'value' => array(
664 'default' => __('Default' , 'auxin-elements' ),
665 'left' => __('Left' , 'auxin-elements' ),
666 'right' => __('Right' , 'auxin-elements' ),
667 'over' => __('Over' , 'auxin-elements' ),
668 'left-animate' => __('Animate from Left' , 'auxin-elements' ),
669 'right-animate' => __('Animate from Right' , 'auxin-elements' )
670 ),
671 'holder' => '',
672 'class' => 'icon-align',
673 'admin_label' => false,
674 'dependency' => array(
675 'element' => 'display_button',
676 'value' => true,
677 ),
678 'weight' => '',
679 'group' => '' ,
680 'edit_field_class' => ''
681 ),
682 array(
683 'heading' => __('Color of button','auxin-elements' ),
684 'description' => '',
685 'param_name' => 'btn_color_name',
686 'type' => 'aux_visual_select',
687 'value' => 'carmine-pink',
688 'choices' => auxin_get_famous_colors_list(),
689 'holder' => '',
690 'class' => 'color',
691 'admin_label' => false,
692 'dependency' => array(
693 'element' => 'display_button',
694 'value' => true,
695 ),
696 'weight' => '',
697 'group' => '' ,
698 'edit_field_class' => ''
699 ),
700 array(
701 'heading' => __('Link','auxin-elements' ),
702 'description' => __('If you want to link your button.', 'auxin-elements' ),
703 'param_name' => 'btn_link',
704 'type' => 'textfield',
705 'value' => '',
706 'holder' => '',
707 'class' => 'link',
708 'admin_label' => false,
709 'dependency' => array(
710 'element' => 'display_button',
711 'value' => true,
712 ),
713 'weight' => '',
714 'group' => '' ,
715 'edit_field_class' => ''
716 ),
717 array(
718 'heading' => __('Open link in','auxin-elements' ),
719 'description' => '',
720 'param_name' => 'target',
721 'type' => 'dropdown',
722 'def_value' => '_self',
723 'value' => array(
724 '_self' => __('Current page' , 'auxin-elements' ),
725 '_blank' => __('New page', 'auxin-elements' )
726 ),
727 'holder' => '',
728 'class' => 'target',
729 'admin_label' => false,
730 'dependency' => array(
731 'element' => 'display_button',
732 'value' => true,
733 ),
734 'weight' => '',
735 'group' => '' ,
736 'edit_field_class' => ''
737 ),
738 array(
739 'heading' => __('Content','auxin-elements'),
740 'description' => __('Enter a text as a text content.','auxin-elements'),
741 'param_name' => 'content',
742 'type' => 'textarea_html',
743 'value' => '',
744 'def_value' => '',
745 'holder' => 'div',
746 'class' => 'content',
747 'admin_label' => true,
748 'dependency' => '',
749 'weight' => '',
750 'group' => '' ,
751 'edit_field_class' => ''
752 ),
753 array(
754 'heading' => __('Bottom shape style','auxin-elements' ),
755 'description' => '',
756 'param_name' => 'bottom_shape_style',
757 'type' => 'aux_visual_select',
758 'value' => '',
759 'class' => 'bottom_shape_style',
760 'def_value' => 'none',
761 'admin_label' => false,
762 'dependency' => '',
763 'weight' => '',
764 'group' => '' ,
765 'edit_field_class' => '',
766 'choices' => array(
767 '' => array(
768 'label' => __('None', 'auxin-elements' ),
769 'image' => AUXIN_URL . 'images/visual-select/button-normal.svg'
770 ),
771 'wave' => array(
772 'label' => __('Wave', 'auxin-elements' ),
773 'image' => AUXIN_URL . 'images/visual-select/button-curved.svg'
774 ),
775 'tail' => array(
776 'label' => __('Tail', 'auxin-elements' ),
777 'image' => AUXIN_URL . 'images/visual-select/button-rounded.svg'
778 )
779 )
780 ),
781 array(
782 'heading' => __( 'Bottom Shape color', 'auxin-elements' ),
783 'description' => __( 'Select color for shape', 'auxin-elements' ),
784 'param_name' => 'bottom_shape_color',
785 'type' => 'colorpicker',
786 'value' => '',
787 'class' => 'bottom_shape_color',
788 'dependency' => array(
789 'element' => 'bottom_shape_style',
790 'value' => array('tail', 'wave')
791 )
792 ),
793 array(
794 'heading' => __('Extra class name','auxin-elements'),
795 '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'),
796 'param_name' => 'extra_classes',
797 'type' => 'textfield',
798 'value' => '',
799 'def_value' => '',
800 'holder' => 'textfield',
801 'class' => 'extra_classes',
802 'admin_label' => true,
803 'dependency' => '',
804 'weight' => '',
805 'group' => '' ,
806 'edit_field_class' => ''
807 )
808 )
809 );
810
811 return $master_array;
812 }
813
814 add_filter( 'auxin_master_array_shortcodes', 'auxin_get_text_master_array', 10, 1 );
815
816 // This is the widget call back in fact the front end out put of this widget comes from this function
817 function auxin_widget_column_callback( $atts, $shortcode_content = null ){
818
819 // Defining default attributes
820 $default_atts = array(
821 'title' => '', // section title
822 'title_link' => '', // the link on title
823 'subtitle' => '', // Text as subtitle under the title
824 'content' => '', // the link on title
825 'text_align' => '', // left, right, center
826 'text_color_mode' => 'inherit', // inherit, dark, light
827
828 'wrapper_style' => '', // box, outline,
829 'wrapper_bg_color' => '', // box, outline,
830 'wrapper_bg_image' => '', // box, background image,
831 'wrapper_border_color' => '', // border color for box,
832 'overlay_color' => '', // border color for box,
833
834 'icon' => '', // icon on column side
835 'icon_color' => '#888',
836 'icon_size' => 'large', // small, medium, large, x-large
837 'icon_shape' => 'circle', // circle, semi-circle, round-rect, rect, fill, ...
838 'icon_bg_color' => '', // empty mean inherit,
839 'icon_border_color' => '', // color or 'icon' (same color as icon)
840 'background_display' => '',
841 'fill_bg_color' => '', // color or 'icon' (same color as icon)
842
843 'image' => '', // image on column side
844 'image_size' => 'full', // image on column side
845 'image_position' => 'top', // top,left,right
846
847 'display_button' => '',
848 'btn_label' => '',
849 'btn_size' => '',
850 'btn_border' => '',
851 'btn_style' => '',
852 'btn_uppercase' => '',
853 'btn_dark' => '',
854 'btn_icon' => '',
855 'btn_icon_align' => '',
856 'btn_color_name' => '',
857 'btn_link' => '',
858 'btn_target' => '',
859
860 'bottom_shape_style' => '',
861 'bottom_shape_color' => '',
862
863 'extra_classes' => '', // custom css class names for this element
864 'custom_el_id' => '', // custom id attribute for this element
865 'base_class' => 'aux-widget-text' // base class name for container
866 );
867
868
869 if( ! empty( $atts['wrapper_style'] ) ){
870 $atts['extra_classes'] .= ' aux-wrap-style-' . esc_attr( $atts['wrapper_style'] );
871 } elseif( ! empty( $default_atts['wrapper_style'] ) ){
872 $atts['extra_classes'] .= ' aux-wrap-style-' . esc_attr( $default_atts['wrapper_style'] );
873 }
874
875 $result = auxin_get_widget_scafold( $atts, $default_atts );
876
877 extract( $result['parsed_atts'] );
878
879 $icon_border_color = 'icon' == $icon_border_color ? $icon_color : $icon_border_color;
880 $content = empty( $content ) ? $shortcode_content : $content;
881
882 $main_inline_style = empty( $wrapper_bg_color ) ? '' : 'background-color:' . $wrapper_bg_color . ' !important;';
883 $main_inline_style .= empty( $wrapper_border_color ) ? '' : 'border:2px solid ' . $wrapper_border_color . ';';
884 $main_inline_style .= empty( $wrapper_bg_image ) ? '' : 'background-image:url(' . wp_get_attachment_image_url( $wrapper_bg_image, 'full' ) . ');';
885 $main_inline_style = empty( $main_inline_style ) ? '' : ' style="' . $main_inline_style . '"';
886
887 $main_classes = 'aux-ico-pos-'. ( $image_position ? esc_attr( $image_position ) : 'top' );
888 $main_classes .= empty( $content ) ? ' no-content' : '';
889 $main_classes .= empty( $text_align ) ? '' : ' aux-text-align-' . esc_attr( $text_align );
890 $main_classes .= empty( $background_display ) ? '' : ' aux-text-widget-bg-' . esc_attr( $background_display );
891 $main_classes .= empty( $wrapper_bg_image ) && ! empty( $fill_bg_color ) ? ' aux-text-widget-more-pad' : '';
892
893 $icon_box_classes = $icon_box_inline_style = '';
894
895 if ( ! empty( $image ) && is_numeric( $image ) ) {
896 if ( 'fill' == $icon_shape ) {
897 $main_classes .= ' aux-text-widget-header-no-pad';
898 } else {
899 $icon_box_classes .= 'aux-img-box';
900 $image_data = wp_get_attachment_image_src( $image, $image_size );
901 $icon_box_inline_style = ' width:' . $image_data[1] . 'px;';
902 }
903 }
904
905 $main_classes .= empty( $text_color_mode ) || 'inherit' == $text_color_mode ? '' : ' aux-text-color-'. esc_attr( $text_color_mode );
906
907 $icon_box_inline_style .= empty( $icon_bg_color ) ? '' : 'background-color:' . $icon_bg_color . ' !important;';
908 $icon_box_inline_style .= empty( $icon_border_color ) ? '' : 'border-color:' . $icon_border_color . ';';
909 $icon_box_inline_style = empty( $icon_box_inline_style ) ? '' : ' style="' . $icon_box_inline_style . '";';
910
911 $overlay_style = empty( $overlay_color ) ? '' : 'style="background-color:' . $overlay_color . '";';
912
913 $box_header_style = empty( $fill_bg_color ) ? '' : 'background-color: ' . $fill_bg_color . ';';
914 $box_header_style = empty( $box_header_style ) ? '' : 'style="' . $box_header_style . '"';
915
916 $icon_box_classes .= ' aux-ico-' . esc_attr( $icon_size );
917 $icon_box_classes .= ' aux-ico-shape-' . esc_attr( $icon_shape );
918
919 $icon_classes = empty( $icon ) || $icon == 'none' ? '' : esc_attr( $icon );
920 $icon_classes .= ! empty( $icon_bg_color ) || ! empty( $icon_border_color ) ? ' aux-ico-margin' : '';
921 $icon_inline_style = empty( $icon_color ) ? '' : 'style="color:' . $icon_color . ' !important;"';
922
923 $icon_border_style_tag = '';
924 if( ! empty( $icon_border_color ) && 'cross-rect' == $icon_shape ){
925 $icon_uid = uniqid( 'auxt' );
926 $icon_box_inline_style .= ' id="'. $icon_uid .'"';
927 $icon_border_style_tag = "<style>#$icon_uid:before,#$icon_uid:after{border-color:$icon_border_color;}</style>";
928 }
929
930 $bottom_shape_classes = empty( $bottom_shape_style ) ? '' : 'aux-border-shape-' . esc_attr( $bottom_shape_style );
931 $bottom_shape_color = empty( $bottom_shape_color ) ? '' : 'style="border-top-color:' . esc_attr( $bottom_shape_color ) . ';"';
932
933
934 if( ! empty( $image ) && is_numeric( $image ) ) {
935 // $image = auxin_get_the_resized_attachment( $image );
936 $image = wp_get_attachment_image( $image, $image_size );
937 }
938
939 $btn_atts = array(
940 'label' => $btn_label,
941 'size' => $btn_size,
942 'border' => $btn_border,
943 'style' => $btn_style,
944 'uppercase' => $btn_uppercase,
945 'dark' => $btn_dark,
946 'icon' => $btn_icon,
947 'icon_align' => $btn_icon_align,
948 'color_name' => $btn_color_name,
949 'link' => $btn_link,
950 'target' => $btn_target,
951 );
952
953 ob_start();
954
955 // widget header ------------------------------
956 echo $result['widget_header'];
957 ?>
958 <div class="<?php echo $main_classes; ?>" <?php echo $main_inline_style; ?>>
959 <?php if ( ! empty( $overlay_color ) ) { ?>
960 <div class="aux-text-widget-overlay" <?php echo $overlay_style; ?>></div>
961 <?php } ?>
962 <div class="aux-text-widget-header" <?php echo $box_header_style; echo $box_header_style; ?>>
963 <?php if( ! empty( $icon ) && empty( $image ) ) { ?>
964 <div class="aux-ico-box <?php echo $icon_box_classes; ?>" <?php echo $icon_box_inline_style; ?>>
965 <?php echo $icon_border_style_tag; ?>
966 <span class="aux-ico <?php echo $icon_classes; ?>" <?php echo $icon_inline_style; ?> > </span>
967 </div>
968 <?php } elseif( !empty( $image ) ) { ?>
969 <div class="aux-ico-box <?php echo $icon_box_classes; ?>" <?php echo $icon_box_inline_style; ?> >
970 <?php echo $image; ?>
971 </div>
972 <?php } ?>
973 </div>
974 <div class="aux-text-inner aux-text-widget-content">
975 <?php if( ! empty( $title ) && empty( $title_link ) ) { ?>
976 <h4 class="col-title"><?php echo $title; ?></h4>
977 <?php } elseif( ! empty( $title ) && ! empty( $title_link ) ) { ?>
978 <h4 class="col-title"><a href="<?php echo $title_link; ?>"><?php echo $title; ?></a></h4>
979 <?php } if( ! empty( $subtitle ) ) { ?>
980 <h5 class="col-subtitle"><?php echo $subtitle; ?></h5>
981 <?php } if( ! empty( $content ) ) { ?>
982 <div class="entry-content">
983 <?php $encoding_flag = defined('ENT_HTML401') ? ENT_HTML401 : ENT_QUOTES; ?>
984 <p><?php echo do_shortcode( html_entity_decode( $content, $encoding_flag, 'UTF-8') ); ?></p>
985 </div>
986 <?php } if ( ! empty( $display_button ) ) {
987 echo auxin_widget_button_callback( $btn_atts );
988 } ?>
989 </div>
990 </div>
991 <?php if ( ! empty( $bottom_shape_classes ) ) { ?>
992 <div class="aux-text-widget-footer">
993 <div class="aux-border-shape <?php echo $bottom_shape_classes; ?>" <?php echo $bottom_shape_color; ?>></div>
994 </div>
995 <?php } ?>
996
997 <?php
998 // widget footer ------------------------------
999 echo $result['widget_footer'];
1000
1001 return ob_get_clean();
1002 }
1003