Shortcodes and extra features for Phlox theme - Version 1.7.0

Version Description

Download this release

Release Info

Developer averta
Plugin Icon 128x128 Shortcodes and extra features for Phlox theme
Version 1.7.0
Comparing to
See all releases

Code changes from version 1.6.4 to 1.7.0

README.txt CHANGED
@@ -6,8 +6,8 @@ License URI: http://www.gnu.org/licenses/gpl.html
6
  Tags: testimonial, gallery, page-builder, siteorigin, auxin, phlox, averta, auxin-elements, framework, widget, fullwidth, masonry, timeline, parallax
7
  Requires PHP: 5.3
8
  Requires at least: 4.6
9
- Tested up to: 4.8.3
10
- Stable tag: 1.6.4
11
  License: GPLv3
12
  License URI: http://www.gnu.org/licenses/gpl.html
13
 
@@ -141,12 +141,21 @@ Bugs can be reported in our [support forums](http://wordpress.org/tags/auxin-ele
141
 
142
  == Changelog ==
143
 
 
 
 
 
 
 
 
 
 
 
144
 
145
  = Version 1.6.4 / 1.11.2017) =
146
  - [Improvement]: Major improvements for page title setting were applied.
147
  - [Improvement]: Several improvements for setup wizard were applied.
148
 
149
-
150
  = Version 1.6.2 / (23.10.2017) =
151
  - [Improvement]: Improvement and bug fix for setup wizard.
152
 
@@ -228,6 +237,6 @@ Bugs can be reported in our [support forums](http://wordpress.org/tags/auxin-ele
228
 
229
  == Upgrade Notice ==
230
 
231
- = 1.6.4 =
232
- - [Improvement]: Major improvements for page title setting were applied.
233
- - [Improvement]: Several improvements for setup wizard were applied.
6
  Tags: testimonial, gallery, page-builder, siteorigin, auxin, phlox, averta, auxin-elements, framework, widget, fullwidth, masonry, timeline, parallax
7
  Requires PHP: 5.3
8
  Requires at least: 4.6
9
+ Tested up to: 4.8.4
10
+ Stable tag: 1.7.0
11
  License: GPLv3
12
  License URI: http://www.gnu.org/licenses/gpl.html
13
 
141
 
142
  == Changelog ==
143
 
144
+ = Version 1.7.0 / 14.11.2017) =
145
+ - [Fix]: An issue with recent post elements on single post page fixed.
146
+ - [Fix]: Live preview for header action buttons while editing in customizer.
147
+ - [New]: Add new functionalities to WordPress video playlist.
148
+ - [New]: Tiny size is added to the divider element.
149
+ - [Fix]: An issue with missing date and time in recent post slider fixed.
150
+ - [Fix]: Tabs and accordion elements are removed from widgets list.
151
+ - [Fix]: A typo in testimonial name fixed.
152
+ - [Improvement]: Default load more type for recent grid element changed.
153
+
154
 
155
  = Version 1.6.4 / 1.11.2017) =
156
  - [Improvement]: Major improvements for page title setting were applied.
157
  - [Improvement]: Several improvements for setup wizard were applied.
158
 
 
159
  = Version 1.6.2 / (23.10.2017) =
160
  - [Improvement]: Improvement and bug fix for setup wizard.
161
 
237
 
238
  == Upgrade Notice ==
239
 
240
+ = 1.7.0 =
241
+ - [Fix]: An issue with recent post elements on single post page fixed.
242
+ - [Fix]: Live preview for header action buttons while editing in customizer.
auxin-elements.php CHANGED
@@ -12,7 +12,7 @@
12
  * Plugin Name: Phlox Core Elements
13
  * Plugin URI: https://wordpress.org/plugins/auxin-elements/
14
  * Description: Powerful and comprehensive plugin that extends the functionality of Phlox theme by adding new shortcodes, widgets and options
15
- * Version: 1.6.4
16
  * Author: averta
17
  * Author URI: http://averta.net
18
  * Text Domain: auxin-elements
