Shortcodes and extra features for Phlox theme - Version 1.0.9

Version Description

Download this release

Release Info

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

Code changes from version 1.0.6 to 1.0.9

README.txt CHANGED
@@ -6,7 +6,7 @@ License URI: http://www.gnu.org/licenses/gpl.html
6
  Tags: banner SEO, shortcode, page-builder, siteorigin, auxin, framework, widget, element, phlox, averta, fullwidth, masonry, timeline
7
  Requires at least: 4.3
8
  Tested up to: 4.6.1
9
- Stable tag: 1.0.6
10
  License: GPLv3
11
  License URI: http://www.gnu.org/licenses/gpl.html
12
 
@@ -140,6 +140,9 @@ Bugs can be reported in our [support forums](http://wordpress.org/tags/auxin-ele
140
 
141
  == Changelog ==
142
 
 
 
 
143
  = Version 1.0.6 / (19.9.2016) =
144
  - [New]: New features added
145
 
@@ -153,5 +156,5 @@ Bugs can be reported in our [support forums](http://wordpress.org/tags/auxin-ele
153
 
154
  == Upgrade Notice ==
155
 
156
- = 1.0.6 =
157
- - [Update]: New features added
6
  Tags: banner SEO, shortcode, page-builder, siteorigin, auxin, framework, widget, element, phlox, averta, fullwidth, masonry, timeline
7
  Requires at least: 4.3
8
  Tested up to: 4.6.1
9
+ Stable tag: 1.0.9
10
  License: GPLv3
11
  License URI: http://www.gnu.org/licenses/gpl.html
12
 
140
 
141
  == Changelog ==
142
 
143
+ = Version 1.0.9 / (6.10.2016) =
144
+ - [New]: New shortcodes and widgets added
145
+
146
  = Version 1.0.6 / (19.9.2016) =
147
  - [New]: New features added
148
 
156
 
157
  == Upgrade Notice ==
158
 
159
+ = 1.0.9 =
160
+ - [New]: New shortcodes and widgets added
admin/assets/js/tinymce/plugins/auxin-btns.js CHANGED
@@ -312,6 +312,29 @@
312
 
313
 
314
  ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
315
  }
316
  ]
317
 
312
 
313
 
314
  ]
315
+ },
316
+ {
317
+ text : 'Layout',
318
+ menu : [
319
+ {
320
+ text : '2 Columns',
321
+ onclick : function() {
322
+ editor.insertContent("[aux_row columns=\"2\"]<br />[aux_col]First column content. Insert your content here[/aux_col]<br />[aux_col]Second column content. Insert your content here[/aux_col]<br />[/aux_row]");
323
+ }
324
+ },
325
+ {
326
+ text : '3 Columns',
327
+ onclick : function() {
328
+ editor.insertContent("[aux_row columns=\"3\"]<br />[aux_col]First column content. Insert your content here[/aux_col]<br />[aux_col]Second column content. Insert your content here[/aux_col]<br />[aux_col]Third column content. Insert your content here[/aux_col]<br />[/aux_row]");
329
+ }
330
+ },
331
+ {
332
+ text : '4 Columns',
333
+ onclick : function() {
334
+ editor.insertContent("[aux_row columns=\"4\"]<br />[aux_col]First column content. Insert your content here[/aux_col]<br />[aux_col]Second column content. Insert your content here[/aux_col]<br />[aux_col]Third column content. Insert your content here[/aux_col]<br />[aux_col]Forth column content. Insert your content here[/aux_col]<br />[/aux_row]");
335
+ }
336
+ }
337
+ ]
338
  }
339
  ]
340
 
admin/includes/compatibility/siteorigin/fields/iconpicker.class.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class Auxin_SiteOrigin_Field_Iconpicker
5
+ */
6
+ class Auxin_SiteOrigin_Field_Iconpicker extends SiteOrigin_Widget_Field_Base {
7
+
8
+ protected function render_field( $value, $instance ) {
9
+
10
+ $font_icons = Auxin()->font_icons->get_icons_list('fontastic');
11
+ $output = '<div class="aux-element-field aux-iconpicker">';
12
+ $output .= sprintf( '<select name="%1$s" id="%1$s" class="aux-fonticonpicker aux-select" >', $this->element_name );
13
+ $output .= '<option value="">' . __('Choose ..', THEME_DOMAIN) . '</option>';
14
+
15
+ if( is_array( $font_icons ) ){
16
+ foreach ( $font_icons as $icon ) {
17
+ $icon_id = trim( $icon->classname, '.' );
18
+ $output .= '<option value="'. $icon_id .'" '. selected( $value, $icon_id, false ) .' >'. $icon->name . '</option>';
19
+ }
20
+ }
21
+
22
+ $output .= '</select>';
23
+ $output .= '</div>';
24
+
25
+ echo $output;
26
+ }
27
+
28
+ protected function sanitize_field_input( $value, $instance ) {
29
+ return $value;
30
+ }
31
+ }
admin/includes/compatibility/siteorigin/fields/visualselect.class.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class Auxin_SiteOrigin_Field_Visualselect
5
+ */
6
+ class Auxin_SiteOrigin_Field_Visualselect extends SiteOrigin_Widget_Field_Base {
7
+
8
+ protected $options;
9
+
10
+ protected function render_field( $value, $instance ) {
11
+
12
+ $output = '<div class="aux-element-field aux-visual-selector">';
13
+ $output .= '<select class="meta-select visual-select-wrapper" name="' . $this->element_name . '" id="' . $this->element_id . '" value="' . $value . '" >';
14
+
15
+ foreach ( $this->options as $id => $option_info ) {
16
+ $active_attr = ( $value == $id ) ? ' selected ' : "";
17
+ $data_class = isset( $option_info['css_class'] ) && !empty( $option_info['css_class'] ) ? 'data-class="'. $option_info['css_class'].'"' : '';
18
+ $data_symbol = empty( $data_class ) && isset( $option_info['image'] ) && ! empty( $option_info['image'] ) ? 'data-symbol="'. $option_info['image'].'"' : '';
19
+ $output .= sprintf( '<option value="%s" %s %s %s>%s</option>', $id, $active_attr, $data_symbol, $data_class, $option_info['label'] );
20
+ }
21
+
22
+ $output .= '</select></div>';
23
+
24
+ echo $output;
25
+ }
26
+
27
+ protected function sanitize_field_input( $value, $instance ) {
28
+ return $value;
29
+ }
30
+ }
auxin-elements.php CHANGED
@@ -12,13 +12,13 @@
12
  * Plugin Name: Auxin 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.0.6
16
  * Author: averta
17
  * Author URI: http://averta.net
18
  * Text Domain: auxin-elements
19
  * License URI: LICENSE.txt
20
  * Domain Path: /languages
21
- * Tested up to: 4.6.0
22
  */
23
 
24
  // If this file is called directly, abort.
12
  * Plugin Name: Auxin 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.0.9
16
  * Author: averta
17
  * Author URI: http://averta.net
18
  * Text Domain: auxin-elements
19
  * License URI: LICENSE.txt
20
  * Domain Path: /languages
21
+ * Tested up to: 4.6.1
22
  */
23
 
24
  // If this file is called directly, abort.
includes/classes/class-auxin-siteorigin-widget.php CHANGED
@@ -91,7 +91,7 @@ class Auxin_SiteOrigin_Widget extends SiteOrigin_Widget {
91
  switch ( $field['type'] ) {
92
  case 'iconpicker':
93
  case 'aux_iconpicker':
94
- // TODO: add icon picker to so builder
95
  break;
96
  case 'textarea_html':
97
  $so_field['type'] = 'tinymce';
@@ -126,7 +126,8 @@ class Auxin_SiteOrigin_Widget extends SiteOrigin_Widget {
126
  break;
127
 
128
  case 'aux_visual_select':
129
- // TODO: add visual select field to so
 
130
  break;
131
 
132
  case 'checkbox':
@@ -213,6 +214,7 @@ class Auxin_SiteOrigin_Widget extends SiteOrigin_Widget {
213
  */
214
  function get_widget_html( $template_html, $instance ) {
215
 
 
216
  // make sure to pass same class name for wrapper to widget too
217
  if( isset( $this->widget_info['base_class'] ) ){
218
  $args['base_class'] = $this->widget_info['base_class'];
91
  switch ( $field['type'] ) {
92
  case 'iconpicker':
93
  case 'aux_iconpicker':
94
+ $so_field['type'] = 'iconpicker';
95
  break;
96
  case 'textarea_html':
97
  $so_field['type'] = 'tinymce';
126
  break;
127
 
128
  case 'aux_visual_select':
129
+ $so_field['type'] = 'visualselect';
130
+ $so_field['options'] = $field['choices'];
131
  break;
132
 
133
  case 'checkbox':
214
  */
215
  function get_widget_html( $template_html, $instance ) {
216
 
217
+ $args = $this->widget_fields;
218
  // make sure to pass same class name for wrapper to widget too
219
  if( isset( $this->widget_info['base_class'] ) ){
220
  $args['base_class'] = $this->widget_info['base_class'];
includes/classes/class-auxin-widget-shortcode-map.php CHANGED
@@ -303,18 +303,18 @@ class Auxin_Widget_Shortcode_Map {
303
 
304
  $screen = get_current_screen();
305
 
306
- if ( isset( $element_info['so_api'] ) && $element_info['so_api'] ) {
307
 
308
  // render widget to enqueue scripts
309
  // this method is used in site origin panels too (siteorigin-panels.php:420)
310
  if( $screen->base != 'widgets' ) {
311
- $original_post = isset($GLOBALS['post']) ? $GLOBALS['post'] : null; // Make sure widgets don't change the global post.
312
  ob_start();
313
  $widget_obj = new Auxin_SiteOrigin_Widget( $element_info );
314
  $widget_obj->form( array() );
315
  ob_clean();
316
 
317
- $GLOBALS['post'] = $original_post;
318
  }
319
 
320
  }
@@ -347,7 +347,7 @@ class Auxin_Widget_Shortcode_Map {
347
  $element_info = $master_array[ $widget ];
348
  }
349
 
350
- if ( isset( $element_info['so_api'] ) && $element_info['so_api'] ) {
351
  return new Auxin_SiteOrigin_Widget( $element_info );
352
  } elseif ( ! empty( $object ) ) {
353
  return $object;
303
 
304
  $screen = get_current_screen();
305
 
306
+ if ( class_exists( 'Auxin_SiteOrigin_Widget') && isset( $element_info['so_api'] ) && $element_info['so_api'] ) {
307
 
308
  // render widget to enqueue scripts
309
  // this method is used in site origin panels too (siteorigin-panels.php:420)
310
  if( $screen->base != 'widgets' ) {
311
+ //$original_post = isset($GLOBALS['post']) ? $GLOBALS['post'] : null; // Make sure widgets don't change the global post.
312
  ob_start();
313
  $widget_obj = new Auxin_SiteOrigin_Widget( $element_info );
314
  $widget_obj->form( array() );
315
  ob_clean();
316
 
317
+ wp_reset_postdata();
318
  }
319
 
320
  }
347
  $element_info = $master_array[ $widget ];
348
  }
349
 
350
+ if ( class_exists( 'Auxin_SiteOrigin_Widget') && isset( $element_info['so_api'] ) && $element_info['so_api'] ) {
351
  return new Auxin_SiteOrigin_Widget( $element_info );
352
  } elseif ( ! empty( $object ) ) {
353
  return $object;
includes/define.php CHANGED
@@ -12,7 +12,7 @@ if( ! defined( 'THEME_NAME' ) ){
12
  }
13
 
14
 
15
- define( 'AUXELS_VERSION' , '1.0.6' );
16
 
17
  define( 'AUXELS_SLUG' , 'auxin-elements' );
18
  define( 'AUXELS_TEXT_DOMAIN' , 'auxin-elements' );
12
  }
13
 
14
 
15
+ define( 'AUXELS_VERSION' , '1.0.9' );
16
 
17
  define( 'AUXELS_SLUG' , 'auxin-elements' );
18
  define( 'AUXELS_TEXT_DOMAIN' , 'auxin-elements' );
includes/elements/contact-box.php CHANGED
@@ -37,7 +37,7 @@ function get_auxin_contact_box( $master_array ) {
37
  'params' => array(
38
  array(
39
  'heading' => __('Title','auxin-elements'),
40
- 'description' => __('Contact box title, leave it empty if you don`t need title.', 'auxin-elements'),
41
  'param_name' => 'title',
42
  'type' => 'textfield',
43
  'value' => '',
@@ -354,8 +354,6 @@ function auxin_widget_contact_box( $atts, $shortcode_content = null ){
354
  <?php
355
 
356
  if( $show_map ){
357
- // enqueue google map scripts
358
- wp_enqueue_script ('gmaps');
359
 
360
  $mapid = uniqid("axi_map");
361
  $marker_title = '';
37
  'params' => array(
38
  array(
39
  'heading' => __('Title','auxin-elements'),
40
+ 'description' => __('Contact box title, leave it empty if you don`t need title.', 'auxin-elements'),
41
  'param_name' => 'title',
42
  'type' => 'textfield',
43
  'value' => '',
354
  <?php
355
 
356
  if( $show_map ){
 
 
357
 
358
  $mapid = uniqid("axi_map");
359
  $marker_title = '';
includes/elements/gallery.php CHANGED
@@ -166,6 +166,21 @@ function auxin_get_gallery_master_array( $master_array ) {
166
  'group' => '' ,
167
  'edit_field_class' => ''
168
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
169
  array(
170
  'heading' => __('Link images to','auxin-elements'),
171
  'description' => '',
@@ -196,6 +211,7 @@ function auxin_get_gallery_master_array( $master_array ) {
196
  'full' => __('Original' , 'auxin-elements'),
197
  'large' => __('Large' , 'auxin-elements'),
198
  'medium' => __('Medium' , 'auxin-elements'),
 
199
  'thumbnail' => __('Thumbnail' , 'auxin-elements')
200
  ),
201
  'holder' => 'dropdown',
@@ -307,6 +323,7 @@ function auxin_widget_gallery_callback( $attr, $shortcode_content = null ){
307
  'icontag' => $html5 ? 'div' : 'dt',
308
  'captiontag' => $html5 ? 'figcaption' : 'dd',
309
  'columns' => 4,
 
310
  'size' => 'medium',
311
  'hardcrop' => "yes",
312
  'layout' => 'grid', // grid, masonry, justify-rows, packery
@@ -447,7 +464,8 @@ function auxin_widget_gallery_callback( $attr, $shortcode_content = null ){
447
  $img_sizes = array (
448
  'large' => 1024,
449
  'medium' => 768,
450
- 'thumbnail' => 300
 
451
  );
452
 
453
  $grid_wrapper_class = '';
@@ -464,10 +482,17 @@ function auxin_widget_gallery_callback( $attr, $shortcode_content = null ){
464
  $layoutAttr = 'justifyRows';
465
  }
466
 
 
 
 
 
 
 
 
467
  $size_class = sanitize_html_class( $atts['size'] );
468
  $gallery_div = "<div id='$selector' class='gallery aux-gallery galleryid-{$id} gallery-columns-{$columns} gallery-size-{$size_class} aux-lightbox-frame'>";
469
 
470
- $gallery_div .= "<div class='aux-gallery-container $grid_wrapper_class aux-layout-{$atts['layout']}' data-pagination='{$atts['pagination']}' data-lazyload='{$atts['lazyload']}' data-perpage='{$atts['perpage']}' data-layout='$layoutAttr' >";
471
 
472
  /**
473
  * Filter the default gallery shortcode CSS styles.
@@ -495,10 +520,10 @@ function auxin_widget_gallery_callback( $attr, $shortcode_content = null ){
495
  $url = $original_src;
496
  }
497
 
498
- if ( empty( $atts['size'] ) || $atts['size'] === 'full' ) {
499
  $image_src = $original_src;
500
  } else {
501
- $image_src = auxin_get_the_resized_attachment_src( $id, $img_sizes[ $atts['size'] ] , $img_sizes[ $atts['size'] ] , $atts['layout'] === 'grid' , 100, $attr, true );
502
  }
503
 
504
  $image_meta = wp_get_attachment_metadata( $id );
@@ -528,6 +553,7 @@ function auxin_widget_gallery_callback( $attr, $shortcode_content = null ){
528
  alt='$image_alt'
529
  width='$image_width'
530
  height='$image_height'
 
531
  >
532
  </{$icontag}>";
533
 
166
  'group' => '' ,
167
  'edit_field_class' => ''
168
  ),
169
+ array(
170
+ 'heading' => __('Space','auxin-elements'),
171
+ 'description' => __('Space between gallery items in pixel.', 'auxin-elements'),
172
+ 'param_name' => 'space',
173
+ 'type' => 'textfield',
174
+ 'value' => '10',
175
+ 'def_value' => '',
176
+ 'holder' => 'textfield',
177
+ 'class' => 'space',
178
+ 'admin_label' => true,
179
+ 'dependency' => '',
180
+ 'weight' => '',
181
+ 'group' => '' ,
182
+ 'edit_field_class' => ''
183
+ ),
184
  array(
185
  'heading' => __('Link images to','auxin-elements'),
186
  'description' => '',
211
  'full' => __('Original' , 'auxin-elements'),
212
  'large' => __('Large' , 'auxin-elements'),
213
  'medium' => __('Medium' , 'auxin-elements'),
214
+ 'small' => __('Small' , 'auxin-elements'),
215
  'thumbnail' => __('Thumbnail' , 'auxin-elements')
216
  ),
217
  'holder' => 'dropdown',
323
  'icontag' => $html5 ? 'div' : 'dt',
324
  'captiontag' => $html5 ? 'figcaption' : 'dd',
325
  'columns' => 4,
326
+ 'space' => '10',
327
  'size' => 'medium',
328
  'hardcrop' => "yes",
329
  'layout' => 'grid', // grid, masonry, justify-rows, packery
464
  $img_sizes = array (
465
  'large' => 1024,
466
  'medium' => 768,
467
+ 'small' => 300,
468
+ 'thumbnail' => 150
469
  );
470
 
471
  $grid_wrapper_class = '';
482
  $layoutAttr = 'justifyRows';
483
  }
484
 
485
+ // space attribute
486
+ if ( '10' != $atts['space'] ) {
487
+ $space_attr = 'data-space="'.$atts['space'].'"';
488
+ } else {
489
+ $space_attr = '';
490
+ }
491
+
492
  $size_class = sanitize_html_class( $atts['size'] );
493
  $gallery_div = "<div id='$selector' class='gallery aux-gallery galleryid-{$id} gallery-columns-{$columns} gallery-size-{$size_class} aux-lightbox-frame'>";
494
 
495
+ $gallery_div .= "<div class='aux-gallery-container $grid_wrapper_class aux-layout-{$atts['layout']}' data-pagination='{$atts['pagination']}' data-lazyload='{$atts['lazyload']}' data-perpage='{$atts['perpage']}' data-layout='$layoutAttr' $space_attr >";
496
 
497
  /**
498
  * Filter the default gallery shortcode CSS styles.
520
  $url = $original_src;
521
  }
522
 
523
+ if ( empty( $atts['size'] ) || ( $atts['size'] === 'full' && $atts['layout'] != 'grid' ) ) {
524
  $image_src = $original_src;
525
  } else {
526
+ $image_src = auxin_get_the_resized_attachment_src( $id, $img_sizes[ $atts['size'] ] , $img_sizes[ $atts['size'] ], $atts['layout'] == 'grid' , 100, true );
527
  }
528
 
529
  $image_meta = wp_get_attachment_metadata( $id );
553
  alt='$image_alt'
554
  width='$image_width'
555
  height='$image_height'
556
+ ".$attr."
557
  >
558
  </{$icontag}>";
559
 
includes/elements/gmap.php CHANGED
@@ -244,11 +244,7 @@ function auxin_widget_gmaps_callback( $atts, $shortcode_content = null ){
244
  echo $result['widget_header'];
245
  echo $result['widget_title'];
246
 
247
-
248
- // enqueue google map scripts
249
- wp_enqueue_script ('gmaps');
250
-
251
- $mapid = uniqid("axi_map");
252
 
253
  if ( empty( $style ) ) {
254
  $style = auxin_get_gmap_style();
@@ -262,8 +258,10 @@ function auxin_widget_gmaps_callback( $atts, $shortcode_content = null ){
262
  <div id="<?php echo $mapid; ?>" class="aux_map_wrapper <?php echo $extra_classes; ?>" style="height:<?php echo $height; ?>px" ></div>
263
 
264
  <script>
 
 
265
 
266
- jQuery( function($) {
267
  var map = new GMaps({
268
  el: "#<?php echo $mapid; ?>",
269
  lat: <?php echo $latitude; ?>,
@@ -296,7 +294,9 @@ function auxin_widget_gmaps_callback( $atts, $shortcode_content = null ){
296
  lat: <?php echo $latitude; ?>,
297
  lng: <?php echo $longitude; ?>
298
  });
299
- });
 
 
300
 
301
  </script>
302
 
244
  echo $result['widget_header'];
245
  echo $result['widget_title'];
246
 
247
+ $mapid = uniqid("axi_map");
 
 
 
 
248
 
249
  if ( empty( $style ) ) {
250
  $style = auxin_get_gmap_style();
258
  <div id="<?php echo $mapid; ?>" class="aux_map_wrapper <?php echo $extra_classes; ?>" style="height:<?php echo $height; ?>px" ></div>
259
 
260
  <script>
261
+ (function($, window, document, undefined){
262
+ "use strict";
263
 
264
+ $(function(){
265
  var map = new GMaps({
266
  el: "#<?php echo $mapid; ?>",
267
  lat: <?php echo $latitude; ?>,
294
  lat: <?php echo $latitude; ?>,
295
  lng: <?php echo $longitude; ?>
296
  });
297
+ });
298
+
299
+ })(jQuery, window, document);
300
 
301
  </script>
302
 
includes/elements/recent-posts-timeline.php CHANGED
@@ -13,7 +13,7 @@
13
  function auxin_get_recent_posts_timeline_master_array( $master_array ) {
14
 
15
  $categories = get_terms( 'category', 'orderby=count&hide_empty=0' );
16
- $categories_list = array( '' => __('All Categories', 'auxin-elements' ) ) ;
17
  foreach ( $categories as $key => $value ) {
18
  $categories_list[$value->term_id] = $value->name;
19
  }
@@ -67,6 +67,35 @@ function auxin_get_recent_posts_timeline_master_array( $master_array ) {
67
  'group' => '' ,
68
  'edit_field_class' => ''
69
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  // array(
71
  // 'param_name' => 'post_type',
72
  // 'type' => 'dropdown',
@@ -89,7 +118,7 @@ function auxin_get_recent_posts_timeline_master_array( $master_array ) {
89
  array(
90
  'param_name' => 'cat',
91
  'type' => 'dropdown',
92
- 'def_value' => '',
93
  'holder' => 'dropdown',
94
  'class' => 'cat',
95
  'heading' => __('Categories', 'auxin-elements'),
@@ -355,34 +384,6 @@ function auxin_get_recent_posts_timeline_master_array( $master_array ) {
355
  'edit_field_class' => ''
356
  ),
357
 
358
- array(
359
- 'heading' => __('Timeline Alignment','auxin-elements' ),
360
- 'description' => '',
361
- 'param_name' => 'timeline_alignment',
362
- 'type' => 'aux_visual_select',
363
- 'choices' => array(
364
- 'center' => array(
365
- 'label' => __('Center', 'auxin-elements'),
366
- 'image' => AUX_URL . 'images/visual-select/divider-white-space.svg'
367
- ),
368
- 'left' => array(
369
- 'label' => __('Left', 'auxin-elements'),
370
- 'image' => AUX_URL . 'images/visual-select/divider-solid.svg'
371
- ),
372
- 'right' => array(
373
- 'label' => __('Right', 'auxin-elements'),
374
- 'image' => AUX_URL . 'images/visual-select/divider-dashed.svg'
375
- )
376
- ),
377
- 'value' => 'center',
378
- 'class' => '',
379
- 'dependency' => '',
380
- 'admin_label' => false,
381
- 'weight' => '',
382
- 'group' => '' ,
383
- 'edit_field_class' => ''
384
- ),
385
-
386
  array(
387
  'heading' => __('Extra class name','auxin-elements' ),
388
  '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' ),
@@ -424,7 +425,7 @@ function auxin_widget_recent_posts_timeline_callback( $atts, $shortcode_content
424
  // Defining default attributes
425
  $default_atts = array(
426
  'title' => '', // header title
427
- 'cat' => '',
428
  'num' => '4',
429
  'exclude' => '',
430
  'include' => '',
@@ -446,9 +447,10 @@ function auxin_widget_recent_posts_timeline_callback( $atts, $shortcode_content
446
  'show_author_footer' => false,
447
  'timeline_alignment' => 'center',
448
  'tag' => '',
449
- 'reset_query' => true,
450
  'extra_classes' => '',
451
  'custom_el_id' => '',
 
 
452
  'base_class' => 'aux-widget-recent-posts'
453
  );
454
 
@@ -457,23 +459,27 @@ function auxin_widget_recent_posts_timeline_callback( $atts, $shortcode_content
457
 
458
  ob_start();
459
 
460
- // create wp_query to get latest items -----------
461
- $args = array(
462
- 'post_type' => 'post',
463
- 'orderby' => $order_by,
464
- 'order' => $order,
465
- 'offset' => $offset,
466
- 'paged' => $paged,
467
- 'cat' => $cat,
468
- 'post__not_in' => array_filter( explode( ',', $exclude ) ),
469
- 'post__in' => array_filter( explode( ',', $include ) ),
470
- 'post_status' => 'publish',
471
- 'posts_per_page' => $posts_per_page,
472
- 'ignore_sticky_posts' => 1
473
- );
474
-
475
  global $wp_query;
476
- $wp_query = new WP_Query( $args );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
477
 
478
  // widget header ------------------------------
479
  echo $result['widget_header'];
@@ -506,8 +512,16 @@ function auxin_widget_recent_posts_timeline_callback( $atts, $shortcode_content
506
  }
507
 
508
  $wp_query->the_post();
509
- $post = $wp_query->post;
510
- $post_vars = auxin_get_post_format_media( $post , 'archive', $phone_break_point, true );
 
 
 
 
 
 
 
 
511
  extract( $post_vars );
512
 
513
  $the_format = get_post_format($post);
@@ -523,7 +537,7 @@ function auxin_widget_recent_posts_timeline_callback( $atts, $shortcode_content
523
  $post_month = date('m', strtotime(str_replace('/', '-', get_the_date() ) ) );
524
  if($post_month != $old_post_month){
525
  ?>
526
- <span class="aux-date-label"><?php the_time('F, Y'); ?></span>
527
  <?php
528
  }
529
  ?>
13
  function auxin_get_recent_posts_timeline_master_array( $master_array ) {
14
 
15
  $categories = get_terms( 'category', 'orderby=count&hide_empty=0' );
16
+ $categories_list = array( ' ' => __('All Categories', 'auxin-elements' ) ) ;
17
  foreach ( $categories as $key => $value ) {
18
  $categories_list[$value->term_id] = $value->name;
19
  }
67
  'group' => '' ,
68
  'edit_field_class' => ''
69
  ),
70
+
71
+ array(
72
+ 'heading' => __('Timeline Alignment','auxin-elements' ),
73
+ 'description' => __('Specifies the alignment of timeline element.', 'auxin-elements'),
74
+ 'param_name' => 'timeline_alignment',
75
+ 'type' => 'aux_visual_select',
76
+ 'choices' => array(
77
+ 'center' => array(
78
+ 'label' => __('Center', 'auxin-elements'),
79
+ 'image' => AUX_URL . 'images/visual-select/blog-layout-8.svg'
80
+ ),
81
+ 'left' => array(
82
+ 'label' => __('Left', 'auxin-elements'),
83
+ 'image' => AUX_URL . 'images/visual-select/blog-layout-8-left.svg'
84
+ ),
85
+ 'right' => array(
86
+ 'label' => __('Right', 'auxin-elements'),
87
+ 'image' => AUX_URL . 'images/visual-select/blog-layout-8-right.svg'
88
+ )
89
+ ),
90
+ 'value' => 'center',
91
+ 'class' => '',
92
+ 'dependency' => '',
93
+ 'admin_label' => false,
94
+ 'weight' => '',
95
+ 'group' => '' ,
96
+ 'edit_field_class' => ''
97
+ ),
98
+
99
  // array(
100
  // 'param_name' => 'post_type',
101
  // 'type' => 'dropdown',
118
  array(
119
  'param_name' => 'cat',
120
  'type' => 'dropdown',
121
+ 'def_value' => ' ',
122
  'holder' => 'dropdown',
123
  'class' => 'cat',
124
  'heading' => __('Categories', 'auxin-elements'),
384
  'edit_field_class' => ''
385
  ),
386
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
387
  array(
388
  'heading' => __('Extra class name','auxin-elements' ),
389
  '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' ),
425
  // Defining default attributes
426
  $default_atts = array(
427
  'title' => '', // header title
428
+ 'cat' => ' ',
429
  'num' => '4',
430
  'exclude' => '',
431
  'include' => '',
447
  'show_author_footer' => false,
448
  'timeline_alignment' => 'center',
449
  'tag' => '',
 
450
  'extra_classes' => '',
451
  'custom_el_id' => '',
452
+ 'reset_query' => true,
453
+ 'use_wp_query' => false, // true to use the global wp_query, false to use internal custom query
454
  'base_class' => 'aux-widget-recent-posts'
455
  );
456
 
459
 
460
  ob_start();
461
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
462
  global $wp_query;
463
+
464
+ if( ! $use_wp_query ){
465
+
466
+ // create wp_query to get latest items -----------
467
+ $args = array(
468
+ 'post_type' => 'post',
469
+ 'orderby' => $order_by,
470
+ 'order' => $order,
471
+ 'offset' => $offset,
472
+ 'paged' => $paged,
473
+ 'cat' => $cat,
474
+ 'post__not_in' => array_filter( explode( ',', $exclude ) ),
475
+ 'post__in' => array_filter( explode( ',', $include ) ),
476
+ 'post_status' => 'publish',
477
+ 'posts_per_page' => $posts_per_page,
478
+ 'ignore_sticky_posts' => 1
479
+ );
480
+
481
+ $wp_query = new WP_Query( $args );
482
+ }
483
 
484
  // widget header ------------------------------
485
  echo $result['widget_header'];
512
  }
513
 
514
  $wp_query->the_post();
515
+ $post = $wp_query->post;
516
+ $post_vars = auxin_get_post_format_media(
517
+ $post,
518
+ array(
519
+ 'request_from' => 'archive',
520
+ 'media_width' => $phone_break_point,
521
+ 'upscale_image' => true
522
+ )
523
+ );
524
+
525
  extract( $post_vars );
526
 
527
  $the_format = get_post_format($post);
537
  $post_month = date('m', strtotime(str_replace('/', '-', get_the_date() ) ) );
538
  if($post_month != $old_post_month){
539
  ?>
540
+ <span class="aux-date-label"><?php the_time('M, Y'); ?></span>
541
  <?php
542
  }
543
  ?>
includes/elements/recent-posts.php CHANGED
@@ -214,7 +214,7 @@ function auxin_get_recent_posts_master_array( $master_array ) {
214
  'group' => '' ,
215
  'edit_field_class' => ''
216
  ),
217
- array(
218
  'heading' => __('Order', 'auxin-elements'),
219
  'description' => '',
220
  'param_name' => 'order',
@@ -263,6 +263,27 @@ function auxin_get_recent_posts_master_array( $master_array ) {
263
  'edit_field_class' => ''
264
  ),
265
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
266
  array(
267
  'heading' => __('Insert post title','auxin-elements' ),
268
  'description' => '',
@@ -290,6 +311,21 @@ function auxin_get_recent_posts_master_array( $master_array ) {
290
  'edit_field_class' => ''
291
  ),
292
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
293
  array(
294
  'heading' => __('Display Excerpt','auxin-elements' ),
295
  'description' => __('Enable it to display post summary instead of full content.','auxin-elements' ),
@@ -306,6 +342,25 @@ function auxin_get_recent_posts_master_array( $master_array ) {
306
  'edit_field_class' => ''
307
  ),
308
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
309
  array(
310
  'heading' => __('Excerpt Length','auxin-elements' ),
311
  'description' => __('Specify summary content in character.','auxin-elements' ),
@@ -324,7 +379,6 @@ function auxin_get_recent_posts_master_array( $master_array ) {
324
  'edit_field_class' => ''
325
  ),
326
 
327
-
328
  array(
329
  'heading' => __('Insert read more button','auxin-elements' ),
330
  'description' => '',
@@ -413,123 +467,145 @@ function auxin_get_recent_posts_master_array( $master_array ) {
413
  'edit_field_class' => ''
414
  ),
415
 
416
- // array(
417
- // 'param_name' => 'preview_mode',
418
- // 'type' => 'dropdown',
419
- // 'def_value' => 'grid',
420
- // 'holder' => 'dropdown',
421
- // 'class' => 'num',
422
- // 'heading' => __('Display items in', 'auxin-elements'),
423
- // 'description' => '',
424
- // 'value' => array(
425
- // 'grid' => 'Grid',
426
- // 'carousel' => 'Carousel'
427
- // ),
428
- // 'admin_label' => true,
429
- // 'dependency' => '',
430
- // 'weight' => '',
431
- // 'group' => '' ,
432
- // 'edit_field_class' => ''
433
- // ),
434
 
435
- // // Carousel Options
436
- // array(
437
- // 'param_name' => 'carousel_space',
438
- // 'type' => 'textfield',
439
- // 'value' => '30',
440
- // 'holder' => 'textfield',
441
- // 'class' => 'excerpt_len',
442
- // 'heading' => __('Column space','auxin-elements' ),
443
- // 'description' => __('Specifies space between carousel columns in pixels', 'auxin-elements' ),
444
- // 'admin_label' => 1,
445
- // 'dependency' => array(
446
- // 'element' => 'preview_mode',
447
- // 'value' => 'carousel'
448
- // ),
449
- // 'weight' => '',
450
- // 'group' => '' ,
451
- // 'edit_field_class' => ''
452
- // ),
453
 
454
- // array(
455
- // 'param_name' => 'carousel_navigation',
456
- // 'type' => 'dropdown',
457
- // 'def_value' => 'peritem',
458
- // 'holder' => 'dropdown',
459
- // 'class' => 'num',
460
- // 'heading' => __('Number of columns in phone size', 'auxin-elements'),
461
- // 'description' => '',
462
- // 'value' => array(
463
- // 'peritem' => __('Move per column', 'auxin-elements'),
464
- // 'perpage' => __('Move per page', 'auxin-elements'),
465
- // 'scroll' => __('Smooth scroll', 'auxin-elements'),
466
- // ),
467
- // 'admin_label' => true,
468
- // 'dependency' => array(
469
- // 'element' => 'preview_mode',
470
- // 'value' => 'carousel'
471
- // ),
472
- // 'weight' => '',
473
- // 'group' => '' ,
474
- // 'edit_field_class' => ''
475
- // ),
476
 
477
- // array(
478
- // 'param_name' => 'carousel_loop',
479
- // 'type' => 'aux_switch',
480
- // 'value' => '1',
481
- // 'class' => '',
482
- // 'heading' => __('Loop navigation','auxin-elements' ),
483
- // 'description' => '',
484
- // 'dependency' => array(
485
- // 'element' => 'preview_mode',
486
- // 'value' => 'carousel'
487
- // ),
488
- // 'weight' => '',
489
- // 'group' => '' ,
490
- // 'edit_field_class' => ''
491
- // ),
 
 
 
 
 
 
492
 
493
- // array(
494
- // 'param_name' => 'carousel_autoplay',
495
- // 'type' => 'aux_switch',
496
- // 'value' => '0',
497
- // 'class' => '',
498
- // 'heading' => __('Autoplay carousel','auxin-elements' ),
499
- // 'description' => '',
500
- // 'admin_label' => true,
501
- // 'dependency' => array(
502
- // 'element' => 'preview_mode',
503
- // 'value' => 'carousel'
504
- // ),
505
- // 'weight' => '',
506
- // 'group' => '' ,
507
- // 'edit_field_class' => ''
508
- // ),
509
 
510
- // array(
511
- // 'param_name' => 'carousel_autoplay_delay',
512
- // 'type' => 'textfield',
513
- // 'value' => '2',
514
- // 'holder' => 'textfield',
515
- // 'class' => 'excerpt_len',
516
- // 'heading' => __('Autoplay delay','auxin-elements' ),
517
- // 'description' => __('Specifies the delay between auto-forwarding in seconds', 'auxin-elements' ),
518
- // 'admin_label' => 1,
519
- // 'dependency' => array(
520
- // array(
521
- // 'element' => 'preview_mode',
522
- // 'value' => 'carousel'
523
- // ),
524
- // array(
525
- // 'element' => 'carousel_autoplay',
526
- // 'value' => 1
527
- // )
528
- // ),
529
- // 'weight' => '',
530
- // 'group' => '' ,
531
- // 'edit_field_class' => ''
532
- // ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
533
 
534
 
535
  array(
@@ -586,25 +662,30 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
586
  'exclude_custom_post_formats' => 0,
587
  'exclude_qoute_link' => 0,
588
  'show_media' => true,
 
589
  'show_excerpt' => true,
 
590
  'excerpt_len' => '160',
591
  'show_title' => true,
592
  'show_info' => true,
593
  'show_readmore' => true,
594
  'show_author_footer' => false,
 
595
  'desktop_cnum' => 4,
596
  'tablet_cnum' => 'inherit',
597
  'phone_cnum' => 'inherit',
598
  'preview_mode' => 'grid',
599
  'tag' => '',
600
- 'reset_query' => true,
601
  'extra_classes' => '',
602
  'custom_el_id' => '',
603
  'carousel_space' => '30',
604
  'carousel_autoplay' => false,
605
  'carousel_autoplay_delay' => '2',
606
  'carousel_navigation' => 'peritem',
 
607
  'carousel_loop' => 1,
 
 
608
  'base_class' => 'aux-widget-recent-posts'
609
  );
610
 
@@ -613,24 +694,27 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
613
 
614
  ob_start();
615
 
616
- // create wp_query to get latest items -----------
617
- $args = array(
618
- 'post_type' => 'post',
619
- 'orderby' => $order_by,
620
- 'order' => $order,
621
- 'offset' => $offset,
622
- 'paged' => $paged,
623
- 'cat' => $cat,
624
- 'post__not_in' => array_filter( explode( ',', $exclude ) ),
625
- 'post__in' => array_filter( explode( ',', $include ) ),
626
- 'post_status' => 'publish',
627
- 'posts_per_page' => $posts_per_page,
628
- 'ignore_sticky_posts' => 1
629
- );
630
-
631
  global $wp_query;
632
- $wp_query = new WP_Query( $args );
633
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
634
 
635
  // widget header ------------------------------
636
  echo $result['widget_header'];
@@ -648,17 +732,27 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
648
 
649
  if ( 'grid' == $preview_mode ) {
650
  // generate columns class
651
- $column_class = 'aux-match-height aux-row aux-de-col' . $desktop_cnum . ( 'inherit' != $tablet_cnum ? ' aux-tb-col'.$tablet_cnum : '' ) . ( 'inherit' != $phone_cnum ? ' aux-mb-col'.$phone_cnum : '' );
 
 
 
 
652
  } elseif ( 'carousel' == $preview_mode ) {
653
- $column_class = 'master-carousel';
654
- $item_class = 'aux-mc-item';
 
655
  // genereate the master carousel attributes
656
  $carousel_attrs = 'data-columns="' . $desktop_cnum . '"';
657
  $carousel_attrs .= ' data-autoplay="' . $carousel_autoplay . '"';
658
  $carousel_attrs .= ' data-delay="' . $carousel_autoplay_delay . '"';
659
  $carousel_attrs .= ' data-navigation="' . $carousel_navigation . '"';
660
  $carousel_attrs .= ' data-space="' . $carousel_space. '"';
661
- $carousel_attrs .= ' data-loop="' . $carousel_loop. '"';
 
 
 
 
 
662
 
663
  if ( 'inherit' != $tablet_cnum || 'inherit' != $phone_cnum ) {
664
  $carousel_attrs .= ' data-responsive="'. ( 'inherit' != $tablet_cnum ? $tablet_break_point . ':' . $tablet_cnum . ',' : '' ).
@@ -667,6 +761,8 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
667
 
668
  }
669
 
 
 
670
  $have_posts = $wp_query->have_posts();
671
 
672
  if( $have_posts ){
@@ -683,16 +779,38 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
683
  $wp_query->the_post();
684
  $post = $wp_query->post;
685
 
686
- $post_vars = auxin_get_post_format_media( $post , 'archive', $phone_break_point, true );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
687
  extract( $post_vars );
688
 
689
- $the_format = get_post_format($post);
690
 
691
- if (
692
- ( $exclude_custom_post_formats && !empty( $the_format ) ) ||
693
- ( $exclude_qoute_link && ( 'link' == $the_format || 'quote' == $the_format ) ) ||
694
- ( $exclude_without_media && !$has_attach )
695
- ) {
696
  $post_counter --;
697
  continue;
698
  }
@@ -703,9 +821,28 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
703
  </div>
704
  <?php
705
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
706
  ?> </div> <?php
707
  }
708
 
 
 
709
  if( $reset_query ){
710
  wp_reset_query();
711
  }
214
  'group' => '' ,
215
  'edit_field_class' => ''
216
  ),
217
+ array(
218
  'heading' => __('Order', 'auxin-elements'),
219
  'description' => '',
220
  'param_name' => 'order',
263
  'edit_field_class' => ''
264
  ),
265
 
266
+ array(
267
+ 'heading' => __('Image Aspect Ratio', 'auxin-elements'),
268
+ 'description' => '',
269
+ 'param_name' => 'image_aspect_ratio',
270
+ 'type' => 'dropdown',
271
+ 'def_value' => '0.75',
272
+ 'holder' => 'dropdown',
273
+ 'class' => 'order',
274
+ 'value' =>array (
275
+ '0.75' => __('Horizontal 4:3' , 'auxin-elements'),
276
+ '0.56' => __('Horizontal 16:9', 'auxin-elements'),
277
+ '1.00' => __('Square 1:1' , 'auxin-elements'),
278
+ '1.33' => __('Vertical 3:4' , 'auxin-elements')
279
+ ),
280
+ 'admin_label' => true,
281
+ 'dependency' => '',
282
+ 'weight' => '',
283
+ 'group' => '' ,
284
+ 'edit_field_class' => ''
285
+ ),
286
+
287
  array(
288
  'heading' => __('Insert post title','auxin-elements' ),
289
  'description' => '',
311
  'edit_field_class' => ''
312
  ),
313
 
314
+ array(
315
+ 'heading' => __('Display Like Button','auxin-elements' ),
316
+ 'description' => sprintf(__('Enable it to display %s like button%s on gride template blog. Please note WP Ulike plugin needs to be activaited to use this option.', 'auxin-elements'), '<strong>', '</strong>'),
317
+ 'param_name' => 'display_like',
318
+ 'type' => 'aux_switch',
319
+ 'value' => '1',
320
+ 'holder' => 'dropdown',
321
+ 'class' => 'display_like',
322
+ 'admin_label' => 1,
323
+ 'dependency' => '',
324
+ 'weight' => '',
325
+ 'group' => '' ,
326
+ 'edit_field_class' => ''
327
+ ),
328
+
329
  array(
330
  'heading' => __('Display Excerpt','auxin-elements' ),
331
  'description' => __('Enable it to display post summary instead of full content.','auxin-elements' ),
342
  'edit_field_class' => ''
343
  ),
344
 
345
+ array(
346
+ 'heading' => __('Content Layout', 'auxin-elements'),
347
+ 'description' => __('Specifies the style of content for each post column.', 'auxin-elements' ),
348
+ 'param_name' => 'content_layout',
349
+ 'type' => 'dropdown',
350
+ 'def_value' => 'default',
351
+ 'holder' => 'dropdown',
352
+ 'class' => 'content_layout',
353
+ 'value' =>array (
354
+ 'default' => __('Full Content', 'auxin-elements'),
355
+ 'entry-boxed' => __('Boxed Content', 'auxin-elements')
356
+ ),
357
+ 'admin_label' => true,
358
+ 'dependency' => '',
359
+ 'weight' => '',
360
+ 'group' => '' ,
361
+ 'edit_field_class' => ''
362
+ ),
363
+
364
  array(
365
  'heading' => __('Excerpt Length','auxin-elements' ),
366
  'description' => __('Specify summary content in character.','auxin-elements' ),
379
  'edit_field_class' => ''
380
  ),
381
 
 
382
  array(
383
  'heading' => __('Insert read more button','auxin-elements' ),
384
  'description' => '',
467
  'edit_field_class' => ''
468
  ),
469
 
470
+ array(
471
+ 'param_name' => 'preview_mode',
472
+ 'type' => 'dropdown',
473
+ 'def_value' => 'grid',
474
+ 'holder' => 'dropdown',
475
+ 'class' => 'num',
476
+ 'heading' => __('Display items in', 'auxin-elements'),
477
+ 'description' => '',
478
+ 'value' => array(
479
+ 'grid' => 'Grid',
480
+ 'carousel' => 'Carousel'
481
+ ),
482
+ 'admin_label' => true,
483
+ 'dependency' => '',
484
+ 'weight' => '',
485
+ 'group' => '' ,
486
+ 'edit_field_class' => ''
487
+ ),
488
 
489
+ // Carousel Options
490
+ array(
491
+ 'param_name' => 'carousel_space',
492
+ 'type' => 'textfield',
493
+ 'value' => '30',
494
+ 'holder' => 'textfield',
495
+ 'class' => 'excerpt_len',
496
+ 'heading' => __('Column space','auxin-elements' ),
497
+ 'description' => __('Specifies space between carousel columns in pixels', 'auxin-elements' ),
498
+ 'admin_label' => 1,
499
+ 'dependency' => array(
500
+ 'element' => 'preview_mode',
501
+ 'value' => 'carousel'
502
+ ),
503
+ 'weight' => '',
504
+ 'group' => '' ,
505
+ 'edit_field_class' => ''
506
+ ),
507
 
508
+ array(
509
+ 'param_name' => 'carousel_navigation',
510
+ 'type' => 'dropdown',
511
+ 'def_value' => 'peritem',
512
+ 'holder' => 'dropdown',
513
+ 'class' => 'num',
514
+ 'heading' => __('Navigation type', 'auxin-elements'),
515
+ 'description' => '',
516
+ 'value' => array(
517
+ 'peritem' => __('Move per column', 'auxin-elements'),
518
+ 'perpage' => __('Move per page', 'auxin-elements'),
519
+ 'scroll' => __('Smooth scroll', 'auxin-elements'),
520
+ ),
521
+ 'admin_label' => true,
522
+ 'dependency' => array(
523
+ 'element' => 'preview_mode',
524
+ 'value' => 'carousel'
525
+ ),
526
+ 'weight' => '',
527
+ 'group' => '' ,
528
+ 'edit_field_class' => ''
529
+ ),
530
 
531
+ array(
532
+ 'param_name' => 'carousel_navigation_control',
533
+ 'type' => 'dropdown',
534
+ 'def_value' => 'arrows',
535
+ 'holder' => 'dropdown',
536
+ 'class' => 'num',
537
+ 'heading' => __('Navigation control', 'auxin-elements'),
538
+ 'description' => '',
539
+ 'value' => array(
540
+ 'arrows' => __('Arrows', 'auxin-elements'),
541
+ 'bullets' => __('Bullets', 'auxin-elements'),
542
+ '' => __('None', 'auxin-elements'),
543
+ ),
544
+ 'dependency' => array(
545
+ 'element' => 'preview_mode',
546
+ 'value' => 'carousel'
547
+ ),
548
+ 'weight' => '',
549
+ 'group' => '' ,
550
+ 'edit_field_class' => ''
551
+ ),
552
 
553
+ array(
554
+ 'param_name' => 'carousel_loop',
555
+ 'type' => 'aux_switch',
556
+ 'value' => '1',
557
+ 'class' => '',
558
+ 'heading' => __('Loop navigation','auxin-elements' ),
559
+ 'description' => '',
560
+ 'dependency' => array(
561
+ 'element' => 'preview_mode',
562
+ 'value' => 'carousel'
563
+ ),
564
+ 'weight' => '',
565
+ 'group' => '' ,
566
+ 'edit_field_class' => ''
567
+ ),
 
568
 
569
+ array(
570
+ 'param_name' => 'carousel_autoplay',
571
+ 'type' => 'aux_switch',
572
+ 'value' => '0',
573
+ 'class' => '',
574
+ 'heading' => __('Autoplay carousel','auxin-elements' ),
575
+ 'description' => '',
576
+ 'admin_label' => true,
577
+ 'dependency' => array(
578
+ 'element' => 'preview_mode',
579
+ 'value' => 'carousel'
580
+ ),
581
+ 'weight' => '',
582
+ 'group' => '' ,
583
+ 'edit_field_class' => ''
584
+ ),
585
+
586
+ array(
587
+ 'param_name' => 'carousel_autoplay_delay',
588
+ 'type' => 'textfield',
589
+ 'value' => '2',
590
+ 'holder' => 'textfield',
591
+ 'class' => 'excerpt_len',
592
+ 'heading' => __('Autoplay delay','auxin-elements' ),
593
+ 'description' => __('Specifies the delay between auto-forwarding in seconds', 'auxin-elements' ),
594
+ 'admin_label' => 1,
595
+ 'dependency' => array(
596
+ array(
597
+ 'element' => 'preview_mode',
598
+ 'value' => 'carousel'
599
+ ),
600
+ array(
601
+ 'element' => 'carousel_autoplay',
602
+ 'value' => 1
603
+ )
604
+ ),
605
+ 'weight' => '',
606
+ 'group' => '' ,
607
+ 'edit_field_class' => ''
608
+ ),
609
 
610
 
611
  array(
662
  'exclude_custom_post_formats' => 0,
663
  'exclude_qoute_link' => 0,
664
  'show_media' => true,
665
+ 'display_like' => true,
666
  'show_excerpt' => true,
667
+ 'content_layout' => '', // entry-boxed
668
  'excerpt_len' => '160',
669
  'show_title' => true,
670
  'show_info' => true,
671
  'show_readmore' => true,
672
  'show_author_footer' => false,
673
+ 'image_aspect_ratio' => 0.75,
674
  'desktop_cnum' => 4,
675
  'tablet_cnum' => 'inherit',
676
  'phone_cnum' => 'inherit',
677
  'preview_mode' => 'grid',
678
  'tag' => '',
 
679
  'extra_classes' => '',
680
  'custom_el_id' => '',
681
  'carousel_space' => '30',
682
  'carousel_autoplay' => false,
683
  'carousel_autoplay_delay' => '2',
684
  'carousel_navigation' => 'peritem',
685
+ 'carousel_navigation_control' => 'arrows',
686
  'carousel_loop' => 1,
687
+ 'reset_query' => true,
688
+ 'use_wp_query' => false, // true to use the global wp_query, false to use internal custom query
689
  'base_class' => 'aux-widget-recent-posts'
690
  );
691
 
694
 
695
  ob_start();
696
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
697
  global $wp_query;
 
698
 
699
+ if( ! $use_wp_query ){
700
+
701
+ // create wp_query to get latest items -----------
702
+ $args = array(
703
+ 'post_type' => 'post',
704
+ 'orderby' => $order_by,
705
+ 'order' => $order,
706
+ 'offset' => $offset,
707
+ 'paged' => $paged,
708
+ 'cat' => $cat,
709
+ 'post__not_in' => array_filter( explode( ',', $exclude ) ),
710
+ 'post__in' => array_filter( explode( ',', $include ) ),
711
+ 'post_status' => 'publish',
712
+ 'posts_per_page' => $posts_per_page,
713
+ 'ignore_sticky_posts' => 1
714
+ );
715
+
716
+ $wp_query = new WP_Query( $args );
717
+ }
718
 
719
  // widget header ------------------------------
720
  echo $result['widget_header'];
732
 
733
  if ( 'grid' == $preview_mode ) {
734
  // generate columns class
735
+ $column_class = 'aux-match-height aux-row aux-de-col' . $desktop_cnum;
736
+ $column_class .= 'inherit' != $tablet_cnum ? ' aux-tb-col'.$tablet_cnum : '';
737
+ $column_class .= 'inherit' != $phone_cnum ? ' aux-mb-col'.$phone_cnum : '';
738
+ $column_class .= 'entry-boxed' == $content_layout ? ' aux-entry-boxed' : '';
739
+
740
  } elseif ( 'carousel' == $preview_mode ) {
741
+ $column_class = 'master-carousel aux-no-js aux-mc-before-init';
742
+ $item_class = 'aux-mc-item';
743
+
744
  // genereate the master carousel attributes
745
  $carousel_attrs = 'data-columns="' . $desktop_cnum . '"';
746
  $carousel_attrs .= ' data-autoplay="' . $carousel_autoplay . '"';
747
  $carousel_attrs .= ' data-delay="' . $carousel_autoplay_delay . '"';
748
  $carousel_attrs .= ' data-navigation="' . $carousel_navigation . '"';
749
  $carousel_attrs .= ' data-space="' . $carousel_space. '"';
750
+ $carousel_attrs .= ' data-loop="' . $carousel_loop . '"';
751
+ $carousel_attrs .= ' data-wrap-controls="true"';
752
+ $carousel_attrs .= ' data-bullets="' . ('bullets' == $carousel_navigation_control ? 'true' : 'false') . '"';
753
+ $carousel_attrs .= ' data-bullet-class="aux-bullets aux-small aux-mask"';
754
+ $carousel_attrs .= ' data-arrows="' . ('arrows' == $carousel_navigation_control ? 'true' : 'false') . '"';
755
+ $carousel_attrs .= ' data-match-height="true"';
756
 
757
  if ( 'inherit' != $tablet_cnum || 'inherit' != $phone_cnum ) {
758
  $carousel_attrs .= ' data-responsive="'. ( 'inherit' != $tablet_cnum ? $tablet_break_point . ':' . $tablet_cnum . ',' : '' ).
761
 
762
  }
763
 
764
+ $column_media_width = auxin_get_content_column_width( $desktop_cnum, 15 );
765
+
766
  $have_posts = $wp_query->have_posts();
767
 
768
  if( $have_posts ){
779
  $wp_query->the_post();
780
  $post = $wp_query->post;
781
 
782
+ $post_vars = auxin_get_post_format_media(
783
+ $post,
784
+ array(
785
+ 'request_from' => 'archive',
786
+ 'media_width' => $phone_break_point,
787
+ 'media_size' => 'large',//array( 'width' => $column_media_width, 'height' => $column_media_width * $image_aspect_ratio ),
788
+ 'upscale_image' => true,
789
+ 'image_from_content' => ! $exclude_without_media, // whether to try to get image from content or not
790
+ 'no_gallery' => 'carousel' == $preview_mode,
791
+ 'add_image_hw' => false, // whether add width and height attr or not
792
+ 'image_sizes' => array(
793
+ array( 'min' => '', 'max' => '767px', 'width' => '80vw' ),
794
+ array( 'min' => '768px', 'max' => '992px', 'width' => '40vw' ),
795
+ array( 'min' => '' , 'max' => '', 'width' => $column_media_width.'px' )
796
+ ),
797
+ 'srcset_sizes' => array(
798
+ array( 'width' => $column_media_width, 'height' => $column_media_width * $image_aspect_ratio ),
799
+ array( 'width' => 2 * $column_media_width, 'height' => 2 * $column_media_width * $image_aspect_ratio ),
800
+ array( 'width' => 4 * $column_media_width, 'height' => 4 * $column_media_width * $image_aspect_ratio )
801
+ )
802
+ )
803
+ );
804
+
805
  extract( $post_vars );
806
 
807
+ $the_format = get_post_format( $post );
808
 
809
+ if(
810
+ ( $exclude_custom_post_formats && !empty( $the_format ) ) ||
811
+ ( $exclude_qoute_link && ( 'link' == $the_format || 'quote' == $the_format ) ) ||
812
+ ( $exclude_without_media && ! $has_attach )
813
+ ){
814
  $post_counter --;
815
  continue;
816
  }
821
  </div>
822
  <?php
823
  }
824
+
825
+ if ( 'carousel' == $preview_mode && 'arrows' == $carousel_navigation_control ) {
826
+ ?>
827
+ <div class="aux-carousel-controls">
828
+ <div class="aux-next-arrow aux-arrow-nav aux-outline aux-hover-fill">
829
+ <span class="aux-svg-arrow aux-small-right"></span>
830
+ <span class="aux-hover-arrow aux-white aux-svg-arrow aux-small-right"></span>
831
+ </div>
832
+ <div class="aux-prev-arrow aux-arrow-nav aux-outline aux-hover-fill">
833
+ <span class="aux-svg-arrow aux-small-left"></span>
834
+ <span class="aux-hover-arrow aux-white aux-svg-arrow aux-small-left"></span>
835
+ </div>
836
+ </div>
837
+ <?php
838
+ }
839
+
840
+
841
  ?> </div> <?php
842
  }
843
 
844
+
845
+
846
  if( $reset_query ){
847
  wp_reset_query();
848
  }
includes/elements/text.php CHANGED
@@ -23,6 +23,7 @@ function auxin_get_text_master_array( $master_array ) {
23
  'is_shortcode' => true,
24
  'is_so' => true,
25
  'is_vc' => true,
 
26
  'category' => THEME_NAME,
27
  'group' => '',
28
  'admin_enqueue_js' => '',
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' => '',
includes/general-hooks.php CHANGED
@@ -927,3 +927,22 @@ if( ! defined('WPSEO_VERSION') && ! class_exists('All_in_One_SEO_Pack') ){
927
  }
928
 
929
  /*-----------------------------------------------------------------------------------*/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
927
  }
928
 
929
  /*-----------------------------------------------------------------------------------*/
930
+ /* Add SiteOrigin class prefix and custom field classes path
931
+ /*-----------------------------------------------------------------------------------*/
932
+ if ( auxin_is_plugin_active( 'so-widgets-bundle/so-widgets-bundle.php') ) {
933
+
934
+ function register_auxin_siteorigin_class_prefix( $class_prefixes ) {
935
+ $class_prefixes[] = 'Auxin_SiteOrigin_Field_';
936
+ return $class_prefixes;
937
+ }
938
+
939
+ add_filter( 'siteorigin_widgets_field_class_prefixes', 'register_auxin_siteorigin_class_prefix' );
940
+
941
+
942
+ function register_custom_fields( $class_paths ) {
943
+ $class_paths[] = AUXELS_ADMIN_DIR . '/includes/compatibility/siteorigin/fields/';
944
+ return $class_paths;
945
+ }
946
+
947
+ add_filter( 'siteorigin_widgets_field_class_paths', 'register_custom_fields' );
948
+ }
includes/general-shortcodes.php CHANGED
@@ -364,3 +364,32 @@ function auxin_shortcode_timeline( $atts, $content = null ) {
364
  return ob_get_clean();
365
  }
366
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
364
  return ob_get_clean();
365
  }
366
 
367
+
368
+ /**
369
+ * Adds aux_row shortcode for adding row for columns
370
+ */
371
+ function auxin_aux_row_shortcode( $atts , $content = null ) {
372
+
373
+ // parse attributes
374
+ $atts = shortcode_atts(
375
+ array(
376
+ 'columns' => 2
377
+ ),
378
+ $atts,
379
+ 'aux_row'
380
+ );
381
+
382
+ // Return code
383
+ return '<div class="aux-row aux-col'. $atts['columns'] .'">'. do_shortcode( $content ) .'</div>';
384
+ }
385
+ add_shortcode( 'aux_row', 'auxin_aux_row_shortcode' );
386
+
387
+
388
+ /**
389
+ * Adds aux_col shortcode for adding simple column shortcode for layout purposes
390
+ */
391
+ function auxin_aux_col_shortcode( $atts , $content = null ) {
392
+ // Return code
393
+ return '<div class="aux-col">'. do_shortcode( $content ) .'</div>';
394
+ }
395
+ add_shortcode( 'aux_col', 'auxin_aux_col_shortcode' );