@@ -68,7 +68,7 @@ if( is_admin() || false === get_transient( 'auxels_plugin_requirements_check' )
68
  'themes' => array(
69
  array(
70
  'name' => __('Phlox', 'auxin-elements'), // The theme name.
71
- 'version' => '1.8.4', // E.g. 1.0.0. If set, the active theme must be this version or higher.
72
  'is_callable' => '', // If set, this callable will be be checked for availability to determine if a theme is active.
73
  'file_exists' => get_template_directory() . '/auxin/auxin-include/auxin.php' // If set, this file will be checked for availability to determine if a theme is active.
74
  )
12
  * Plugin Name: Phlox Core Elements
13
  * Plugin URI: https://wordpress.org/plugins/auxin-elements/
14
  * Description: Powerful and comprehensive plugin that extends the functionality of Phlox theme by adding new shortcodes, widgets and options
15
+ * Version: 1.7.0
16
  * Author: averta
17
  * Author URI: http://averta.net
18
  * Text Domain: auxin-elements
68
  'themes' => array(
69
  array(
70
  'name' => __('Phlox', 'auxin-elements'), // The theme name.
71
+ 'version' => '1.9.0', // E.g. 1.0.0. If set, the active theme must be this version or higher.
72
  'is_callable' => '', // If set, this callable will be be checked for availability to determine if a theme is active.
73
  'file_exists' => get_template_directory() . '/auxin/auxin-include/auxin.php' // If set, this file will be checked for availability to determine if a theme is active.
74
  )
includes/define.php CHANGED
@@ -12,7 +12,7 @@ if( ! defined( 'THEME_NAME' ) ){
12
  }
13
 
14
 
15
- define( 'AUXELS_VERSION' , '1.6.4' );
16
 
17
  define( 'AUXELS_SLUG' , 'auxin-elements' );
18
 
12
  }
13
 
14
 
15
+ define( 'AUXELS_VERSION' , '1.7.0' );
16
 
17
  define( 'AUXELS_SLUG' , 'auxin-elements' );
18
 
includes/elements/accordion.php CHANGED
@@ -20,7 +20,7 @@ function auxin_get_new_accordion_master_array( $master_array ) {
20
  'class' => 'aux-widget-accordion widget-toggle',
21
  'show_settings_on_create' => true,
22
  'weight' => 1,
23
- 'is_widget' => true,
24
  'is_shortcode' => true,
25
  'is_so' => true,
26
  'is_vc' => false,
20
  'class' => 'aux-widget-accordion widget-toggle',
21
  'show_settings_on_create' => true,
22
  'weight' => 1,
23
+ 'is_widget' => false,
24
  'is_shortcode' => true,
25
  'is_so' => true,
26
  'is_vc' => false,
includes/elements/button.php CHANGED
@@ -44,7 +44,7 @@ function auxin_get_button_master_array( $master_array ) {
44
  'description' => __('The label of button.','auxin-elements' ),
45
  'param_name' => 'label',
46
  'type' => 'textfield',
47
- 'value' => 'Button',
48
  'holder' => 'textfield',
49
  'class' => 'label',
50
  'admin_label' => false,
@@ -75,7 +75,7 @@ function auxin_get_button_master_array( $master_array ) {
75
  'edit_field_class' => ''
76
  ),
77
  array(
78
- 'heading' => __('Button shape style','auxin-elements' ),
79
  'description' => '',
80
  'param_name' => 'border',
81
  'type' => 'aux_visual_select',
@@ -224,8 +224,8 @@ function auxin_get_button_master_array( $master_array ) {
224
  'edit_field_class' => ''
225
  ),
226
  array(
227
- 'heading' => __('Link','auxin-elements' ),
228
- 'description' => __('If you want to link your button.', 'auxin-elements' ),
229
  'param_name' => 'link',
230
  'type' => 'textfield',
231
  'value' => '',
@@ -278,11 +278,11 @@ function auxin_get_button_master_array( $master_array ) {
278
  add_filter( 'auxin_master_array_shortcodes', 'auxin_get_button_master_array', 10, 1 );
279
 
280
 
281
- function auxin_widget_button_callback( $atts, $shortcode_content = null ){
282
 
283
  // Defining default attributes
284
  $default_atts = array(
285
- 'label' => 'Button',
286
  'size' => 'medium',
287
  'border' => '',
288
  'style' => '',
@@ -303,16 +303,17 @@ function auxin_widget_button_callback( $atts, $shortcode_content = null ){
303
  extract( $result['parsed_atts'] );
304
 
305
 
306
-
307
-
308
  // --------------------------------------------
309
  $btn_css_classes = array( 'aux-button' );
310
  $btn_css_classes[] = 'aux-' . $size; // size
311
- $btn_css_classes[] = 'aux-' . $border; // border form
312
- $btn_css_classes[] = 'aux-' . $style; // appearance
313
  $btn_css_classes[] = 'aux-' . $color_name; // appearance
314
 
315
-
 
 
 
 
 
316
  if( auxin_is_true( $uppercase ) ){
317
  $btn_css_classes[] = 'aux-uppercase'; // text form
318
  }
@@ -327,10 +328,11 @@ function auxin_widget_button_callback( $atts, $shortcode_content = null ){
327
  $btn_css_classes[] = $extra_classes;
328
  }
329
 
 
330
  $button_class_attr = auxin_make_html_class_attribute( $btn_css_classes );
331
 
332
-
333
  $label = empty( $label ) ? $shortcode_content : $label;
 
334
 
335
  $btn_content = '<span class="aux-overlay"></span>';
336
  $btn_label = '<span class="aux-text">'. auxin_do_cleanup_shortcode( $label ) .'</span>';
@@ -344,8 +346,7 @@ function auxin_widget_button_callback( $atts, $shortcode_content = null ){
344
  }
345
 
346
  $btn_tag = empty( $link ) ? 'button' : 'a';
347
- $btn_href = empty( $link ) ? '' : ' href="'. $link .'" target="'. $target .'" ';
348
-
349
 
350
  $output = '';
351
 
44
  'description' => __('The label of button.','auxin-elements' ),
45
  'param_name' => 'label',
46
  'type' => 'textfield',
47
+ 'value' => __('Button', 'auxin-elements'),
48
  'holder' => 'textfield',
49
  'class' => 'label',
50
  'admin_label' => false,
75
  'edit_field_class' => ''
76
  ),
77
  array(
78
+ 'heading' => __('Button shape','auxin-elements' ),
79
  'description' => '',
80
  'param_name' => 'border',
81
  'type' => 'aux_visual_select',
224
  'edit_field_class' => ''
225
  ),
226
  array(
227
+ 'heading' => __('Button Link','auxin-elements' ),
228
+ 'description' => '',
229
  'param_name' => 'link',
230
  'type' => 'textfield',
231
  'value' => '',
278
  add_filter( 'auxin_master_array_shortcodes', 'auxin_get_button_master_array', 10, 1 );
279
 
280
 
281
+ function auxin_widget_button_callback( $atts = array(), $shortcode_content = null ){
282
 
283
  // Defining default attributes
284
  $default_atts = array(
285
+ 'label' => '',
286
  'size' => 'medium',
287
  'border' => '',
288
  'style' => '',
303
  extract( $result['parsed_atts'] );
304
 
305
 
 
 
306
  // --------------------------------------------
307
  $btn_css_classes = array( 'aux-button' );
308
  $btn_css_classes[] = 'aux-' . $size; // size
 
 
309
  $btn_css_classes[] = 'aux-' . $color_name; // appearance
310
 
311
+ if( $border ){
312
+ $btn_css_classes[] = 'aux-' . $border; // border form
313
+ }
314
+ if( $style ){
315
+ $btn_css_classes[] = 'aux-' . $style; // appearance
316
+ }
317
  if( auxin_is_true( $uppercase ) ){
318
  $btn_css_classes[] = 'aux-uppercase'; // text form
319
  }
328
  $btn_css_classes[] = $extra_classes;
329
  }
330
 
331
+ // get escaped class attributes
332
  $button_class_attr = auxin_make_html_class_attribute( $btn_css_classes );
333
 
 
334
  $label = empty( $label ) ? $shortcode_content : $label;
335
+ $label = empty( $label ) ? __( "Button", 'auxin-elements' ) : $label;
336
 
337
  $btn_content = '<span class="aux-overlay"></span>';
338
  $btn_label = '<span class="aux-text">'. auxin_do_cleanup_shortcode( $label ) .'</span>';
346
  }
347
 
348
  $btn_tag = empty( $link ) ? 'button' : 'a';
349
+ $btn_href = empty( $link ) ? '' : ' href="'. esc_url( $link ) .'" target="'. esc_attr( $target ) .'" ';
 
350
 
351
  $output = '';
352
 
includes/elements/contact-box.php CHANGED
@@ -407,7 +407,15 @@ function auxin_widget_contact_box( $atts, $shortcode_content = null ){
407
 
408
  ?>
409
  <div id="<?php echo esc_attr( $mapid ); ?>" class="aux-map-wrapper <?php echo esc_attr( $extra_classes ); ?>" style="height:<?php echo esc_attr( $height ); ?>px" ></div>
 
 
 
 
 
 
410
 
 
 
411
  <script>
412
  jQuery( function($) {
413
  if(typeof GMaps != "function" || typeof google === "undefined"){
@@ -449,12 +457,9 @@ function auxin_widget_contact_box( $atts, $shortcode_content = null ){
449
  });
450
 
451
  </script>
452
- <?php
453
  }
454
 
455
- if( 'down' === $map_position ){
456
- echo $contact_info;
457
- }
458
 
459
  // widget footer ------------------------------
460
  echo $result['widget_footer'];
407
 
408
  ?>
409
  <div id="<?php echo esc_attr( $mapid ); ?>" class="aux-map-wrapper <?php echo esc_attr( $extra_classes ); ?>" style="height:<?php echo esc_attr( $height ); ?>px" ></div>
410
+ <?php
411
+ }
412
+
413
+ if( 'down' === $map_position ){
414
+ echo $contact_info;
415
+ }
416
 
417
+ if( auxin_is_true( $show_map ) ) {
418
+ ?>
419
  <script>
420
  jQuery( function($) {
421
  if(typeof GMaps != "function" || typeof google === "undefined"){
457
  });
458
 
459
  </script>
460
+ <?php
461
  }
462
 
 
 
 
463
 
464
  // widget footer ------------------------------
465
  echo $result['widget_footer'];
includes/elements/divider.php CHANGED
@@ -83,7 +83,8 @@ function auxin_get_divider_master_array( $master_array ) {
83
  'value' => array(
84
  'large' => __('Large', 'auxin-elements'),
85
  'medium' => __('Medium', 'auxin-elements'),
86
- 'small' => __('Small', 'auxin-elements')
 
87
  ),
88
  'def_value' => 'medium',
89
  'holder' => '',
@@ -197,11 +198,13 @@ function auxin_widget_divider_callback( $atts, $shortcode_content = null ){
197
  break;
198
  case 'medium':
199
  $class_names .= " aux-divider-medium";
200
-
201
  break;
202
  case 'small':
203
  $class_names .= " aux-divider-small";
204
  break;
 
 
 
205
  }
206
 
207
 
83
  'value' => array(
84
  'large' => __('Large', 'auxin-elements'),
85
  'medium' => __('Medium', 'auxin-elements'),
86
+ 'small' => __('Small', 'auxin-elements'),
87
+ 'tiny' => __('Tiny', 'auxin-elements')
88
  ),
89
  'def_value' => 'medium',
90
  'holder' => '',
198
  break;
199
  case 'medium':
200
  $class_names .= " aux-divider-medium";
 
201
  break;
202
  case 'small':
203
  $class_names .= " aux-divider-small";
204
  break;
205
+ case 'tiny':
206
+ $class_names .= " aux-divider-tiny";
207
+ break;
208
  }
209
 
210
 
includes/elements/latest-posts-slider.php CHANGED
@@ -504,7 +504,7 @@ function auxin_latest_posts_slider_callback( $atts, $shortcode_content = null ){
504
  </div>
505
  <div class="aux-slide-info">
506
  <?php if ( $add_meta ) { ?>
507
- <time datetime="<?php echo get_the_date( DATE_W3C ); ?>" title="<?php echo get_the_date( DATE_W3C ); ?>" ><?php the_date(); ?></time>
508
  <span class="entry-tax">
509
  <?php // the_category(' '); we can use this template tag, but customizable way is needed! ?>
510
  <?php $tax_name = 'category';
504
  </div>
505
  <div class="aux-slide-info">
506
  <?php if ( $add_meta ) { ?>
507
+ <time datetime="<?php echo get_the_date( DATE_W3C ); ?>" title="<?php echo get_the_date( DATE_W3C ); ?>" ><?php echo get_the_date(); ?></time>
508
  <span class="entry-tax">
509
  <?php // the_category(' '); we can use this template tag, but customizable way is needed! ?>
510
  <?php $tax_name = 'category';
includes/elements/recent-posts-grid-carousel.php CHANGED
@@ -352,7 +352,7 @@ function auxin_get_recent_posts_master_array( $master_array ) {
352
  'description' => '',
353
  'param_name' => 'loadmore_type',
354
  'type' => 'aux_visual_select',
355
- 'value' => 'scroll',
356
  'class' => 'loadmore_type',
357
  'admin_label' => false,
358
  'dependency' => '',
@@ -843,12 +843,12 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
843
  $item_class = 'aux-mc-item';
844
 
845
  // genereate the master carousel attributes
846
- $carousel_attrs = 'data-columns="' . $desktop_cnum . '"';
847
- $carousel_attrs .= ' data-autoplay="' . $carousel_autoplay . '"';
848
- $carousel_attrs .= ' data-delay="' . $carousel_autoplay_delay . '"';
849
- $carousel_attrs .= ' data-navigation="' . $carousel_navigation . '"';
850
- $carousel_attrs .= ' data-space="' . $carousel_space. '"';
851
- $carousel_attrs .= ' data-loop="' . $carousel_loop . '"';
852
  $carousel_attrs .= ' data-wrap-controls="true"';
853
  $carousel_attrs .= ' data-bullets="' . ('bullets' == $carousel_navigation_control ? 'true' : 'false') . '"';
854
  $carousel_attrs .= ' data-bullet-class="aux-bullets aux-small aux-mask"';
@@ -856,8 +856,8 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
856
  $carousel_attrs .= ' data-same-height="true"';
857
 
858
  if ( 'inherit' != $tablet_cnum || 'inherit' != $phone_cnum ) {
859
- $carousel_attrs .= ' data-responsive="'. ( 'inherit' != $tablet_cnum ? $tablet_break_point . ':' . $tablet_cnum . ',' : '' ).
860
- ( 'inherit' != $phone_cnum ? $phone_break_point . ':' . $phone_cnum : '' ) . '"';
861
  }
862
 
863
  }
@@ -879,7 +879,7 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
879
 
880
  if( $have_posts ){
881
 
882
- echo ! $skip_wrappers ? sprintf( '<div data-element-id="%s" class="%s" %s>', esc_attr( $universal_id ), esc_attr( $column_class ), esc_html( $carousel_attrs ) ) : '';
883
 
884
  while ( $wp_query->have_posts() ) {
885
 
352
  'description' => '',
353
  'param_name' => 'loadmore_type',
354
  'type' => 'aux_visual_select',
355
+ 'value' => '',
356
  'class' => 'loadmore_type',
357
  'admin_label' => false,
358
  'dependency' => '',
843
  $item_class = 'aux-mc-item';
844
 
845
  // genereate the master carousel attributes
846
+ $carousel_attrs = 'data-columns="' . esc_attr( $desktop_cnum ) . '"';
847
+ $carousel_attrs .= ' data-autoplay="' . esc_attr( $carousel_autoplay ) . '"';
848
+ $carousel_attrs .= ' data-delay="' . esc_attr( $carousel_autoplay_delay ) . '"';
849
+ $carousel_attrs .= ' data-navigation="' . esc_attr( $carousel_navigation ) . '"';
850
+ $carousel_attrs .= ' data-space="' . esc_attr( $carousel_space ). '"';
851
+ $carousel_attrs .= ' data-loop="' . esc_attr( $carousel_loop ) . '"';
852
  $carousel_attrs .= ' data-wrap-controls="true"';
853
  $carousel_attrs .= ' data-bullets="' . ('bullets' == $carousel_navigation_control ? 'true' : 'false') . '"';
854
  $carousel_attrs .= ' data-bullet-class="aux-bullets aux-small aux-mask"';
856
  $carousel_attrs .= ' data-same-height="true"';
857
 
858
  if ( 'inherit' != $tablet_cnum || 'inherit' != $phone_cnum ) {
859
+ $carousel_attrs .= ' data-responsive="'. esc_attr( ( 'inherit' != $tablet_cnum ? $tablet_break_point . ':' . $tablet_cnum . ',' : '' ).
860
+ ( 'inherit' != $phone_cnum ? $phone_break_point . ':' . $phone_cnum : '' ) ) . '"';
861
  }
862
 
863
  }
879
 
880
  if( $have_posts ){
881
 
882
+ echo ! $skip_wrappers ? sprintf( '<div data-element-id="%s" class="%s" %s>', esc_attr( $universal_id ), esc_attr( $column_class ), $carousel_attrs ) : '';
883
 
884
  while ( $wp_query->have_posts() ) {
885
 
includes/elements/staff.php CHANGED
@@ -438,7 +438,7 @@ function auxin_get_staff_master_array( $master_array ) {
438
  'description' => '',
439
  'param_name' => 'icon_align',
440
  'type' => 'dropdown',
441
- 'def_value' => 'aux-vertical',
442
  'value' => array (
443
  'aux-vertical' => __( 'Vertical' , 'auxin-elements' ),
444
  'aux-horizontal' => __( 'Horizontal' , 'auxin-elements' ),
@@ -524,7 +524,7 @@ function auxin_widget_staff_callback( $atts, $shortcode_content = null ){
524
  'max_words' => 22,
525
  'social_flickr' => '',
526
  'social_pinterest' => '',
527
- 'icon_align' => 'aux-vertical',
528
  'social_github' => '',
529
  'social_delicious' => '',
530
  'layout_style' => 'top',
438
  'description' => '',
439
  'param_name' => 'icon_align',
440
  'type' => 'dropdown',
441
+ 'def_value' => 'aux-horizontal',
442
  'value' => array (
443
  'aux-vertical' => __( 'Vertical' , 'auxin-elements' ),
444
  'aux-horizontal' => __( 'Horizontal' , 'auxin-elements' ),
524
  'max_words' => 22,
525
  'social_flickr' => '',
526
  'social_pinterest' => '',
527
+ 'icon_align' => 'aux-horizontal',
528
  'social_github' => '',
529
  'social_delicious' => '',
530
  'layout_style' => 'top',
includes/elements/tabs.php CHANGED
@@ -20,7 +20,7 @@ function auxin_get_tabs_master_array( $master_array ) {
20
  'show_settings_on_create' => true,
21
  'so_api' => true,
22
  'weight' => 1,
23
- 'is_widget' => true,
24
  'is_shortcode' => true,
25
  'is_so' => true,
26
  'is_vc' => false,
20
  'show_settings_on_create' => true,
21
  'so_api' => true,
22
  'weight' => 1,
23
+ 'is_widget' => false,
24
  'is_shortcode' => true,
25
  'is_so' => true,
26
  'is_vc' => false,
includes/elements/testimonial.php ADDED
@@ -0,0 +1,238 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Testimonial Widget
4
+ *
5
+ *
6
+ * @package Auxin
7
+ * @license LICENSE.txt
8
+ * @author
9
+ * @link http://averta.net/phlox/
10
+ * @copyright (c) 2010-2017
11
+ */
12
+
13
+ function auxin_get_testimonial_master_array( $master_array ) {
14
+
15
+ $master_array['aux_testimonial'] = array(
16
+ 'name' => __('Testimonial ', 'auxin-elements'),
17
+ 'auxin_output_callback' => 'auxin_widget_testimonial_callback',
18
+ 'base' => 'aux_testimonial',
19
+ 'description' => __('Testimonial Element', 'auxin-elements'),
20
+ 'class' => 'aux-widget-testimonial',
21
+ 'show_settings_on_create' => true,
22
+ 'weight' => 1,
23
+ 'is_widget' => true,
24
+ 'is_shortcode' => true,
25
+ 'is_so' => false,
26
+ 'is_vc' => false,
27
+ 'category' => THEME_NAME,
28
+ 'group' => '',
29
+ 'so_api' => false,
30
+ 'admin_enqueue_js' => '',
31
+ 'admin_enqueue_css' => '',
32
+ 'front_enqueue_js' => '',
33
+ 'front_enqueue_css' => '',
34
+ 'icon' => 'aux-element aux-pb-icons-testimonial',
35
+ 'custom_markup' => '',
36
+ 'js_view' => '',
37
+ 'html_template' => '',
38
+ 'deprecated' => '',
39
+ 'content_element' => '',
40
+ 'as_parent' => '',
41
+ 'as_child' => '',
42
+ 'params' => array(
43
+ array(
44
+ 'heading' => __( 'Testimonial Templates','auxin-elements' ),
45
+ 'description' => '',
46
+ 'param_name' => 'template',
47
+ 'type' => 'aux_visual_select',
48
+ 'def_value' => 'default',
49
+ 'holder' => '',
50
+ 'class' => 'template',
51
+ 'admin_label' => false,
52
+ 'dependency' => '',
53
+ 'weight' => '',
54
+ 'group' => '',
55
+ 'edit_field_class' => '',
56
+ 'choices' => array(
57
+ 'default' => array(
58
+ 'label' => __( 'Default Template', 'auxin-elements' ),
59
+ 'image' => AUXIN_URL . 'images/visual-select/button-normal.svg'
60
+ ),
61
+ 'def-img' => array(
62
+ 'label' => __( 'Default Template With Image', 'auxin-elements' ),
63
+ 'image' => AUXIN_URL . 'images/visual-select/button-curved.svg'
64
+ ),
65
+ 'bordered' => array(
66
+ 'label' => __( 'Bordered On Content', 'auxin-elements' ),
67
+ 'image' => AUXIN_URL . 'images/visual-select/button-curved.svg'
68
+ ),
69
+ 'qoute' => array(
70
+ 'label' => __( 'Quotation Mark ln Top of the Content', 'auxin-elements' ),
71
+ 'image' => AUXIN_URL . 'images/visual-select/button-curved.svg'
72
+ ),
73
+ 'info-top' => array(
74
+ 'label' => __( 'Show Info on Top of Widget', 'auxin-elements' ),
75
+ 'image' => AUXIN_URL . 'images/visual-select/button-curved.svg'
76
+ ),
77
+ )
78
+ ),
79
+ array(
80
+ 'heading' => __('Customer Name','auxin-elements'),
81
+ 'description' => __('Customer Name, leave it empty if you don`t need title.', 'auxin-elements'),
82
+ 'param_name' => 'title',
83
+ 'type' => 'textfield',
84
+ 'value' => '',
85
+ 'holder' => 'textfield',
86
+ 'class' => 'title',
87
+ 'admin_label' => true,
88
+ 'dependency' => '',
89
+ 'weight' => '',
90
+ 'group' => '' ,
91
+ 'edit_field_class' => ''
92
+ ),
93
+ array(
94
+ 'heading' => __('Customer Link','auxin-elements'),
95
+ 'description' => __('Customer Link, leave it empty if you don`t need it', 'auxin-elements'),
96
+ 'param_name' => 'link',
97
+ 'type' => 'textfield',
98
+ 'value' => '',
99
+ 'holder' => 'textfield',
100
+ 'class' => 'title',
101
+ 'admin_label' => true,
102
+ 'dependency' => '',
103
+ 'weight' => '',
104
+ 'group' => '' ,
105
+ 'edit_field_class' => ''
106
+ ),
107
+ array(
108
+ 'heading' => __('Customer Occupation','auxin-elements'),
109
+ 'description' => __('Customer Occupation, leave it empty if you don`t need it.', 'auxin-elements'),
110
+ 'param_name' => 'subtitle',
111
+ 'type' => 'textfield',
112
+ 'value' => '',
113
+ 'holder' => 'textfield',
114
+ 'class' => 'subtitle',
115
+ 'admin_label' => true,
116
+ 'dependency' => '',
117
+ 'weight' => '',
118
+ 'group' => '' ,
119
+ 'edit_field_class' => ''
120
+ ),
121
+ array(
122
+ 'heading' => __('Customer Image', 'auxin-elements'),
123
+ 'description' => '',
124
+ 'param_name' => 'customer_img',
125
+ 'type' => 'attach_image',
126
+ 'def_value' => '',
127
+ 'value' => '',
128
+ 'holder' => '',
129
+ 'class' => 'customer-img',
130
+ 'admin_label' => true,
131
+ 'dependency' => array(
132
+ 'element' => 'template',
133
+ 'value' => array('bordered', 'def-img', 'info-top')
134
+ ),
135
+ 'weight' => '',
136
+ 'group' => '',
137
+ 'edit_field_class' => ''
138
+ ),
139
+ array(
140
+ 'heading' => __('Content','auxin-elements'),
141
+ 'description' => __('Enter a text as a text content.','auxin-elements'),
142
+ 'param_name' => 'content',
143
+ 'type' => 'textarea_html',
144
+ 'value' => '',
145
+ 'def_value' => '',
146
+ 'holder' => 'div',
147
+ 'class' => 'content',
148
+ 'admin_label' => true,
149
+ 'dependency' => '',
150
+ 'weight' => '',
151
+ 'group' => '' ,
152
+ 'edit_field_class' => ''
153
+ ),
154
+ )
155
+ );
156
+
157
+ return $master_array;
158
+ }
159
+
160
+ add_filter( 'auxin_master_array_shortcodes', 'auxin_get_testimonial_master_array', 10, 1 );
161
+
162
+
163
+ /**
164
+ * Testimonial Widget Markup
165
+ *
166
+ * The front-end output of this element is returned by the following function
167
+ *
168
+ * @param array $atts The array containing the parsed values from shortcode, it should be same as defined params above.
169
+ * @param string $shortcode_content The shorcode content
170
+ * @return string The output of element markup
171
+ */
172
+ function auxin_widget_testimonial_callback( $atts, $shortcode_content = null ){
173
+
174
+ // Defining default attributes
175
+ $default_atts = array(
176
+
177
+ 'template' => 'default',
178
+ 'title' => '',
179
+ 'subtitle' => '',
180
+ 'link' => '',
181
+ 'customer_img' => '',
182
+ 'content' => '',
183
+ 'extra_classes' => '', // custom css class names for this element
184
+ 'custom_el_id' => '', // custom id attribute for this element
185
+ 'base_class' => 'aux-widget-testimonial' // base class name for container
186
+
187
+ );
188
+
189
+ $result = auxin_get_widget_scafold( $atts, $default_atts );
190
+
191
+ extract( $result['parsed_atts'] );
192
+
193
+ $image = wp_get_attachment_image( $customer_img, 'thumbnail', "", array( "class" => "img-square" ) );
194
+ $content = empty( $content ) ? $shortcode_content : $content ;
195
+ $template = ' aux-testimonial-' . $template ;
196
+ $main_class = $base_class . $template;
197
+
198
+ ob_start();
199
+
200
+ // widget header ------------------------------
201
+ echo $result['widget_header'];
202
+ ?>
203
+ <div class=" <?php echo esc_attr( $main_class );?> ">
204
+ <?php if( ! empty( $content ) ) { ?>
205
+ <div class="aux-testimonial-content">
206
+ <div class="entry-content">
207
+ <?php $encoding_flag = defined('ENT_HTML401') ? ENT_HTML401 : ENT_QUOTES; ?>
208
+ <?php echo do_shortcode( html_entity_decode( $content, $encoding_flag, 'UTF-8') ); ?>
209
+ </div>
210
+ </div>
211
+ <?php } ?>
212
+ <div class="aux-testimonial-infobox">
213
+ <?php if ( !empty( $image ) ) { ?>
214
+ <div class="aux-testimonial-image">
215
+ <?php echo $image ;?>
216
+ </div>
217
+ <?php } ?>
218
+ <div class="aux-testimonial-info">
219
+ <?php if( ! empty( $title ) && empty( $link ) ) { ?>
220
+ <h4 class="col-title"><?php echo $title; ?></h4>
221
+ <?php } elseif( ! empty( $title ) && ! empty( $link ) ) {?>
222
+ <h4 class="col-title"><a href="<?php echo esc_url( $link ); ?>">
223
+ <?php echo $title; ?></a>
224
+ </h4>
225
+ <?php } if( ! empty( $subtitle ) ) { ?>
226
+ <h5 class="col-subtitle"><?php echo $subtitle; ?></h5>
227
+ <?php } ?>
228
+ </div>
229
+ </div>
230
+ </div>
231
+
232
+ <?php
233
+
234
+ // widget footer ------------------------------
235
+ echo $result['widget_footer'];
236
+ return ob_get_clean();
237
+
238
+ }
includes/general-functions.php CHANGED
@@ -1143,6 +1143,11 @@ function auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content = ''
1143
  if( ! isset( $default_atts['base'] ) ){
1144
  $default_atts['base'] = '';
1145
  }
 
 
 
 
 
1146
 
1147
  // Widget general info
1148
  $before_widget = $after_widget = '';
@@ -1186,7 +1191,7 @@ function auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content = ''
1186
 
1187
  // Enqueue wp-mediaelement
1188
  wp_enqueue_style ( 'wp-mediaelement' );
1189
- wp_enqueue_script( 'wp-mediaelement' );
1190
 
1191
  $ajax_args = $result['parsed_atts'];
1192
 
@@ -1447,6 +1452,32 @@ if ( ! function_exists( 'auxin_get_gmap_style' ) ) {
1447
  }
1448
 
1449
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1450
 
1451
 
1452
  /**
1143
  if( ! isset( $default_atts['base'] ) ){
1144
  $default_atts['base'] = '';
1145
  }
1146
+ // prevent nested query while placing a recent posts widget in the same post
1147
+ if( isset( $atts['exclude'] ) ){
1148
+ global $post;
1149
+ $atts['exclude'] .= ',' . $post->ID;
1150
+ }
1151
 
1152
  // Widget general info
1153
  $before_widget = $after_widget = '';
1191
 
1192
  // Enqueue wp-mediaelement
1193
  wp_enqueue_style ( 'wp-mediaelement' );
1194
+ wp_enqueue_script( 'wp-mediaelement' );
1195
 
1196
  $ajax_args = $result['parsed_atts'];
1197
 
1452
  }
1453
 
1454
 
1455
+ function auxin_get_header_button( $button_id_num = 1 ){
1456
+
1457
+ if( empty( $button_id_num ) || ! is_numeric( $button_id_num ) ){
1458
+ _doing_it_wrong( __FUNCTION__, "A numeric buttom id is required." );
1459
+ }
1460
+ if( ! auxin_get_option( "site_header_show_btn" . $button_id_num ) ){
1461
+ return '';
1462
+ }
1463
+
1464
+ return auxin_widget_button_callback(
1465
+ array(
1466
+ 'label' => auxin_get_option( 'site_header_btn'. $button_id_num .'_label' ),
1467
+ 'size' => auxin_get_option( 'site_header_btn'. $button_id_num .'_size', 'large' ),
1468
+ 'border' => auxin_get_option( 'site_header_btn'. $button_id_num .'_shape' ),
1469
+ 'style' => auxin_get_option( 'site_header_btn'. $button_id_num .'_style' ),
1470
+ 'dark' => auxin_get_option( 'site_header_btn'. $button_id_num .'_darken', 0 ),
1471
+ 'icon' => auxin_get_option( 'site_header_btn'. $button_id_num .'_icon' ),
1472
+ 'icon_align' => auxin_get_option( 'site_header_btn'. $button_id_num .'_icon_align' ),
1473
+ 'color_name' => auxin_get_option( 'site_header_btn'. $button_id_num .'_color_name' ),
1474
+ 'link' => auxin_get_option( 'site_header_btn'. $button_id_num .'_link', "#" ),
1475
+ 'target' => auxin_get_option( 'site_header_btn'. $button_id_num .'_target' ),
1476
+ 'uppercase' => '0',
1477
+ 'extra_classes' => 'aux-ac-btn'. $button_id_num
1478
+ )
1479
+ );
1480
+ }
1481
 
1482
 
1483
  /**
includes/general-hooks.php CHANGED
@@ -548,6 +548,556 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
548
 
549
 
550
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
551
  $fields_sections_list['fields'][] = array(
552
  'title' => __('Footer Brand Image', 'auxin-elements'),
553
  'description' => __('This image appears as site brand image on footer section.', 'auxin-elements'),
@@ -1716,3 +2266,62 @@ function auxin_theme_setup_wizard() {
1716
  add_action( 'auxin_admin_loaded', 'auxin_theme_setup_wizard' );
1717
 
1718
  /*-----------------------------------------------------------------------------------*/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
548
 
549
 
550
 
551
+
552
+
553
+
554
+
555
+
556
+
557
+
558
+
559
+
560
+
561
+ // Sub section - Button 1 in header -------------------------------
562
+
563
+ $fields_sections_list['sections'][] = array(
564
+ 'id' => 'header-section-action-button1',
565
+ 'parent' => 'header-section', // section parent's id
566
+ 'title' => __( 'Header Button 1', THEME_DOMAIN ),
567
+ 'description' => __( 'Setting for Header Button 1', THEME_DOMAIN )
568
+ );
569
+
570
+ $fields_sections_list['fields'][] = array(
571
+ 'title' => __('Display Button 1 Header?','auxin-elements' ),
572
+ 'description' => __('Enable this option to display a button in header.','auxin-elements' ),
573
+ 'section' => 'header-section-action-button1',
574
+ 'id' => 'site_header_show_btn1',
575
+ 'type' => 'switch',
576
+ 'default' => '0',
577
+ 'partial' => array(
578
+ 'selector' => '.aux-btn1-box',
579
+ 'container_inclusive' => true,
580
+ 'render_callback' => function(){ echo auxin_get_header_button(1); }
581
+ )
582
+ );
583
+
584
+ $fields_sections_list['fields'][] = array(
585
+ 'title' => __('Button label','auxin-elements' ),
586
+ 'description' => __('Specifies the label of button.','auxin-elements' ),
587
+ 'section' => 'header-section-action-button1',
588
+ 'id' => 'site_header_btn1_label',
589
+ 'type' => 'text',
590
+ 'default' => __('Button', 'auxin-elements'),
591
+ 'dependency' => array(
592
+ array(
593
+ 'id' => 'site_header_show_btn1',
594
+ 'value' => '1',
595
+ 'operator'=> '=='
596
+ )
597
+ ),
598
+ 'transport' => 'postMessage',
599
+ 'post_js' => '$(".aux-btn1-box .aux-ac-btn1").html( to );'
600
+ );
601
+
602
+ $fields_sections_list['fields'][] = array(
603
+ 'title' => __('Button size','auxin-elements' ),
604
+ 'description' => '',
605
+ 'section' => 'header-section-action-button1',
606
+ 'id' => 'site_header_btn1_size',
607
+ 'type' => 'select',
608
+ 'choices' => array(
609
+ 'exlarge' => __('Exlarge', 'auxin-elements' ),
610
+ 'large' => __('Large' , 'auxin-elements' ),
611
+ 'medium' => __('Medium' , 'auxin-elements' ),
612
+ 'small' => __('Small' , 'auxin-elements' ),
613
+ 'tiny' => __('Tiny' , 'auxin-elements' )
614
+ ),
615
+ 'default' => 'large',
616
+ 'dependency' => array(
617
+ array(
618
+ 'id' => 'site_header_show_btn1',
619
+ 'value' => '1',
620
+ 'operator'=> '=='
621
+ )
622
+ ),
623
+ 'transport' => 'postMessage',
624
+ 'post_js' => '$(".aux-btn1-box .aux-ac-btn1").removeClass( "aux-exlarge aux-large aux-medium aux-small aux-tiny" ).addClass( "aux-" + to );'
625
+ );
626
+
627
+ $fields_sections_list['fields'][] = array(
628
+ 'title' => __('Button shape','auxin-elements' ),
629
+ 'description' => '',
630
+ 'section' => 'header-section-action-button1',
631
+ 'id' => 'site_header_btn1_shape',
632
+ 'type' => 'radio-image',
633
+ 'choices' => array(
634
+ '' => array(
635
+ 'label' => __('Sharp', 'auxin-elements' ),
636
+ 'image' => AUXIN_URL . 'images/visual-select/button-normal.svg'
637
+ ),
638
+ 'round' => array(
639
+ 'label' => __('Round', 'auxin-elements' ),
640
+ 'image' => AUXIN_URL . 'images/visual-select/button-curved.svg'
641
+ ),
642
+ 'curve' => array(
643
+ 'label' => __('Curve', 'auxin-elements' ),
644
+ 'image' => AUXIN_URL . 'images/visual-select/button-rounded.svg'
645
+ )
646
+ ),
647
+ 'default' => 'curve',
648
+ 'dependency' => array(
649
+ array(
650
+ 'id' => 'site_header_show_btn1',
651
+ 'value' => '1',
652
+ 'operator'=> '=='
653
+ )
654
+ ),
655
+ 'transport' => 'postMessage',
656
+ 'post_js' => '$(".aux-btn1-box .aux-ac-btn1").removeClass( "aux-round aux-curve" ).addClass( "aux-" + to );'
657
+ );
658
+
659
+ $fields_sections_list['fields'][] = array(
660
+ 'title' => __('Button style','auxin-elements' ),
661
+ 'description' => '',
662
+ 'section' => 'header-section-action-button1',
663
+ 'id' => 'site_header_btn1_style',
664
+ 'type' => 'radio-image',
665
+ 'choices' => array(
666
+ '' => array(
667
+ 'label' => __('Normal', 'auxin-elements' ),
668
+ 'image' => AUXIN_URL . 'images/visual-select/button-normal.svg'
669
+ ),
670
+ '3d' => array(
671
+ 'label' => __('3D', 'auxin-elements' ),
672
+ 'image' => AUXIN_URL . 'images/visual-select/button-3d.svg'
673
+ ),
674
+ 'outline' => array(
675
+ 'label' => __('Outline', 'auxin-elements' ),
676
+ 'image' => AUXIN_URL . 'images/visual-select/button-outline.svg'
677
+ )
678
+ ),
679
+ 'default' => '',
680
+ 'dependency' => array(
681
+ array(
682
+ 'id' => 'site_header_show_btn1',
683
+ 'value' => '1',
684
+ 'operator'=> '=='
685
+ )
686
+ ),
687
+ 'transport' => 'postMessage',
688
+ 'post_js' => '$(".aux-btn1-box .aux-ac-btn1").removeClass( "aux-3d aux-outline" ).addClass( "aux-" + to );'
689
+ );
690
+
691
+ $fields_sections_list['fields'][] = array(
692
+ 'title' => __('Darken the label','auxin-elements' ),
693
+ 'description' => __('Darken label of button.','auxin-elements' ),
694
+ 'section' => 'header-section-action-button1',
695
+ 'id' => 'site_header_btn1_darken',
696
+ 'type' => 'switch',
697
+ 'default' => '0',
698
+ 'dependency' => array(
699
+ array(
700
+ 'id' => 'site_header_show_btn1',
701
+ 'value' => '1',
702
+ 'operator'=> '=='
703
+ )
704
+ ),
705
+ 'transport' => 'postMessage',
706
+ 'post_js' => '$(".aux-btn1-box .aux-ac-btn1").toggleClass( "aux-dark-text", to );'
707
+ );
708
+
709
+ $fields_sections_list['fields'][] = array(
710
+ 'title' => __('Icon for button','auxin-elements' ),
711
+ 'description' => '',
712
+ 'section' => 'header-section-action-button1',
713
+ 'id' => 'site_header_btn1_icon',
714
+ 'type' => 'icon',
715
+ 'default' => '',
716
+ 'dependency' => array(
717
+ array(
718
+ 'id' => 'site_header_show_btn1',
719
+ 'value' => '1',
720
+ 'operator'=> '=='
721
+ )
722
+ ),
723
+ 'transport' => 'refresh'
724
+ );
725
+
726
+ $fields_sections_list['fields'][] = array(
727
+ 'title' => __('Icon alignment','auxin-elements' ),
728
+ 'description' => '',
729
+ 'section' => 'header-section-action-button1',
730
+ 'id' => 'site_header_btn1_icon_align',
731
+ 'type' => 'radio-image',
732
+ 'choices' => array(
733
+ 'default' => array(
734
+ 'label' => __('Default' , 'auxin-elements'),
735
+ 'image' => AUXELS_ADMIN_URL . '/assets/images/button.png'
736
+ ),
737
+ 'left' => array(
738
+ 'label' => __('Left' , 'auxin-elements'),
739
+ 'video_src' => AUXELS_ADMIN_URL . '/assets/images/preview/Button2.webm webm'
740
+ ),
741
+ 'right' => array(
742
+ 'label' => __('Right' , 'auxin-elements'),
743
+ 'video_src' => AUXELS_ADMIN_URL . '/assets/images/preview/Button1.webm webm'
744
+ ),
745
+ 'over' => array(
746
+ 'label' => __('Over', 'auxin-elements'),
747
+ 'video_src' => AUXELS_ADMIN_URL . '/assets/images/preview/Button5.webm webm'
748
+ ),
749
+ 'left-animate' => array(
750
+ 'label' => __('Animate from Left', 'auxin-elements'),
751
+ 'video_src' => AUXELS_ADMIN_URL . '/assets/images/preview/Button4.webm webm'
752
+ ),
753
+ 'right-animate' => array(
754
+ 'label' => __('Animate from Righ', 'auxin-elements'),
755
+ 'video_src' => AUXELS_ADMIN_URL . '/assets/images/preview/Button3.webm webm'
756
+ )
757
+ ),
758
+ 'default' => 'default',
759
+ 'dependency' => array(
760
+ array(
761
+ 'id' => 'site_header_show_btn1',
762
+ 'value' => '1',
763
+ 'operator'=> '=='
764
+ )
765
+ ),
766
+ 'transport' => 'postMessage',
767
+ 'post_js' => '$(".aux-btn1-box .aux-ac-btn1").alterClass( "aux-icon-*", "aux-icon-" + to );'
768
+ );
769
+
770
+ $fields_sections_list['fields'][] = array(
771
+ 'title' => __('Color of button','auxin-elements' ),
772
+ 'description' => '',
773
+ 'section' => 'header-section-action-button1',
774
+ 'id' => 'site_header_btn1_color_name',
775
+ 'type' => 'radio-image',
776
+ 'choices' => auxin_get_famous_colors_list(),
777
+ 'default' => 'ball-blue',
778
+ 'dependency' => array(
779
+ array(
780
+ 'id' => 'site_header_show_btn1',
781
+ 'value' => '1',
782
+ 'operator'=> '=='
783
+ )
784
+ ),
785
+ 'transport' => 'refresh'
786
+ );
787
+
788
+ $fields_sections_list['fields'][] = array(
789
+ 'title' => __('Button Link','auxin-elements' ),
790
+ 'description' => '',
791
+ 'section' => 'header-section-action-button1',
792
+ 'id' => 'site_header_btn1_link',
793
+ 'type' => 'text',
794
+ 'default' => '#',
795
+ 'dependency' => array(
796
+ array(
797
+ 'id' => 'site_header_show_btn1',
798
+ 'value' => '1',
799
+ 'operator'=> '=='
800
+ )
801
+ ),
802
+ 'transport' => 'postMessage',
803
+ 'post_js' => '$(".aux-btn1-box .aux-ac-btn1").prop( "href", to );'
804
+ );
805
+
806
+ $fields_sections_list['fields'][] = array(
807
+ 'title' => __('Open link in','auxin-elements' ),
808
+ 'description' => '',
809
+ 'section' => 'header-section-action-button1',
810
+ 'id' => 'site_header_btn1_target',
811
+ 'type' => 'select',
812
+ 'choices' => array(
813
+ '_self' => __('Current page' , 'auxin-elements' ),
814
+ '_blank' => __('New page', 'auxin-elements' )
815
+ ),
816
+ 'default' => '_self',
817
+ 'dependency' => array(
818
+ array(
819
+ 'id' => 'site_header_show_btn1',
820
+ 'value' => '1',
821
+ 'operator'=> '=='
822
+ )
823
+ ),
824
+ 'transport' => 'postMessage',
825
+ 'post_js' => '$(".aux-btn1-box .aux-ac-btn1").prop( "target", to );'
826
+ );
827
+
828
+
829
+
830
+ // Sub section - Button 2 in header -------------------------------
831
+
832
+ $fields_sections_list['sections'][] = array(
833
+ 'id' => 'header-section-action-button2',
834
+ 'parent' => 'header-section', // section parent's id
835
+ 'title' => __( 'Header Button 2', THEME_DOMAIN ),
836
+ 'description' => __( 'Setting for Header Button 2', THEME_DOMAIN )
837
+ );
838
+
839
+ $fields_sections_list['fields'][] = array(
840
+ 'title' => __('Display Button 2 Header?','auxin-elements' ),
841
+ 'description' => __('Enable this option to display a button in header.','auxin-elements' ),
842
+ 'section' => 'header-section-action-button2',
843
+ 'id' => 'site_header_show_btn2',
844
+ 'type' => 'switch',
845
+ 'default' => 0,
846
+ 'partial' => array(
847
+ 'selector' => '.aux-btn2-box',
848
+ 'container_inclusive' => true,
849
+ 'render_callback' => function(){ echo auxin_get_header_button(2); }
850
+ )
851
+ );
852
+
853
+ $fields_sections_list['fields'][] = array(
854
+ 'title' => __('Button label','auxin-elements' ),
855
+ 'description' => __('Specifies the label of button.','auxin-elements' ),
856
+ 'section' => 'header-section-action-button2',
857
+ 'id' => 'site_header_btn2_label',
858
+ 'type' => 'text',
859
+ 'default' => __('Button', 'auxin-elements'),
860
+ 'dependency' => array(
861
+ array(
862
+ 'id' => 'site_header_show_btn2',
863
+ 'value' => 1,
864
+ 'operator'=> '=='
865
+ )
866
+ ),
867
+ 'transport' => 'postMessage',
868
+ 'post_js' => '$(".aux-btn2-box .aux-ac-btn2").html( to );'
869
+ );
870
+
871
+ $fields_sections_list['fields'][] = array(
872
+ 'title' => __('Button size','auxin-elements' ),
873
+ 'description' => '',
874
+ 'section' => 'header-section-action-button2',
875
+ 'id' => 'site_header_btn2_size',
876
+ 'type' => 'select',
877
+ 'choices' => array(
878
+ 'exlarge' => __('Exlarge', 'auxin-elements' ),
879
+ 'large' => __('Large' , 'auxin-elements' ),
880
+ 'medium' => __('Medium' , 'auxin-elements' ),
881
+ 'small' => __('Small' , 'auxin-elements' ),
882
+ 'tiny' => __('Tiny' , 'auxin-elements' )
883
+ ),
884
+ 'default' => 'large',
885
+ 'dependency' => array(
886
+ array(
887
+ 'id' => 'site_header_show_btn2',
888
+ 'value' => 1,
889
+ 'operator'=> '=='
890
+ )
891
+ ),
892
+ 'transport' => 'postMessage',
893
+ 'post_js' => '$(".aux-btn2-box .aux-ac-btn2").removeClass( "aux-exlarge aux-large aux-medium aux-small aux-tiny" ).addClass( "aux-" + to );'
894
+ );
895
+
896
+ $fields_sections_list['fields'][] = array(
897
+ 'title' => __('Button shape','auxin-elements' ),
898
+ 'description' => '',
899
+ 'section' => 'header-section-action-button2',
900
+ 'id' => 'site_header_btn2_shape',
901
+ 'type' => 'radio-image',
902
+ 'choices' => array(
903
+ '' => array(
904
+ 'label' => __('Sharp', 'auxin-elements' ),
905
+ 'image' => AUXIN_URL . 'images/visual-select/button-normal.svg'
906
+ ),
907
+ 'round' => array(
908
+ 'label' => __('Round', 'auxin-elements' ),
909
+ 'image' => AUXIN_URL . 'images/visual-select/button-curved.svg'
910
+ ),
911
+ 'curve' => array(
912
+ 'label' => __('Curve', 'auxin-elements' ),
913
+ 'image' => AUXIN_URL . 'images/visual-select/button-rounded.svg'
914
+ )
915
+ ),
916
+ 'default' => 'curve',
917
+ 'dependency' => array(
918
+ array(
919
+ 'id' => 'site_header_show_btn2',
920
+ 'value' => 1,
921
+ 'operator'=> '=='
922
+ )
923
+ ),
924
+ 'transport' => 'postMessage',
925
+ 'post_js' => '$(".aux-btn2-box .aux-ac-btn2").removeClass( "aux-round aux-curve" ).addClass( "aux-" + to );'
926
+ );
927
+
928
+ $fields_sections_list['fields'][] = array(
929
+ 'title' => __('Button style','auxin-elements' ),
930
+ 'description' => '',
931
+ 'section' => 'header-section-action-button2',
932
+ 'id' => 'site_header_btn2_style',
933
+ 'type' => 'radio-image',
934
+ 'choices' => array(
935
+ '' => array(
936
+ 'label' => __('Normal', 'auxin-elements' ),
937
+ 'image' => AUXIN_URL . 'images/visual-select/button-normal.svg'
938
+ ),
939
+ '3d' => array(
940
+ 'label' => __('3D', 'auxin-elements' ),
941
+ 'image' => AUXIN_URL . 'images/visual-select/button-3d.svg'
942
+ ),
943
+ 'outline' => array(
944
+ 'label' => __('Outline', 'auxin-elements' ),
945
+ 'image' => AUXIN_URL . 'images/visual-select/button-outline.svg'
946
+ )
947
+ ),
948
+ 'default' => 'outline',
949
+ 'dependency' => array(
950
+ array(
951
+ 'id' => 'site_header_show_btn2',
952
+ 'value' => 1,
953
+ 'operator'=> '=='
954
+ )
955
+ ),
956
+ 'transport' => 'postMessage',
957
+ 'post_js' => '$(".aux-btn2-box .aux-ac-btn2").removeClass( "aux-3d aux-outline" ).addClass( "aux-" + to );'
958
+ );
959
+
960
+ $fields_sections_list['fields'][] = array(
961
+ 'title' => __('Darken the label','auxin-elements' ),
962
+ 'description' => __('Darken label of button.','auxin-elements' ),
963
+ 'section' => 'header-section-action-button2',
964
+ 'id' => 'site_header_btn2_darken',
965
+ 'type' => 'switch',
966
+ 'default' => '0',
967
+ 'dependency' => array(
968
+ array(
969
+ 'id' => 'site_header_show_btn2',
970
+ 'value' => 1,
971
+ 'operator'=> '=='
972
+ )
973
+ ),
974
+ 'transport' => 'postMessage',
975
+ 'post_js' => '$(".aux-btn2-box .aux-ac-btn2").toggleClass( "aux-dark-text", to );'
976
+ );
977
+
978
+ $fields_sections_list['fields'][] = array(
979
+ 'title' => __('Icon for button','auxin-elements' ),
980
+ 'description' => '',
981
+ 'section' => 'header-section-action-button2',
982
+ 'id' => 'site_header_btn2_icon',
983
+ 'type' => 'icon',
984
+ 'default' => '',
985
+ 'dependency' => array(
986
+ array(
987
+ 'id' => 'site_header_show_btn2',
988
+ 'value' => 1,
989
+ 'operator'=> '=='
990
+ )
991
+ ),
992
+ 'transport' => 'refresh'
993
+ );
994
+
995
+ $fields_sections_list['fields'][] = array(
996
+ 'title' => __('Icon alignment','auxin-elements' ),
997
+ 'description' => '',
998
+ 'section' => 'header-section-action-button2',
999
+ 'id' => 'site_header_btn2_icon_align',
1000
+ 'type' => 'radio-image',
1001
+ 'choices' => array(
1002
+ 'default' => array(
1003
+ 'label' => __('Default' , 'auxin-elements'),
1004
+ 'image' => AUXELS_ADMIN_URL . '/assets/images/button.png'
1005
+ ),
1006
+ 'left' => array(
1007
+ 'label' => __('Left' , 'auxin-elements'),
1008
+ 'video_src' => AUXELS_ADMIN_URL . '/assets/images/preview/Button2.webm webm'
1009
+ ),
1010
+ 'right' => array(
1011
+ 'label' => __('Right' , 'auxin-elements'),
1012
+ 'video_src' => AUXELS_ADMIN_URL . '/assets/images/preview/Button2.webm webm'
1013
+ ),
1014
+ 'over' => array(
1015
+ 'label' => __('Over', 'auxin-elements'),
1016
+ 'video_src' => AUXELS_ADMIN_URL . '/assets/images/preview/Button5.webm webm'
1017
+ ),
1018
+ 'left-animate' => array(
1019
+ 'label' => __('Animate from Left', 'auxin-elements'),
1020
+ 'video_src' => AUXELS_ADMIN_URL . '/assets/images/preview/Button4.webm webm'
1021
+ ),
1022
+ 'right-animate' => array(
1023
+ 'label' => __('Animate from Righ', 'auxin-elements'),
1024
+ 'video_src' => AUXELS_ADMIN_URL . '/assets/images/preview/Button3.webm webm'
1025
+ )
1026
+ ),
1027
+ 'default' => 'default',
1028
+ 'dependency' => array(
1029
+ array(
1030
+ 'id' => 'site_header_show_btn2',
1031
+ 'value' => 1,
1032
+ 'operator'=> '=='
1033
+ )
1034
+ ),
1035
+ 'transport' => 'postMessage',
1036
+ 'post_js' => '$(".aux-btn2-box .aux-ac-btn2").alterClass( "aux-icon-*", "aux-icon-" + to );'
1037
+ );
1038
+
1039
+ $fields_sections_list['fields'][] = array(
1040
+ 'title' => __('Color of button','auxin-elements' ),
1041
+ 'description' => '',
1042
+ 'section' => 'header-section-action-button2',
1043
+ 'id' => 'site_header_btn2_color_name',
1044
+ 'type' => 'radio-image',
1045
+ 'choices' => auxin_get_famous_colors_list(),
1046
+ 'default' => 'emerald',
1047
+ 'dependency' => array(
1048
+ array(
1049
+ 'id' => 'site_header_show_btn2',
1050
+ 'value' => 1,
1051
+ 'operator'=> '=='
1052
+ )
1053
+ ),
1054
+ 'transport' => 'refresh'
1055
+ );
1056
+
1057
+ $fields_sections_list['fields'][] = array(
1058
+ 'title' => __('Button Link','auxin-elements' ),
1059
+ 'description' => '',
1060
+ 'section' => 'header-section-action-button2',
1061
+ 'id' => 'site_header_btn2_link',
1062
+ 'type' => 'text',
1063
+ 'default' => '',
1064
+ 'dependency' => array(
1065
+ array(
1066
+ 'id' => 'site_header_show_btn2',
1067
+ 'value' => 1,
1068
+ 'operator'=> '=='
1069
+ )
1070
+ ),
1071
+ 'transport' => 'postMessage',
1072
+ 'post_js' => '$(".aux-btn2-box .aux-ac-btn2").prop( "href", to );'
1073
+ );
1074
+
1075
+ $fields_sections_list['fields'][] = array(
1076
+ 'title' => __('Open link in','auxin-elements' ),
1077
+ 'description' => '',
1078
+ 'section' => 'header-section-action-button2',
1079
+ 'id' => 'site_header_btn2_target',
1080
+ 'type' => 'select',
1081
+ 'choices' => array(
1082
+ '_self' => __('Current page' , 'auxin-elements' ),
1083
+ '_blank' => __('New page', 'auxin-elements' )
1084
+ ),
1085
+ 'default' => '_self',
1086
+ 'dependency' => array(
1087
+ array(
1088
+ 'id' => 'site_header_show_btn2',
1089
+ 'value' => 1,
1090
+ 'operator'=> '=='
1091
+ )
1092
+ ),
1093
+ 'transport' => 'postMessage',
1094
+ 'post_js' => '$(".aux-btn2-box .aux-ac-btn2").prop( "target", to );'
1095
+ );
1096
+
1097
+
1098
+ // Sub section - footer -------------------------------
1099
+
1100
+
1101
  $fields_sections_list['fields'][] = array(
1102
  'title' => __('Footer Brand Image', 'auxin-elements'),
1103
  'description' => __('This image appears as site brand image on footer section.', 'auxin-elements'),
2266
  add_action( 'auxin_admin_loaded', 'auxin_theme_setup_wizard' );
2267
 
2268
  /*-----------------------------------------------------------------------------------*/
2269
+ /* Add new functionality in wp default playlist
2270
+ /*-----------------------------------------------------------------------------------*/
2271
+
2272
+ function auxin_underscore_playlist_templates(){
2273
+ ?>
2274
+ <script type="text/html" id="tmpl-wp-playlist-current-item">
2275
+ <# if ( data.image ) { #>
2276
+ <img src="{{ data.thumb.src }}" alt="" />
2277
+ <# } #>
2278
+ <div class="wp-playlist-caption">
2279
+ <span class="wp-playlist-item-meta wp-playlist-item-title"><?php
2280
+ /* translators: playlist item title */
2281
+ printf( _x( '&#8220;%s&#8221;', 'playlist item title' ), '{{ data.title }}' );
2282
+ ?></span>
2283
+ <# if ( data.meta.album ) { #><span class="wp-playlist-item-meta wp-playlist-item-album">{{ data.meta.album }}</span><# } #>
2284
+ <# if ( data.meta.artist ) { #><span class="wp-playlist-item-meta wp-playlist-item-artist">{{ data.meta.artist }}</span><# } #>
2285
+ </div>
2286
+ </script>
2287
+ <script type="text/html" id="tmpl-wp-playlist-item">
2288
+ <div class="wp-playlist-item">
2289
+ <#
2290
+ var isThumbnailExist = data.thumb.src.indexOf("wp-includes/images/media") > 0 ? 'aux-has-no-thubmnail' : '';
2291
+ #>
2292
+ <a class="wp-playlist-caption {{ isThumbnailExist }}" href="{{ data.src }}">
2293
+ <# if ( data.image ) { #>
2294
+ <img class="wp-playlist-item-artist" src="{{ data.thumb.src }}" alt="{{ data.title }}" />
2295
+ <# } #>
2296
+ </a>
2297
+ <div class="wp-playlist-item-title" >
2298
+ <a href="{{ data.src }}">
2299
+ <h4>
2300
+ <# if ( data.caption ) { #>
2301
+ <?php
2302
+ /* translators: playlist item title */
2303
+ printf( _x( '%s', 'playlist item title' ), '{{{ data.caption }}}' );
2304
+ ?>
2305
+ <# } else { #>
2306
+ <?php
2307
+ /* translators: playlist item title */
2308
+ printf( _x( '%s', 'playlist item title' ), '{{{ data.title }}}' );
2309
+ ?>
2310
+ <# } #>
2311
+ </h4>
2312
+ </a>
2313
+ </div>
2314
+ </div>
2315
+ </script>
2316
+ <?php
2317
+ }
2318
+
2319
+ function auxin_modify_wp_playlist_scripts(){
2320
+ remove_action ( 'wp_footer' , 'wp_underscore_playlist_templates' , 0 );
2321
+ remove_action ( 'admin_footer' , 'wp_underscore_playlist_templates' , 0 );
2322
+ add_action ( 'wp_footer' , 'auxin_underscore_playlist_templates' , 0 );
2323
+ add_action ( 'admin_footer' , 'auxin_underscore_playlist_templates' , 0 );
2324
+ }
2325
+ add_action( 'wp_playlist_scripts', 'auxin_modify_wp_playlist_scripts', 15 );
2326
+
2327
+ /*-----------------------------------------------------------------------------------*/
includes/index.php CHANGED
@@ -29,7 +29,7 @@ if( auxin_is_plugin_active( 'so-widgets-bundle/so-widgets-bundle.php' ) ) {
29
  if( defined( 'WPB_VC_VERSION' ) || auxin_is_plugin_active( 'js_composer/js_composer.php' ) ){
30
 
31
  }
32
- include_once( 'elements/testomonial.php' );
33
  include_once( 'elements/staff.php' );
34
  include_once( 'elements/text.php' );
35
  include_once( 'elements/recent-posts-tiles.php' );
29
  if( defined( 'WPB_VC_VERSION' ) || auxin_is_plugin_active( 'js_composer/js_composer.php' ) ){
30
 
31
  }
32
+ include_once( 'elements/testimonial.php' );
33
  include_once( 'elements/staff.php' );
34
  include_once( 'elements/text.php' );
35
  include_once( 'elements/recent-posts-tiles.php' );
public/class-auxels.php CHANGED
@@ -138,6 +138,12 @@ class AUXELS {
138
  */
139
  public function init(){
140
 
 
 
 
 
 
 
141
  // @deprecate version 5.0
142
  global $wp_version;
143
  if ( version_compare( $wp_version, '4.6', '<' ) ) {
138
  */
139
  public function init(){
140
 
141
+ if( AUXELS_VERSION !== get_transient( 'auxin_' . AUXELS_SLUG . '_version' ) ){
142
+ set_transient( 'auxin_' . AUXELS_SLUG . '_version', AUXELS_VERSION, MONTH_IN_SECONDS );
143
+
144
+ do_action( 'auxin_plugin_updated', AUXELS_SLUG, AUXELS_VERSION, AUXELS_BASE_NAME );
145
+ }
146
+
147
  // @deprecate version 5.0
148
  global $wp_version;
149
  if ( version_compare( $wp_version, '4.6', '<' ) ) {