Shortcodes and extra features for Phlox theme - Version 1.5.2

Version Description

Download this release

Release Info

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

Code changes from version 1.5.0 to 1.5.2

Files changed (43) hide show
  1. README.txt +6 -1
  2. admin/includes/admin-hooks.php +15 -19
  3. auxin-elements.php +2 -6
  4. includes/classes/class-auxin-widget-shortcode-map.php +4 -0
  5. includes/classes/class-auxin-widget.php +20 -38
  6. includes/define.php +1 -1
  7. includes/elements/about-widget.php +1 -1
  8. includes/elements/accordion.php +1 -1
  9. includes/elements/audio.php +1 -1
  10. includes/elements/before-after.php +1 -1
  11. includes/elements/button.php +1 -1
  12. includes/elements/code.php +1 -1
  13. includes/elements/contact-box.php +1 -1
  14. includes/elements/contact-form.php +1 -1
  15. includes/elements/divider.php +1 -1
  16. includes/elements/dropcap.php +1 -1
  17. includes/elements/facebook.php +1 -1
  18. includes/elements/flickr.php +1 -1
  19. includes/elements/gallery.php +1 -1
  20. includes/elements/gmap.php +1 -1
  21. includes/elements/highlight.php +1 -1
  22. includes/elements/image.php +1 -1
  23. includes/elements/instagram-feed.php +1 -1
  24. includes/elements/latest-posts-slider.php +4 -4
  25. includes/elements/popular-posts-widget.php +1 -1
  26. includes/elements/quote.php +1 -1
  27. includes/elements/recent-posts-grid-carousel.php +57 -67
  28. includes/elements/recent-posts-land-style.php +63 -6
  29. includes/elements/recent-posts-masonry.php +68 -62
  30. includes/elements/recent-posts-tiles.php +74 -22
  31. includes/elements/recent-posts-timeline.php +65 -10
  32. includes/elements/recent-posts-widget.php +1 -1
  33. includes/elements/search.php +1 -1
  34. includes/elements/socials-list.php +1 -1
  35. includes/elements/staff.php +654 -0
  36. includes/elements/tabs.php +1 -1
  37. includes/elements/text.php +1 -1
  38. includes/elements/touch-slider.php +1 -1
  39. includes/elements/video.php +1 -1
  40. includes/general-functions.php +446 -2
  41. includes/general-hooks.php +10 -0
  42. includes/index.php +1 -0
  43. public/includes/frontend-ajax.php +30 -32
README.txt CHANGED
@@ -4,9 +4,10 @@ Donate link: http://averta.net/
4
  License: GPLv3
5
  License URI: http://www.gnu.org/licenses/gpl.html
6
  Tags: banner SEO, shortcode, page-builder, siteorigin, auxin, phlox, averta, framework, widget, element, fullwidth, masonry, timeline
 
7
  Requires at least: 4.6
8
  Tested up to: 4.8.1
9
- Stable tag: 1.5.0
10
  License: GPLv3
11
  License URI: http://www.gnu.org/licenses/gpl.html
12
 
@@ -140,6 +141,10 @@ Bugs can be reported in our [support forums](http://wordpress.org/tags/auxin-ele
140
 
141
  == Changelog ==
142
 
 
 
 
 
143
  = Version 1.5.0 / (29.08.2017) =
144
  - [Fix]: Addressed a conflict with popup-maker plugin.
145
  - [Fix]: Some minor bugs in Text Element fixed.
4
  License: GPLv3
5
  License URI: http://www.gnu.org/licenses/gpl.html
6
  Tags: banner SEO, shortcode, page-builder, siteorigin, auxin, phlox, averta, framework, widget, element, fullwidth, masonry, timeline
7
+ Requires PHP: 5.3
8
  Requires at least: 4.6
9
  Tested up to: 4.8.1
10
+ Stable tag: 1.5.2
11
  License: GPLv3
12
  License URI: http://www.gnu.org/licenses/gpl.html
13
 
141
 
142
  == Changelog ==
143
 
144
+ = Version 1.5.2 / (18.09.2017) =
145
+ - [New]: Load more option and button for blog elements.
146
+ - [Fix]: Fixing the category field option in blog elements.
147
+
148
  = Version 1.5.0 / (29.08.2017) =
149
  - [Fix]: Addressed a conflict with popup-maker plugin.
150
  - [Fix]: Some minor bugs in Text Element fixed.
admin/includes/admin-hooks.php CHANGED
@@ -54,45 +54,41 @@ add_action('admin_enqueue_scripts', 'auxin_register_mce_buttons_style');
54
 
55
  function auxin_welcome_page_display_section_demos(){
56
  // all the demos information should add into this array
57
- $data = get_transient( 'auxin_get_demo' );
58
 
59
- if ( empty( $data ) ){
60
 
61
- $request = wp_remote_get( 'http://api.averta.net/products/themes/demos' );
62
 
63
  if( is_wp_error( $request ) ) {
64
-
65
  return false;
66
-
67
  }
68
 
69
  $body = wp_remote_retrieve_body( $request );
70
- $data = json_decode($body);
71
-
72
- set_transient( 'auxin_get_demo', $data, DAY_IN_SECONDS );
73
 
 
74
  }
75
 
76
  ?>
77
- <h2 class="aux-featur"><?php _e('Choose the demo you want.', 'auxin-elements'); ?></h2>
78
- <h4 class="aux-featur demos-subtitle"><?php _e('Please note that, it is recommended to import a demo on a clean WordPress installation.', 'auxin-elements'); ?></h4>
79
  <div class="changelog feature-section three-col">
80
- <?php foreach ($data as $demo) {
81
- ?>
82
- <div class="col" id="<?php echo $demo->site_id ?>">
83
- <img class="demos-img" src="<?php echo $demo->thumbnail ; ?>" alt="<?php echo $demo->title ; ?>">
84
- <h3><?php echo $demo->title ; ?></h3>
85
  <p><?php echo $demo->excerpt ; ?></p>
86
 
87
- <a href="<?php echo $demo->url ; ?>" class="button button-primary aux-button" target="_blank"><?php _e('Preview', 'auxin-elements'); ?></a>
88
  <a href="" class="button button-primary aux-button import-demo">
89
  <?php _e( 'Import Demo', 'auxin-elements' ); ?>
90
  </a>
91
  </div>
92
- <?php }?>
93
-
94
- </div> <?php
95
 
 
 
96
  }
97
 
98
  function auxin_welcome_add_section_demos( $sections ){
54
 
55
  function auxin_welcome_page_display_section_demos(){
56
  // all the demos information should add into this array
57
+ $demo_list = get_transient( 'auxin_'. THEME_ID .'_demo_list' );
58
 
59
+ if ( empty( $demo_list ) ){
60
 
61
+ $request = wp_remote_get( 'http://averta.net/phlox/wordpress-theme/demo/wp-content/list.json' );
62
 
63
  if( is_wp_error( $request ) ) {
 
64
  return false;
 
65
  }
66
 
67
  $body = wp_remote_retrieve_body( $request );
68
+ $demo_list = json_decode( $body );
 
 
69
 
70
+ set_transient( 'auxin_'. THEME_ID .'_demo_list', $demo_list, DAY_IN_SECONDS );
71
  }
72
 
73
  ?>
74
+ <h2 class="aux-featur"><?php esc_html_e( 'Choose the demo you want.', 'auxin-elements' ); ?></h2>
75
+ <h4 class="aux-featur demos-subtitle"><?php esc_html_e('Please note that, it is recommended to import a demo on a clean WordPress installation.', 'auxin-elements'); ?></h4>
76
  <div class="changelog feature-section three-col">
77
+ <?php foreach ( $demo_list as $demo ) { ?>
78
+ <div class="col" id="<?php echo esc_attr( $demo->site_id ); ?>">
79
+ <img class="demos-img" src="<?php echo esc_url( $demo->thumbnail ) ; ?>" alt="<?php echo esc_attr( $demo->title ); ?>">
80
+ <h3><?php echo esc_html( $demo->title ); ?></h3>
 
81
  <p><?php echo $demo->excerpt ; ?></p>
82
 
83
+ <a href="<?php echo esc_url( $demo->url ); ?>" class="button button-primary aux-button" target="_blank"><?php esc_html_e('Preview', 'auxin-elements'); ?></a>
84
  <a href="" class="button button-primary aux-button import-demo">
85
  <?php _e( 'Import Demo', 'auxin-elements' ); ?>
86
  </a>
87
  </div>
88
+ <?php } ?>
 
 
89
 
90
+ </div>
91
+ <?php
92
  }
93
 
94
  function auxin_welcome_add_section_demos( $sections ){
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.5.0
16
  * Author: averta
17
  * Author URI: http://averta.net
18
  * Text Domain: auxin-elements
@@ -68,16 +68,12 @@ 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.6.25', // 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
  )
75
  ),
76
 
77
- 'php' => array(
78
- 'version' => '5.3.0' // The minimum PHP version for this plugin, otherwise, throw a notice
79
- ),
80
-
81
  'config' => array(
82
  'plugin_name' => __('Phlox Core Elements', 'auxin-elements'), // Current plugin name.
83
  'plugin_basename' => plugin_basename( __FILE__ ),
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.5.2
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.7.1', // 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
  )
75
  ),
76
 
 
 
 
 
77
  'config' => array(
78
  'plugin_name' => __('Phlox Core Elements', 'auxin-elements'), // Current plugin name.
79
  'plugin_basename' => plugin_basename( __FILE__ ),
includes/classes/class-auxin-widget-shortcode-map.php CHANGED
@@ -238,6 +238,10 @@ class Auxin_Widget_Shortcode_Map {
238
  if( isset( $param['dependency'] ) ) {
239
  $widget_params['dependency'] = $param['dependency'];
240
  }
 
 
 
 
241
  // TODO: It shoould convert to array an array when dependency js writes
242
  // $widget_params['dependency'] = array( $param['dependency'] );
243
 
238
  if( isset( $param['dependency'] ) ) {
239
  $widget_params['dependency'] = $param['dependency'];
240
  }
241
+ // special param for aux_taxonomy field type
242
+ if( isset( $param['taxonomy'] ) ) {
243
+ $widget_params['taxonomy'] = $param['taxonomy'];
244
+ }
245
  // TODO: It shoould convert to array an array when dependency js writes
246
  // $widget_params['dependency'] = array( $param['dependency'] );
247
 
includes/classes/class-auxin-widget.php CHANGED
@@ -21,7 +21,7 @@ if( ! class_exists( 'Auxin_Widget' ) ) :
21
 
22
  class Auxin_Widget extends WP_Widget {
23
 
24
- private $defaults = array();
25
  public $fields = array();
26
 
27
  public $widget_fun_name;
@@ -108,6 +108,7 @@ class Auxin_Widget extends WP_Widget {
108
  'hide_empty' => true
109
  ));
110
 
 
111
  $categories_list = array( ' ' => __('All Categories', 'auxin-elements' ) ) ;
112
  foreach ( $categories as $key => $value ) {
113
  $categories_list[ $value->term_id ] = $value->name;
@@ -122,7 +123,7 @@ class Auxin_Widget extends WP_Widget {
122
  echo '<div class="aux-element-field aux-multiple-selector ">',
123
  '<label for="'.$this->get_field_id($id).'" >'.$field["name"].'</label>',
124
  '<select multiple="multiple" name="' . $this->get_field_name($id) . '" id="' . $this->get_field_name($id) . '" class="aux-orig-select2 aux-admin-select2 aux-select2-multiple">';
125
- $output .= '<option value="">' . __('Choose ..', 'auxin-elements') . '</option>';
126
 
127
  foreach ( $categories_list as $key => $value ) {
128
  printf(
@@ -193,14 +194,19 @@ class Auxin_Widget extends WP_Widget {
193
 
194
  case 'dropdown':
195
  case 'select':
 
 
 
 
 
196
  echo '<div class="aux-element-field aux-dropdown">',
197
  '<label for="'.$this->get_field_id( $id ).'" >'. $field['name']. '</label>',
198
- '<select name="' .$this->get_field_name( $id ) . '" id="' . $this->get_field_id( $id ) . '" value="' . $instance[$id] . '" >';
199
  foreach ( $field['options'] as $key => $value ) {
200
- echo '<option value="'.$key.'" '.selected( $instance[$id], $key, false ).' >'. $value. '</option>';
201
  }
202
-
203
  echo '</select>';
 
204
  if ( $field["description"] ) {
205
  echo '<p class="option-description">' . $field["description"] . '</p>';
206
  }
@@ -209,12 +215,17 @@ class Auxin_Widget extends WP_Widget {
209
 
210
  // Select2 single
211
  case 'aux_select2_single' :
 
 
 
 
 
212
  echo '<div class="aux-element-field aux-multiple-selector ">',
213
  '<label for="'.$this->get_field_id($id).'" >'.$field["name"].'</label>',
214
  '<div class="section-row-right" >' ,
215
- '<select name="'.$this->get_field_name($id).'" id="'.$this->get_field_id($id).'" class="aux-orig-select2 aux-admin-select2 aux-select2-single" data-value="' . $instance[$id] . '" value="' . $instance[$id] . '" style="width:150px" >';
216
  foreach ( $field['options'] as $key => $value ) {
217
- echo '<option value="'.$key.'" '.selected( $instance[$id], $key, false ).' >'. $value. '</option>';
218
  }
219
  echo '</select></div>';
220
  if ( $field["description"] ) {
@@ -227,9 +238,7 @@ class Auxin_Widget extends WP_Widget {
227
  case 'aux_select2_multiple' :
228
 
229
  if( gettype( $instance[ $id ] ) ==="string" ) {
230
-
231
  $select = explode( ',', $instance[ $id ] );
232
-
233
  }
234
 
235
  $output = '';
@@ -237,10 +246,8 @@ class Auxin_Widget extends WP_Widget {
237
  $output .= '<select multiple="multiple" name="' . esc_sql( $field['id'] ) . '" style="width:100%" ' . ' class="wpb-multiselect wpb_vc_param_value aux-select2-multiple ' . esc_sql( $field['id'] ) . ' ' . $field['type'] . '_field" '. '>';
238
 
239
  foreach ( $field['options'] as $key => $value ) {
240
-
241
  $active_attr = in_array( $key, $select) ? 'selected="selected"' : '';
242
  $output .= sprintf( '<option value="%s" %s >%s</option>', $key, $active_attr, $value );
243
-
244
  }
245
 
246
  $output .= '</select>';
@@ -249,7 +256,7 @@ class Auxin_Widget extends WP_Widget {
249
 
250
  $output .= '<p class="option-description">' . $field["description"] . '</p>';
251
  }
252
-
253
  $output .= '</div>' ;
254
  echo $output;
255
 
@@ -259,7 +266,7 @@ class Auxin_Widget extends WP_Widget {
259
  $output = '<div class="aux-element-field aux-visual-selector">';
260
  $output .= '<label for="'.$this->get_field_id($id).'" >'.$field["name"].'</label>';
261
  $output .= '<select class="meta-select visual-select-wrapper" name="' . $this->get_field_name( $id ) . '" id="' . $this->get_field_id( $id ) . '" value="' . $instance[$id] . '" >';
262
- // TODO: I don't know why $instance[$id] is null or empty inside below loop
263
  $tmp_instance_id = $instance[$id];
264
  foreach ( $field['choices'] as $id => $option_info ) {
265
  $active_attr = ( $tmp_instance_id == $id ) ? ' selected ' : "";
@@ -433,33 +440,8 @@ class Auxin_Widget extends WP_Widget {
433
  unset( $depend['callback'] );
434
 
435
  $field_dependencies[ $depend['element'] ] = array( 'value' => (array)$depend['value'] );
436
-
437
- // if( isset( $depend['callback'] ) ) {
438
- // $field_dependencies[ $depend['element'] ]['callback'] = $depend['callback'];
439
- // }
440
  }
441
 
442
-
443
- /* if there was a list of dependencies
444
-
445
- $dependencies = (array) $field['dependency'];
446
-
447
- foreach ( $dependencies as $depend_id => $depend ) {
448
-
449
- if( 'relation' === $depend_id ) {
450
- $field_dependencies[ $depend_id ] = $depend;
451
- continue;
452
- }
453
-
454
- if( ! isset( $depend['element'] ) || ! ( isset( $depend['value'] ) && ! empty( $depend['value'] ) ) ){ continue; }
455
-
456
- $field_dependencies[ $depend['element'] ] = array( 'value' => (array)$depend['value'] );
457
-
458
- if( isset( $depend['callback'] ) ) {
459
- $field_dependencies[ $depend['element'] ]['callback'] = $depend['callback'];
460
- }
461
- }
462
- */
463
  }
464
 
465
  if( $field_dependencies ){
21
 
22
  class Auxin_Widget extends WP_Widget {
23
 
24
+ private $defaults = array();
25
  public $fields = array();
26
 
27
  public $widget_fun_name;
108
  'hide_empty' => true
109
  ));
110
 
111
+
112
  $categories_list = array( ' ' => __('All Categories', 'auxin-elements' ) ) ;
113
  foreach ( $categories as $key => $value ) {
114
  $categories_list[ $value->term_id ] = $value->name;
123
  echo '<div class="aux-element-field aux-multiple-selector ">',
124
  '<label for="'.$this->get_field_id($id).'" >'.$field["name"].'</label>',
125
  '<select multiple="multiple" name="' . $this->get_field_name($id) . '" id="' . $this->get_field_name($id) . '" class="aux-orig-select2 aux-admin-select2 aux-select2-multiple">';
126
+ echo '<option value="">' . __('Choose ..', 'auxin-elements') . '</option>';
127
 
128
  foreach ( $categories_list as $key => $value ) {
129
  printf(
194
 
195
  case 'dropdown':
196
  case 'select':
197
+ if( is_array( $instance[$id] ) ){
198
+ $current_value = ! empty( $instance['def_value'] ) ? $instance['def_value'] : array_keys( $instance[ $id ] )[0];
199
+ } else {
200
+ $current_value = $instance[ $id ];
201
+ }
202
  echo '<div class="aux-element-field aux-dropdown">',
203
  '<label for="'.$this->get_field_id( $id ).'" >'. $field['name']. '</label>',
204
+ '<select name="' .$this->get_field_name( $id ) . '" id="' . $this->get_field_id( $id ) . '" value="' . $current_value . '" >';
205
  foreach ( $field['options'] as $key => $value ) {
206
+ printf( '<option value="%s" %s >%s</option>', $key, selected( $current_value, $key, false ), $value );
207
  }
 
208
  echo '</select>';
209
+
210
  if ( $field["description"] ) {
211
  echo '<p class="option-description">' . $field["description"] . '</p>';
212
  }
215
 
216
  // Select2 single
217
  case 'aux_select2_single' :
218
+ if( is_array( $instance[$id] ) ){
219
+ $current_value = ! empty( $instance['def_value'] ) ? $instance['def_value'] : array_keys( $instance[ $id ] )[0];
220
+ } else {
221
+ $current_value = $instance[ $id ];
222
+ }
223
  echo '<div class="aux-element-field aux-multiple-selector ">',
224
  '<label for="'.$this->get_field_id($id).'" >'.$field["name"].'</label>',
225
  '<div class="section-row-right" >' ,
226
+ '<select name="'.$this->get_field_name($id).'" id="'.$this->get_field_id($id).'" class="aux-orig-select2 aux-admin-select2 aux-select2-single" data-value="'.$current_value.'" value="'. $current_value .'" style="width:150px" >';
227
  foreach ( $field['options'] as $key => $value ) {
228
+ printf( '<option value="%s" %s >%s</option>', $key, selected( $current_value, $key, false ), $value );
229
  }
230
  echo '</select></div>';
231
  if ( $field["description"] ) {
238
  case 'aux_select2_multiple' :
239
 
240
  if( gettype( $instance[ $id ] ) ==="string" ) {
 
241
  $select = explode( ',', $instance[ $id ] );
 
242
  }
243
 
244
  $output = '';
246
  $output .= '<select multiple="multiple" name="' . esc_sql( $field['id'] ) . '" style="width:100%" ' . ' class="wpb-multiselect wpb_vc_param_value aux-select2-multiple ' . esc_sql( $field['id'] ) . ' ' . $field['type'] . '_field" '. '>';
247
 
248
  foreach ( $field['options'] as $key => $value ) {
 
249
  $active_attr = in_array( $key, $select) ? 'selected="selected"' : '';
250
  $output .= sprintf( '<option value="%s" %s >%s</option>', $key, $active_attr, $value );
 
251
  }
252
 
253
  $output .= '</select>';
256
 
257
  $output .= '<p class="option-description">' . $field["description"] . '</p>';
258
  }
259
+
260
  $output .= '</div>' ;
261
  echo $output;
262
 
266
  $output = '<div class="aux-element-field aux-visual-selector">';
267
  $output .= '<label for="'.$this->get_field_id($id).'" >'.$field["name"].'</label>';
268
  $output .= '<select class="meta-select visual-select-wrapper" name="' . $this->get_field_name( $id ) . '" id="' . $this->get_field_id( $id ) . '" value="' . $instance[$id] . '" >';
269
+
270
  $tmp_instance_id = $instance[$id];
271
  foreach ( $field['choices'] as $id => $option_info ) {
272
  $active_attr = ( $tmp_instance_id == $id ) ? ' selected ' : "";
440
  unset( $depend['callback'] );
441
 
442
  $field_dependencies[ $depend['element'] ] = array( 'value' => (array)$depend['value'] );
 
 
 
 
443
  }
444
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
445
  }
446
 
447
  if( $field_dependencies ){
includes/define.php CHANGED
@@ -12,7 +12,7 @@ if( ! defined( 'THEME_NAME' ) ){
12
  }
13
 
14
 
15
- define( 'AUXELS_VERSION' , '1.5.0' );
16
 
17
  define( 'AUXELS_SLUG' , 'auxin-elements' );
18
 
12
  }
13
 
14
 
15
+ define( 'AUXELS_VERSION' , '1.5.2' );
16
 
17
  define( 'AUXELS_SLUG' , 'auxin-elements' );
18
 
includes/elements/about-widget.php CHANGED
@@ -13,7 +13,7 @@
13
  function get_auxin_about_widget( $master_array ) {
14
 
15
  $master_array['aux_about_widget'] = array(
16
- 'name' => __("[Phlox] About Author", 'auxin-elements' ),
17
  'auxin_output_callback' => 'auxin_widget_about_callback',
18
  'base' => 'aux_about_widget',
19
  'description' => __('It adds an about author element.', 'auxin-elements' ),
13
  function get_auxin_about_widget( $master_array ) {
14
 
15
  $master_array['aux_about_widget'] = array(
16
+ 'name' => __("About Author", 'auxin-elements' ),
17
  'auxin_output_callback' => 'auxin_widget_about_callback',
18
  'base' => 'aux_about_widget',
19
  'description' => __('It adds an about author element.', 'auxin-elements' ),
includes/elements/accordion.php CHANGED
@@ -13,7 +13,7 @@
13
  function auxin_get_new_accordion_master_array( $master_array ) {
14
 
15
  $master_array['aux_accordion'] = array(
16
- 'name' => __('[Phlox] Accordion ', 'auxin-elements'),
17
  'auxin_output_callback' => 'auxin_widget_accordion_callback',
18
  'base' => 'aux_accordion',
19
  'description' => __('Collapsible content', 'auxin-elements'),
13
  function auxin_get_new_accordion_master_array( $master_array ) {
14
 
15
  $master_array['aux_accordion'] = array(
16
+ 'name' => __('Accordion ', 'auxin-elements'),
17
  'auxin_output_callback' => 'auxin_widget_accordion_callback',
18
  'base' => 'aux_accordion',
19
  'description' => __('Collapsible content', 'auxin-elements'),
includes/elements/audio.php CHANGED
@@ -12,7 +12,7 @@
12
  function auxin_get_audio_master_array( $master_array ) {
13
 
14
  $master_array['aux_audio'] = array(
15
- 'name' => __("[Phlox] Audio", 'auxin-elements' ),
16
  'auxin_output_callback' => 'auxin_widget_audio_callback',
17
  'base' => 'aux_audio',
18
  'description' => __('Audio player', 'auxin-elements' ),
12
  function auxin_get_audio_master_array( $master_array ) {
13
 
14
  $master_array['aux_audio'] = array(
15
+ 'name' => __("Audio", 'auxin-elements' ),
16
  'auxin_output_callback' => 'auxin_widget_audio_callback',
17
  'base' => 'aux_audio',
18
  'description' => __('Audio player', 'auxin-elements' ),
includes/elements/before-after.php CHANGED
@@ -12,7 +12,7 @@
12
  function auxin_get_before_after_master_array( $master_array ) {
13
 
14
  $master_array['aux_before_after'] = array(
15
- 'name' => __("[Phlox] Before After Slider", 'auxin-elements' ),
16
  'auxin_output_callback' => 'auxin_widget_before_after_callback',
17
  'base' => 'aux_before_after',
18
  'description' => __('Before after comparison slider.', 'auxin-elements' ),
12
  function auxin_get_before_after_master_array( $master_array ) {
13
 
14
  $master_array['aux_before_after'] = array(
15
+ 'name' => __("Before After Slider", 'auxin-elements' ),
16
  'auxin_output_callback' => 'auxin_widget_before_after_callback',
17
  'base' => 'aux_before_after',
18
  'description' => __('Before after comparison slider.', 'auxin-elements' ),
includes/elements/button.php CHANGED
@@ -13,7 +13,7 @@
13
  function auxin_get_button_master_array( $master_array ) {
14
 
15
  $master_array['aux_button'] = array(
16
- 'name' => __("[Phlox] Button", 'auxin-elements' ),
17
  'auxin_output_callback' => 'auxin_widget_button_callback',
18
  'base' => 'aux_button',
19
  'description' => __('It adds a button element.', 'auxin-elements' ),
13
  function auxin_get_button_master_array( $master_array ) {
14
 
15
  $master_array['aux_button'] = array(
16
+ 'name' => __("Button", 'auxin-elements' ),
17
  'auxin_output_callback' => 'auxin_widget_button_callback',
18
  'base' => 'aux_button',
19
  'description' => __('It adds a button element.', 'auxin-elements' ),
includes/elements/code.php CHANGED
@@ -13,7 +13,7 @@
13
  function auxin_get_code_master_array( $master_array ) {
14
 
15
  $master_array['aux_code'] = array(
16
- 'name' => __('[Phlox] Code', 'auxin-elements' ),
17
  'auxin_output_callback' => 'auxin_widget_code_callback',
18
  'base' => 'aux_code',
19
  'description' => __('It adds a code element.', 'auxin-elements' ),
13
  function auxin_get_code_master_array( $master_array ) {
14
 
15
  $master_array['aux_code'] = array(
16
+ 'name' => __('Code', 'auxin-elements' ),
17
  'auxin_output_callback' => 'auxin_widget_code_callback',
18
  'base' => 'aux_code',
19
  'description' => __('It adds a code element.', 'auxin-elements' ),
includes/elements/contact-box.php CHANGED
@@ -13,7 +13,7 @@
13
  function get_auxin_contact_box( $master_array ) {
14
 
15
  $master_array['aux_contact_box'] = array(
16
- 'name' => __("[Phlox] Contact Box", 'auxin-elements' ),
17
  'auxin_output_callback' => 'auxin_widget_contact_box',
18
  'base' => 'aux_contact_box',
19
  'description' => __('It adds a contact box element.', 'auxin-elements'),
13
  function get_auxin_contact_box( $master_array ) {
14
 
15
  $master_array['aux_contact_box'] = array(
16
+ 'name' => __("Contact Box", 'auxin-elements' ),
17
  'auxin_output_callback' => 'auxin_widget_contact_box',
18
  'base' => 'aux_contact_box',
19
  'description' => __('It adds a contact box element.', 'auxin-elements'),
includes/elements/contact-form.php CHANGED
@@ -13,7 +13,7 @@
13
  function auxin_get_contact_form_master_array( $master_array ) {
14
 
15
  $master_array['aux_contact_form'] = array(
16
- 'name' => __('[Phlox] Contact Form', 'auxin-elements' ),
17
  'auxin_output_callback' => 'auxin_widget_contact_form_callback',
18
  'base' => 'aux_contact_form',
19
  'description' => __('It adds a contact form element.', 'auxin-elements' ),
13
  function auxin_get_contact_form_master_array( $master_array ) {
14
 
15
  $master_array['aux_contact_form'] = array(
16
+ 'name' => __('Contact Form', 'auxin-elements' ),
17
  'auxin_output_callback' => 'auxin_widget_contact_form_callback',
18
  'base' => 'aux_contact_form',
19
  'description' => __('It adds a contact form element.', 'auxin-elements' ),
includes/elements/divider.php CHANGED
@@ -13,7 +13,7 @@
13
  function auxin_get_divider_master_array( $master_array ) {
14
 
15
  $master_array['aux_divider'] = array(
16
- 'name' => __('[Phlox] Divider', 'auxin-elements' ),
17
  'auxin_output_callback' => 'auxin_widget_divider_callback',
18
  'base' => 'aux_divider',
19
  'description' => __('Horizontal seperator', 'auxin-elements'),
13
  function auxin_get_divider_master_array( $master_array ) {
14
 
15
  $master_array['aux_divider'] = array(
16
+ 'name' => __('Divider', 'auxin-elements' ),
17
  'auxin_output_callback' => 'auxin_widget_divider_callback',
18
  'base' => 'aux_divider',
19
  'description' => __('Horizontal seperator', 'auxin-elements'),
includes/elements/dropcap.php CHANGED
@@ -12,7 +12,7 @@
12
  function auxin_get_dropcap_master_array( $master_array ) {
13
 
14
  $master_array['aux_dropcap'] = array(
15
- 'name' => __("[Phlox] Dropcap", 'auxin-elements' ),
16
  'auxin_output_callback' => 'auxin_widget_dropcap_callback',
17
  'base' => 'aux_dropcap',
18
  'description' => __('Big styled character at the beginning of paragraph', 'auxin-elements' ),
12
  function auxin_get_dropcap_master_array( $master_array ) {
13
 
14
  $master_array['aux_dropcap'] = array(
15
+ 'name' => __("Dropcap", 'auxin-elements' ),
16
  'auxin_output_callback' => 'auxin_widget_dropcap_callback',
17
  'base' => 'aux_dropcap',
18
  'description' => __('Big styled character at the beginning of paragraph', 'auxin-elements' ),
includes/elements/facebook.php CHANGED
@@ -13,7 +13,7 @@
13
  function auxin_get_facebook_master_array( $master_array ) {
14
 
15
  $master_array['aux_facebook'] = array(
16
- 'name' => __('[Phlox] Custom Facebook Feed', 'auxin-elements' ),
17
  'auxin_output_callback' => 'auxin_widget_facebook_callback',
18
  'base' => 'aux_facebook',
19
  'description' => __('It uses Custom Facebook Feed plugin.', 'auxin-elements'),
13
  function auxin_get_facebook_master_array( $master_array ) {
14
 
15
  $master_array['aux_facebook'] = array(
16
+ 'name' => __('Custom Facebook Feed', 'auxin-elements' ),
17
  'auxin_output_callback' => 'auxin_widget_facebook_callback',
18
  'base' => 'aux_facebook',
19
  'description' => __('It uses Custom Facebook Feed plugin.', 'auxin-elements'),
includes/elements/flickr.php CHANGED
@@ -13,7 +13,7 @@
13
  function auxin_get_flickr_master_array( $master_array ) {
14
 
15
  $master_array['aux_flickr'] = array(
16
- 'name' => __('[Phlox] Flickr Justified Gallery', 'auxin-elements' ),
17
  'auxin_output_callback' => 'auxin_widget_flickr_callback',
18
  'base' => 'aux_flickr',
19
  'description' => __('It uses Flickr Justified Gallery plugin.', 'auxin-elements'),
13
  function auxin_get_flickr_master_array( $master_array ) {
14
 
15
  $master_array['aux_flickr'] = array(
16
+ 'name' => __('Flickr Justified Gallery', 'auxin-elements' ),
17
  'auxin_output_callback' => 'auxin_widget_flickr_callback',
18
  'base' => 'aux_flickr',
19
  'description' => __('It uses Flickr Justified Gallery plugin.', 'auxin-elements'),
includes/elements/gallery.php CHANGED
@@ -12,7 +12,7 @@
12
  function auxin_get_gallery_master_array( $master_array ) {
13
 
14
  $master_array['aux_gallery'] = array(
15
- 'name' => __('[Phlox] Gallery', 'auxin-elements'),
16
  'auxin_output_callback' => 'auxin_widget_gallery_callback',
17
  'base' => 'aux_gallery',
18
  'description' => __('Filterable and grid gallery with lightbox', 'auxin-elements'),
12
  function auxin_get_gallery_master_array( $master_array ) {
13
 
14
  $master_array['aux_gallery'] = array(
15
+ 'name' => __('Gallery', 'auxin-elements'),
16
  'auxin_output_callback' => 'auxin_widget_gallery_callback',
17
  'base' => 'aux_gallery',
18
  'description' => __('Filterable and grid gallery with lightbox', 'auxin-elements'),
includes/elements/gmap.php CHANGED
@@ -12,7 +12,7 @@
12
  function auxin_get_gmap_master_array( $master_array ) {
13
 
14
  $master_array['aux_gmaps'] = array(
15
- 'name' => __('[Phlox] Map ', 'auxin-elements' ),
16
  'auxin_output_callback' => 'auxin_widget_gmaps_callback',
17
  'base' => 'aux_gmaps',
18
  'description' => __('Google map block', 'auxin-elements' ),
12
  function auxin_get_gmap_master_array( $master_array ) {
13
 
14
  $master_array['aux_gmaps'] = array(
15
+ 'name' => __('Map ', 'auxin-elements' ),
16
  'auxin_output_callback' => 'auxin_widget_gmaps_callback',
17
  'base' => 'aux_gmaps',
18
  'description' => __('Google map block', 'auxin-elements' ),
includes/elements/highlight.php CHANGED
@@ -12,7 +12,7 @@
12
  function auxin_get_highlight_master_array( $master_array ) {
13
 
14
  $master_array['aux_highlight'] = array(
15
- 'name' => __("[Phlox] Highlight", 'auxin-elements' ),
16
  'auxin_output_callback' => 'auxin_widget_highlight_callback',
17
  'base' => 'aux_highlight',
18
  'description' => __('Highlighted Text', 'auxin-elements' ),
12
  function auxin_get_highlight_master_array( $master_array ) {
13
 
14
  $master_array['aux_highlight'] = array(
15
+ 'name' => __("Highlight", 'auxin-elements' ),
16
  'auxin_output_callback' => 'auxin_widget_highlight_callback',
17
  'base' => 'aux_highlight',
18
  'description' => __('Highlighted Text', 'auxin-elements' ),
includes/elements/image.php CHANGED
@@ -12,7 +12,7 @@
12
  function auxin_get_image_master_array( $master_array ) {
13
 
14
  $master_array['aux_image'] = array(
15
- 'name' => __("[Phlox] Image", 'auxin-elements' ),
16
  'auxin_output_callback' => 'auxin_widget_image_callback',
17
  'base' => 'aux_image',
18
  'description' => __('Image with lightbox option', 'auxin-elements' ),
12
  function auxin_get_image_master_array( $master_array ) {
13
 
14
  $master_array['aux_image'] = array(
15
+ 'name' => __("Image", 'auxin-elements' ),
16
  'auxin_output_callback' => 'auxin_widget_image_callback',
17
  'base' => 'aux_image',
18
  'description' => __('Image with lightbox option', 'auxin-elements' ),
includes/elements/instagram-feed.php CHANGED
@@ -12,7 +12,7 @@
12
  function auxin_get_instagram_master_array( $master_array ) {
13
 
14
  $master_array['aux_instagram_feed'] = array( // shortcode info here
15
- 'name' => __("[Phlox] instagram feed", 'auxin-elements' ),
16
  'auxin_output_callback' => 'auxin_widget_instagram_feed_callback',
17
  'base' => 'aux_instagram_feed',
18
  'description' => __('It adds an instagram feed element.', 'auxin-elements' ),
12
  function auxin_get_instagram_master_array( $master_array ) {
13
 
14
  $master_array['aux_instagram_feed'] = array( // shortcode info here
15
+ 'name' => __("instagram feed", 'auxin-elements' ),
16
  'auxin_output_callback' => 'auxin_widget_instagram_feed_callback',
17
  'base' => 'aux_instagram_feed',
18
  'description' => __('It adds an instagram feed element.', 'auxin-elements' ),
includes/elements/latest-posts-slider.php CHANGED
@@ -12,7 +12,7 @@
12
  function auxin_get_post_slider_master_array( $master_array ) {
13
 
14
  $master_array['aux_latest_posts_slider'] = array(
15
- 'name' => __('[Phlox] Latest Posts Slider ', 'auxin-elements' ),
16
  'auxin_output_callback' => 'auxin_latest_posts_slider_callback',
17
  'base' => 'aux_latest_posts_slider',
18
  'description' => __('Slider for latest posts.', 'auxin-elements' ),
@@ -400,7 +400,7 @@ function auxin_latest_posts_slider_callback( $atts, $shortcode_content = null ){
400
  // Defining default attributes
401
  $default_atts = array(
402
  'title' => '',
403
- 'limit_num' => '10',
404
  'order_by' => 'date',
405
  'order_dir' => 'DESC',
406
  'post_type' => 'post',
@@ -441,7 +441,7 @@ function auxin_latest_posts_slider_callback( $atts, $shortcode_content = null ){
441
  'post__in' => array_filter( explode( ',', $include ) ),
442
  'post_status' => 'publish',
443
  'image_size' => 'full',
444
- 'posts_per_page' => ( $exclude_without_image ? -1 : $limit_num ),
445
  'ignore_sticky_posts' => 1
446
  );
447
 
@@ -470,7 +470,7 @@ function auxin_latest_posts_slider_callback( $atts, $shortcode_content = null ){
470
  if( $query_res->have_posts() ): while ( $query_res->have_posts() ) : $query_res->the_post();
471
 
472
  // break the loop if it is reached to the limit
473
- if ( $exclude_without_image && $post_counter == $limit_num ) {
474
  break;
475
  } else {
476
  $post_counter ++;
12
  function auxin_get_post_slider_master_array( $master_array ) {
13
 
14
  $master_array['aux_latest_posts_slider'] = array(
15
+ 'name' => __('Latest Posts Slider ', 'auxin-elements' ),
16
  'auxin_output_callback' => 'auxin_latest_posts_slider_callback',
17
  'base' => 'aux_latest_posts_slider',
18
  'description' => __('Slider for latest posts.', 'auxin-elements' ),
400
  // Defining default attributes
401
  $default_atts = array(
402
  'title' => '',
403
+ 'slides_num' => '10',
404
  'order_by' => 'date',
405
  'order_dir' => 'DESC',
406
  'post_type' => 'post',
441
  'post__in' => array_filter( explode( ',', $include ) ),
442
  'post_status' => 'publish',
443
  'image_size' => 'full',
444
+ 'posts_per_page' => ( $exclude_without_image ? -1 : $slides_num ),
445
  'ignore_sticky_posts' => 1
446
  );
447
 
470
  if( $query_res->have_posts() ): while ( $query_res->have_posts() ) : $query_res->the_post();
471
 
472
  // break the loop if it is reached to the limit
473
+ if ( $exclude_without_image && $post_counter == $slides_num ) {
474
  break;
475
  } else {
476
  $post_counter ++;
includes/elements/popular-posts-widget.php CHANGED
@@ -20,7 +20,7 @@ function auxin_get_popular_post_widget_master_array( $master_array ) {
20
 
21
 
22
  $master_array['aux_popular_posts_widget'] = array(
23
- 'name' => __('[Phlox] Popular Posts Widget', 'auxin-elements' ),
24
  'auxin_output_callback' => 'auxin_widget_popular_post_widget_callback',
25
  'base' => 'aux_popular_posts_widget',
26
  'description' => __('Shows popular and most commented posts with thumbnail.', 'auxin-elements' ),
20
 
21
 
22
  $master_array['aux_popular_posts_widget'] = array(
23
+ 'name' => __('Popular Posts Widget', 'auxin-elements' ),
24
  'auxin_output_callback' => 'auxin_widget_popular_post_widget_callback',
25
  'base' => 'aux_popular_posts_widget',
26
  'description' => __('Shows popular and most commented posts with thumbnail.', 'auxin-elements' ),
includes/elements/quote.php CHANGED
@@ -12,7 +12,7 @@
12
  function auxin_get_quote_master_array( $master_array ) {
13
 
14
  $master_array['aux_quote'] = array(
15
- 'name' => __("[Phlox] Quote", 'auxin-elements' ),
16
  'auxin_output_callback' => 'auxin_widget_quote_callback',
17
  'base' => 'aux_quote',
18
  'description' => __('Blockquote and introduction paragraph', 'auxin-elements' ),
12
  function auxin_get_quote_master_array( $master_array ) {
13
 
14
  $master_array['aux_quote'] = array(
15
+ 'name' => __("Quote", 'auxin-elements' ),
16
  'auxin_output_callback' => 'auxin_widget_quote_callback',
17
  'base' => 'aux_quote',
18
  'description' => __('Blockquote and introduction paragraph', 'auxin-elements' ),
includes/elements/recent-posts-grid-carousel.php CHANGED
@@ -26,7 +26,7 @@ function auxin_get_recent_posts_master_array( $master_array ) {
26
 
27
 
28
  $master_array['aux_recent_posts'] = array(
29
- 'name' => __('[Phlox] Grid & Carousel Recent Posts', 'auxin-elements' ),
30
  'auxin_output_callback' => 'auxin_widget_recent_posts_callback',
31
  'base' => 'aux_recent_posts',
32
  'description' => __('It adds recent posts in grid or carousel mode.', 'auxin-elements' ),
@@ -347,6 +347,37 @@ function auxin_get_recent_posts_master_array( $master_array ) {
347
  'group' => '',
348
  'edit_field_class' => ''
349
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
350
  array(
351
  'heading' => __('Excerpt length','auxin-elements' ),
352
  'description' => __('Specify summary content in character.','auxin-elements' ),
@@ -699,8 +730,8 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
699
  'reset_query' => true,
700
  'wp_query_args' => array(), // additional wp_query args
701
  'custom_wp_query' => '',
702
- 'loadmore_type' => 'scroll', // 'next' (more button), 'scroll', 'next-prev'
703
- 'loadmore_per_page' => 12,
704
  'base' => 'aux_recent_posts',
705
  'base_class' => 'aux-widget-recent-posts'
706
  );
@@ -794,6 +825,10 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
794
 
795
  $columns_custom_styles = '';
796
 
 
 
 
 
797
  if ( in_array( $preview_mode, array( 'grid', 'grid-table' ) ) ) {
798
  // generate columns class
799
  $column_class = 'aux-match-height aux-row aux-de-col' . $desktop_cnum;
@@ -844,7 +879,7 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
844
 
845
  if( $have_posts ){
846
 
847
- echo ! $skip_wrappers ? sprintf( '<div class="%s" %s>', $column_class, $carousel_attrs ) : '';
848
 
849
  while ( $wp_query->have_posts() ) {
850
 
@@ -920,13 +955,16 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
920
  do_action( $base_class . '-template-part', $result, $post_vars, $item_class );
921
 
922
  } else {
923
- printf( '<div class="%s post-%s">', $item_class, $post->ID );
924
  include auxin_get_template_file( $template_part_file, '', $extra_template_path );
925
- echo '</div>';
926
  }
927
 
928
  }
929
 
 
 
 
930
  if ( 'carousel' == $preview_mode && 'arrows' == $carousel_navigation_control ) {
931
  ?>
932
  <div class="aux-carousel-controls">
@@ -942,12 +980,22 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
942
  <?php
943
  }
944
 
945
- // print the custom inline style if available
946
- echo $columns_custom_styles ? "<style>$columns_custom_styles</style>" : '';
 
 
 
 
 
 
 
 
 
 
947
 
948
- echo ! $skip_wrappers ? '</div>' : '';
949
  }
950
 
 
951
  if( $reset_query ){
952
  wp_reset_postdata();
953
  }
@@ -963,61 +1011,3 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
963
 
964
  return ob_get_clean();
965
  }
966
-
967
-
968
-
969
-
970
-
971
- /**
972
- * Retrieves the markup of a recent post grid
973
- *
974
- * AJAX Handler: recent-post-grid
975
- *
976
- * Sample Ajax call:
977
- (function($){
978
- $.ajax({
979
- type : "post",
980
- url : auxin.ajaxurl,
981
- data : {
982
- action : "recent-post-grid",
983
- from : 0,
984
- to : 10,
985
- nonce : ''
986
- },
987
- success: function(response){
988
- if(response.type == "success") {
989
-
990
- } else {
991
- alert("Your vote could not be added")
992
- }
993
- }
994
- });
995
- })(jQuery);
996
- */
997
-
998
-
999
- /*
1000
- $data = array(
1001
- 'blog_style' => 'timeline',
1002
- 'slider_autoscroll' => '0',
1003
- 'blog_post_per_page' => '5',
1004
- 'blog_categories' => 'development',
1005
- 'blog_post_types' => 'post',
1006
- 'blog_pagination' => 'more',
1007
- 'blog_ignore_sticky' => '',
1008
- 'is_ajax' => '0',
1009
- 'paged' => '2',
1010
- 'loading_animation' => 'move-up',
1011
- 'hide_date' => '0',
1012
- 'hide_author' => '0',
1013
- 'hide_comments' => '0',
1014
- 'hide_likes' => '0',
1015
- 'buttom' => array(
1016
- 'text' => 'Load More...',
1017
- 'style' => 'flat',
1018
- 'icon' => 'material',
1019
- 'icon_position' => 'left',
1020
- 'separator' => 'load-more'
1021
- )
1022
- );
1023
- */
26
 
27
 
28
  $master_array['aux_recent_posts'] = array(
29
+ 'name' => __('Grid & Carousel Recent Posts', 'auxin-elements' ),
30
  'auxin_output_callback' => 'auxin_widget_recent_posts_callback',
31
  'base' => 'aux_recent_posts',
32
  'description' => __('It adds recent posts in grid or carousel mode.', 'auxin-elements' ),
347
  'group' => '',
348
  'edit_field_class' => ''
349
  ),
350
+ array(
351
+ 'heading' => __('Load More Type','auxin-elements' ),
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' => '',
359
+ 'weight' => '',
360
+ 'group' => '' ,
361
+ 'edit_field_class' => '',
362
+ 'choices' => array(
363
+ '' => array(
364
+ 'label' => __('None', 'auxin-elements' ),
365
+ 'image' => AUXIN_URL . 'images/visual-select/none.svg'
366
+ ),
367
+ 'scroll' => array(
368
+ 'label' => __('Infinite Scroll', 'auxin-elements' ),
369
+ 'image' => AUXIN_URL . 'images/visual-select/button-normal.svg'
370
+ ),
371
+ 'next' => array(
372
+ 'label' => __('Next Button', 'auxin-elements' ),
373
+ 'image' => AUXIN_URL . 'images/visual-select/button-curved.svg'
374
+ ),
375
+ 'next-prev' => array(
376
+ 'label' => __('Next Prev', 'auxin-elements' ),
377
+ 'image' => AUXIN_URL . 'images/visual-select/button-rounded.svg'
378
+ )
379
+ )
380
+ ),
381
  array(
382
  'heading' => __('Excerpt length','auxin-elements' ),
383
  'description' => __('Specify summary content in character.','auxin-elements' ),
730
  'reset_query' => true,
731
  'wp_query_args' => array(), // additional wp_query args
732
  'custom_wp_query' => '',
733
+ 'loadmore_type' => '', // 'next' (more button), 'scroll', 'next-prev'
734
+ 'loadmore_per_page' => '',
735
  'base' => 'aux_recent_posts',
736
  'base_class' => 'aux-widget-recent-posts'
737
  );
825
 
826
  $columns_custom_styles = '';
827
 
828
+ if( ! empty( $loadmore_type ) ) {
829
+ $item_class .= ' aux-ajax-item';
830
+ }
831
+
832
  if ( in_array( $preview_mode, array( 'grid', 'grid-table' ) ) ) {
833
  // generate columns class
834
  $column_class = 'aux-match-height aux-row aux-de-col' . $desktop_cnum;
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
 
955
  do_action( $base_class . '-template-part', $result, $post_vars, $item_class );
956
 
957
  } else {
958
+ printf( '<div class="%s post-%s">', esc_attr( $item_class ), esc_attr( $post->ID ) );
959
  include auxin_get_template_file( $template_part_file, '', $extra_template_path );
960
+ echo '</div>';
961
  }
962
 
963
  }
964
 
965
+ // print the custom inline style if available
966
+ echo $columns_custom_styles ? "<style>$columns_custom_styles</style>" : '';
967
+
968
  if ( 'carousel' == $preview_mode && 'arrows' == $carousel_navigation_control ) {
969
  ?>
970
  <div class="aux-carousel-controls">
980
  <?php
981
  }
982
 
983
+ if( ! $skip_wrappers ) {
984
+ // End tag for aux-ajax-view wrapper
985
+ echo '</div>';
986
+ // Execute load more functionality
987
+ if( 'carousel' != $preview_mode ) {
988
+ echo auxin_get_load_more_controller( $loadmore_type );
989
+ }
990
+
991
+ } else {
992
+ // Get post counter in the query
993
+ echo '<span class="aux-post-count hidden">'.$wp_query->post_count.'</span>';
994
+ }
995
 
 
996
  }
997
 
998
+
999
  if( $reset_query ){
1000
  wp_reset_postdata();
1001
  }
1011
 
1012
  return ob_get_clean();
1013
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/elements/recent-posts-land-style.php CHANGED
@@ -26,7 +26,7 @@ function auxin_get_recent_posts_land_master_array( $master_array ) {
26
 
27
 
28
  $master_array['aux_recent_posts_land_style'] = array(
29
- 'name' => __('[Phlox] Land Style Recent Posts', 'auxin-elements' ),
30
  'auxin_output_callback' => 'auxin_widget_recent_posts_land_style_callback',
31
  'base' => 'aux_recent_posts_land_style',
32
  'description' => __('It adds recent posts in land style.', 'auxin-elements' ),
@@ -310,6 +310,37 @@ function auxin_get_recent_posts_land_master_array( $master_array ) {
310
  'group' => '',
311
  'edit_field_class' => ''
312
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
313
  array(
314
  'heading' => __('Excerpt length','auxin-elements' ),
315
  'description' => __('Specify summary content in character.','auxin-elements' ),
@@ -411,11 +442,21 @@ function auxin_widget_recent_posts_land_style_callback( $atts, $shortcode_conten
411
  'author_or_readmore' => 'readmore',
412
  'image_aspect_ratio' => 0.75,
413
  'tag' => '',
 
414
  'extra_classes' => '',
 
415
  'custom_el_id' => '',
 
 
 
 
 
416
  'reset_query' => true,
417
  'use_wp_query' => false, // true to use the global wp_query, false to use internal custom query
418
  'wp_query_args' => array(), // additional wp_query args
 
 
 
419
  'base_class' => 'aux-widget-recent-posts-land'
420
  );
421
 
@@ -497,17 +538,22 @@ function auxin_widget_recent_posts_land_style_callback( $atts, $shortcode_conten
497
 
498
  $show_comments = true; // shows comments icon
499
  $post_counter = 0;
500
- $wrapper_class = 'aux-blog-land-style';
501
  $item_class = 'aux-block';
502
  $post_classes = 'aux-column-post-entry land-post-style';
503
 
 
 
 
 
504
  $column_media_width = auxin_get_content_column_width( 2, 15 );
505
 
506
  // whether any result was found or not
507
  $have_posts = $wp_query->have_posts();
508
 
509
- if( $wp_query->have_posts() ){
510
- echo sprintf( '<div class="%s">', $wrapper_class );
 
511
 
512
  while ( $wp_query->have_posts() ) {
513
 
@@ -530,10 +576,21 @@ function auxin_widget_recent_posts_land_style_callback( $atts, $shortcode_conten
530
  extract( $post_vars );
531
 
532
  $the_format = get_post_format( $post );
533
- include( locate_template( 'templates/theme-parts/entry/post-column.php' ) );
 
 
 
 
 
 
 
 
 
 
 
 
534
  }
535
 
536
- echo '</div>';
537
  }
538
 
539
  if( $reset_query ){
26
 
27
 
28
  $master_array['aux_recent_posts_land_style'] = array(
29
+ 'name' => __('Land Style Recent Posts', 'auxin-elements' ),
30
  'auxin_output_callback' => 'auxin_widget_recent_posts_land_style_callback',
31
  'base' => 'aux_recent_posts_land_style',
32
  'description' => __('It adds recent posts in land style.', 'auxin-elements' ),
310
  'group' => '',
311
  'edit_field_class' => ''
312
  ),
313
+ array(
314
+ 'heading' => __('Load More Type','auxin-elements' ),
315
+ 'description' => '',
316
+ 'param_name' => 'loadmore_type',
317
+ 'type' => 'aux_visual_select',
318
+ 'value' => 'scroll',
319
+ 'class' => 'loadmore_type',
320
+ 'admin_label' => false,
321
+ 'dependency' => '',
322
+ 'weight' => '',
323
+ 'group' => '' ,
324
+ 'edit_field_class' => '',
325
+ 'choices' => array(
326
+ '' => array(
327
+ 'label' => __('None', 'auxin-elements' ),
328
+ 'image' => AUXIN_URL . 'images/visual-select/none.svg'
329
+ ),
330
+ 'scroll' => array(
331
+ 'label' => __('Infinite Scroll', 'auxin-elements' ),
332
+ 'image' => AUXIN_URL . 'images/visual-select/button-normal.svg'
333
+ ),
334
+ 'next' => array(
335
+ 'label' => __('Next Button', 'auxin-elements' ),
336
+ 'image' => AUXIN_URL . 'images/visual-select/button-curved.svg'
337
+ ),
338
+ 'next-prev' => array(
339
+ 'label' => __('Next Prev', 'auxin-elements' ),
340
+ 'image' => AUXIN_URL . 'images/visual-select/button-rounded.svg'
341
+ )
342
+ )
343
+ ),
344
  array(
345
  'heading' => __('Excerpt length','auxin-elements' ),
346
  'description' => __('Specify summary content in character.','auxin-elements' ),
442
  'author_or_readmore' => 'readmore',
443
  'image_aspect_ratio' => 0.75,
444
  'tag' => '',
445
+
446
  'extra_classes' => '',
447
+ 'extra_column_classes' => '',
448
  'custom_el_id' => '',
449
+
450
+ 'template_part_file' => 'theme-parts/entry/post-column',
451
+ 'extra_template_path' => '',
452
+
453
+ 'universal_id' => '',
454
  'reset_query' => true,
455
  'use_wp_query' => false, // true to use the global wp_query, false to use internal custom query
456
  'wp_query_args' => array(), // additional wp_query args
457
+ 'loadmore_type' => '', // 'next' (more button), 'scroll', 'next-prev'
458
+ 'loadmore_per_page' => '',
459
+ 'base' => 'aux_recent_posts_land_style',
460
  'base_class' => 'aux-widget-recent-posts-land'
461
  );
462
 
538
 
539
  $show_comments = true; // shows comments icon
540
  $post_counter = 0;
541
+ $column_class = 'aux-blog-land-style aux-ajax-view ' . $extra_column_classes;
542
  $item_class = 'aux-block';
543
  $post_classes = 'aux-column-post-entry land-post-style';
544
 
545
+ if( ! empty( $loadmore_type ) ) {
546
+ $item_class .= ' aux-ajax-item';
547
+ }
548
+
549
  $column_media_width = auxin_get_content_column_width( 2, 15 );
550
 
551
  // whether any result was found or not
552
  $have_posts = $wp_query->have_posts();
553
 
554
+ if( $have_posts ){
555
+
556
+ echo ! $skip_wrappers ? sprintf( '<div data-element-id="%s" class="%s">', esc_attr( $universal_id ), esc_attr( $column_class ) ) : '';
557
 
558
  while ( $wp_query->have_posts() ) {
559
 
576
  extract( $post_vars );
577
 
578
  $the_format = get_post_format( $post );
579
+
580
+ printf( '<div class="%s post-%s">', esc_attr( $item_class ), esc_attr( $post->ID ) );
581
+ include auxin_get_template_file( $template_part_file, '', $extra_template_path );
582
+ echo '</div>';
583
+ }
584
+
585
+ if( ! $skip_wrappers ) {
586
+ // End tag for aux-ajax-view wrapper & Execute load more functionality
587
+ echo '</div>' . auxin_get_load_more_controller( $loadmore_type );
588
+
589
+ } else {
590
+ // Get post counter in the query
591
+ echo '<span class="aux-post-count hidden">'.$wp_query->post_count.'</span>';
592
  }
593
 
 
594
  }
595
 
596
  if( $reset_query ){
includes/elements/recent-posts-masonry.php CHANGED
@@ -26,7 +26,7 @@ function auxin_get_recent_posts_masonry_master_array( $master_array ) {
26
 
27
 
28
  $master_array['aux_recent_posts_masonry'] = array(
29
- 'name' => __('[Phlox] Masonry Recent Posts', 'auxin-elements' ),
30
  'auxin_output_callback' => 'auxin_widget_recent_posts_masonry_callback',
31
  'base' => 'aux_recent_posts_masonry',
32
  'description' => __('It adds recent posts in masonry style.', 'auxin-elements' ),
@@ -290,6 +290,37 @@ function auxin_get_recent_posts_masonry_master_array( $master_array ) {
290
  'group' => '',
291
  'edit_field_class' => ''
292
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
293
  array(
294
  'heading' => __('Excerpt length','auxin-elements' ),
295
  'description' => __('Specify summary content in character.','auxin-elements' ),
@@ -444,11 +475,21 @@ function auxin_widget_recent_posts_masonry_callback( $atts, $shortcode_content =
444
  'tablet_cnum' => 'inherit',
445
  'phone_cnum' => '1',
446
  'tag' => '',
 
447
  'extra_classes' => '',
 
448
  'custom_el_id' => '',
 
 
 
 
 
449
  'reset_query' => true,
450
  'use_wp_query' => false, // true to use the global wp_query, false to use internal custom query
451
  'wp_query_args' => array(), // additional wp_query args
 
 
 
452
  'base_class' => 'aux-widget-recent-posts-masonry aux-column-post-entry'
453
  );
454
 
@@ -535,19 +576,25 @@ function auxin_widget_recent_posts_masonry_callback( $atts, $shortcode_content =
535
  $container_class = 'aux-masonry-layout ';
536
  $post_info_position = 'after-title';
537
 
 
 
 
 
538
  // generate columns class
539
- $column_class = $container_class . ' aux-row aux-de-col' . $desktop_cnum;
540
- $tablet_cnum = ('inherit' == $tablet_cnum ) ? $desktop_cnum : $tablet_cnum ;
541
- $column_class .= ' aux-tb-col'.$tablet_cnum . ' aux-mb-col'.$phone_cnum;
542
- $column_class .= 'entry-boxed' == $content_layout ? ' aux-entry-boxed' : '';
543
 
 
544
 
545
  $column_media_width = auxin_get_content_column_width( $desktop_cnum, 15 );
546
 
547
  $have_posts = $wp_query->have_posts();
548
 
549
  if( $have_posts ){
550
- echo sprintf( '<div class="%s">', $column_class );
 
551
 
552
  while ( $wp_query->have_posts() ) {
553
 
@@ -581,15 +628,23 @@ function auxin_widget_recent_posts_masonry_callback( $atts, $shortcode_content =
581
 
582
  $the_format = get_post_format( $post );
583
 
584
- printf( '<div class="%s">', $item_class );
585
- include( locate_template( 'templates/theme-parts/entry/post-column.php' ) );
586
- echo '</div>';
 
 
 
587
  }
588
 
589
- // use it as data attribute on load more button
590
- $ajax_nonce = wp_create_nonce( 'post-recent-grid-nonce' );
 
 
 
 
 
 
591
 
592
- echo '</div>';
593
  }
594
 
595
  if( $reset_query ){
@@ -606,53 +661,4 @@ function auxin_widget_recent_posts_masonry_callback( $atts, $shortcode_content =
606
  echo $result['widget_footer'];
607
 
608
  return ob_get_clean();
609
- }
610
-
611
-
612
-
613
-
614
- /**
615
- * Retrieves the markup of a recent post grid
616
- *
617
- * AJAX Handler: recent-post-grid
618
- *
619
- * Sample Ajax call:
620
- (function($){
621
- $.ajax({
622
- type : "post",
623
- url : auxin.ajaxurl,
624
- data : {
625
- action : "recent-post-grid",
626
- from : 0,
627
- to : 10,
628
- nonce : ''
629
- },
630
- success: function(response){
631
- if(response.type == "success") {
632
-
633
- } else {
634
- alert("Your vote could not be added")
635
- }
636
- }
637
- });
638
- })(jQuery);
639
- */
640
- // function auxin_widget_recent_posts_grid_ajax_callback(){
641
-
642
- // if( empty( $_POST['action'] ) ){
643
- // wp_send_json_error( __( 'Action handler not found.', 'auxin-elements' ) );
644
- // } elseif( ! wp_verify_nonce( $_POST['nonce'], 'post-recent-grid-nonce' ) ){
645
- // wp_send_json_error( __( 'Authorization failed.', 'auxin-elements' ) );
646
- // }
647
-
648
- // $from = $_POST['from'];
649
- // $to = $_POST['to'];
650
-
651
- // //wp_send_json_success( array() );
652
-
653
- // //wp_send_json_error( __( 'An error occurred.', 'auxin-elements' ) );
654
- // }
655
-
656
- add_action( 'wp_ajax_recent-post-grid', 'auxin_widget_recent_posts_grid_ajax_callback' );
657
-
658
-
26
 
27
 
28
  $master_array['aux_recent_posts_masonry'] = array(
29
+ 'name' => __('Masonry Recent Posts', 'auxin-elements' ),
30
  'auxin_output_callback' => 'auxin_widget_recent_posts_masonry_callback',
31
  'base' => 'aux_recent_posts_masonry',
32
  'description' => __('It adds recent posts in masonry style.', 'auxin-elements' ),
290
  'group' => '',
291
  'edit_field_class' => ''
292
  ),
293
+ array(
294
+ 'heading' => __('Load More Type','auxin-elements' ),
295
+ 'description' => '',
296
+ 'param_name' => 'loadmore_type',
297
+ 'type' => 'aux_visual_select',
298
+ 'value' => 'scroll',
299
+ 'class' => 'loadmore_type',
300
+ 'admin_label' => false,
301
+ 'dependency' => '',
302
+ 'weight' => '',
303
+ 'group' => '' ,
304
+ 'edit_field_class' => '',
305
+ 'choices' => array(
306
+ '' => array(
307
+ 'label' => __('None', 'auxin-elements' ),
308
+ 'image' => AUXIN_URL . 'images/visual-select/none.svg'
309
+ ),
310
+ 'scroll' => array(
311
+ 'label' => __('Infinite Scroll', 'auxin-elements' ),
312
+ 'image' => AUXIN_URL . 'images/visual-select/button-normal.svg'
313
+ ),
314
+ 'next' => array(
315
+ 'label' => __('Next Button', 'auxin-elements' ),
316
+ 'image' => AUXIN_URL . 'images/visual-select/button-curved.svg'
317
+ ),
318
+ 'next-prev' => array(
319
+ 'label' => __('Next Prev', 'auxin-elements' ),
320
+ 'image' => AUXIN_URL . 'images/visual-select/button-rounded.svg'
321
+ )
322
+ )
323
+ ),
324
  array(
325
  'heading' => __('Excerpt length','auxin-elements' ),
326
  'description' => __('Specify summary content in character.','auxin-elements' ),
475
  'tablet_cnum' => 'inherit',
476
  'phone_cnum' => '1',
477
  'tag' => '',
478
+
479
  'extra_classes' => '',
480
+ 'extra_column_classes' => '',
481
  'custom_el_id' => '',
482
+
483
+ 'template_part_file' => 'theme-parts/entry/post-column',
484
+ 'extra_template_path' => '',
485
+
486
+ 'universal_id' => '',
487
  'reset_query' => true,
488
  'use_wp_query' => false, // true to use the global wp_query, false to use internal custom query
489
  'wp_query_args' => array(), // additional wp_query args
490
+ 'loadmore_type' => '', // 'next' (more button), 'scroll', 'next-prev'
491
+ 'loadmore_per_page' => '',
492
+ 'base' => 'aux_recent_posts_masonry',
493
  'base_class' => 'aux-widget-recent-posts-masonry aux-column-post-entry'
494
  );
495
 
576
  $container_class = 'aux-masonry-layout ';
577
  $post_info_position = 'after-title';
578
 
579
+ if( ! empty( $loadmore_type ) ) {
580
+ $item_class .= ' aux-ajax-item';
581
+ }
582
+
583
  // generate columns class
584
+ $column_class = $container_class . ' aux-row aux-de-col' . $desktop_cnum;
585
+ $tablet_cnum = ('inherit' == $tablet_cnum ) ? $desktop_cnum : $tablet_cnum ;
586
+ $column_class .= ' aux-tb-col'.$tablet_cnum . ' aux-mb-col'.$phone_cnum;
587
+ $column_class .= 'entry-boxed' == $content_layout ? ' aux-entry-boxed' : '';
588
 
589
+ $column_class .= ' aux-ajax-view ' . $extra_column_classes;
590
 
591
  $column_media_width = auxin_get_content_column_width( $desktop_cnum, 15 );
592
 
593
  $have_posts = $wp_query->have_posts();
594
 
595
  if( $have_posts ){
596
+
597
+ echo ! $skip_wrappers ? sprintf( '<div data-element-id="%s" class="%s">', esc_attr( $universal_id ), esc_attr( $column_class ) ) : '';
598
 
599
  while ( $wp_query->have_posts() ) {
600
 
628
 
629
  $the_format = get_post_format( $post );
630
 
631
+ // add specific class to current classes for each column
632
+ $post_classes = $has_attach && $show_media ? 'post column-entry' : 'post column-entry no-media';
633
+
634
+ printf( '<div class="%s post-%s">', esc_attr( $item_class ), esc_attr( $post->ID ) );
635
+ include auxin_get_template_file( $template_part_file, '', $extra_template_path );
636
+ echo '</div>';
637
  }
638
 
639
+ if( ! $skip_wrappers ) {
640
+ // End tag for aux-ajax-view wrapper & Execute load more functionality
641
+ echo '</div>' . auxin_get_load_more_controller( $loadmore_type );
642
+
643
+ } else {
644
+ // Get post counter in the query
645
+ echo '<span class="aux-post-count hidden">'.$wp_query->post_count.'</span>';
646
+ }
647
 
 
648
  }
649
 
650
  if( $reset_query ){
661
  echo $result['widget_footer'];
662
 
663
  return ob_get_clean();
664
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/elements/recent-posts-tiles.php CHANGED
@@ -26,7 +26,7 @@ function auxin_get_recent_posts_tiles_master_array( $master_array ) {
26
 
27
 
28
  $master_array['aux_recent_posts_tiles'] = array(
29
- 'name' => __('[Phlox] Tiles Recent Posts', 'auxin-elements' ),
30
  'auxin_output_callback' => 'auxin_widget_recent_posts_tiles_callback',
31
  'base' => 'aux_recent_posts_tiles',
32
  'description' => __('It adds recent posts in tiles style.', 'auxin-elements' ),
@@ -137,6 +137,37 @@ function auxin_get_recent_posts_tiles_master_array( $master_array ) {
137
  'group' => 'Query',
138
  'edit_field_class' => ''
139
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
140
  array(
141
  'heading' => __('Order by', 'auxin-elements'),
142
  'description' => '',
@@ -371,23 +402,34 @@ function auxin_widget_recent_posts_tiles_callback( $atts, $shortcode_content = n
371
  'only_posts__in' => '', // display only these post IDs. array or string comma separated
372
  'include' => '', // include these post IDs in result too. array or string comma separated
373
  'exclude' => '', // exclude these post IDs from result. array or string comma separated
 
374
  'offset' => '',
375
  'paged' => '',
376
  'order_by' => 'date',
377
  'order' => 'DESC',
378
  'excerpt_len' => '160',
379
- 'exclude_without_media' => '1',
380
- 'exclude_custom_post_formats' => '1',
381
- 'exclude_quote_link' => '1',
382
  'exclude_post_formats_in' => array(), // the list od post formats to exclude
383
  'tile_style' => '',
384
- 'display_title' => '1',
385
- 'show_info' => '1',
 
386
  'extra_classes' => '',
 
387
  'custom_el_id' => '',
 
 
 
 
 
388
  'reset_query' => true,
389
  'use_wp_query' => false, // true to use the global wp_query, false to use internal custom query
390
  'wp_query_args' => array(), // additional wp_query args
 
 
 
391
  'base_class' => 'aux-widget-recent-posts-tiles'
392
  );
393
 
@@ -426,8 +468,6 @@ function auxin_widget_recent_posts_tiles_callback( $atts, $shortcode_content = n
426
  'offset' => $offset,
427
  'paged' => $paged,
428
  'cat' => $cat,
429
- 'post__not_in' => array_filter( explode( ',', $exclude ) ),
430
- 'post__in' => array_filter( explode( ',', $include ) ),
431
  'post_status' => 'publish',
432
  'posts_per_page' => $num,
433
  'ignore_sticky_posts' => 1,
@@ -461,46 +501,58 @@ function auxin_widget_recent_posts_tiles_callback( $atts, $shortcode_content = n
461
  $post_counter = 0;
462
  $item_class = 'aux-post-tile aux-image-box';
463
 
464
- $container_class = 'aux-tiles-layout ' . $tile_style;
 
 
 
 
465
  $column_media_width = auxin_get_content_column_width( 4, 0 );
466
 
467
  $have_posts = $wp_query->have_posts();
468
 
469
  if( $have_posts ){
470
 
471
- echo sprintf( '<div class="%s">', $container_class );
472
 
473
  while ( $wp_query->have_posts() ) {
474
 
475
  $wp_query->the_post();
476
  $post = $wp_query->post;
477
 
478
- $the_format = get_post_format( $post );
479
  $item_pattern_info = auxin_get_tile_pattern( 'default', $post_counter, $column_media_width );
480
  $post_counter++;
481
 
482
  $post_vars = auxin_get_post_format_media(
483
  $post,
484
  array(
485
- 'request_from' => 'archive',
486
- 'media_width' => $phone_break_point,
487
- 'media_size' => 'large',
488
- 'upscale_image' => true,
489
- 'ignore_formats' => array( '*' ),
490
- 'add_image_hw' => false, // whether add width and height attr or not
491
- 'image_sizes' => $item_pattern_info['image_sizes'],
492
- 'srcset_sizes' => $item_pattern_info['srcset_sizes']
493
  )
494
  );
495
 
496
  extract( $post_vars );
497
 
498
- $post_classes = $item_class .' '. $item_pattern_info['classname'];
 
 
499
 
500
- include( locate_template( 'templates/theme-parts/entry/post-tile.php' ) );
501
  }
502
 
503
- echo '</div>';
 
 
 
 
 
 
 
504
  }
505
 
506
  if( $reset_query ){
26
 
27
 
28
  $master_array['aux_recent_posts_tiles'] = array(
29
+ 'name' => __('Tiles Recent Posts', 'auxin-elements' ),
30
  'auxin_output_callback' => 'auxin_widget_recent_posts_tiles_callback',
31
  'base' => 'aux_recent_posts_tiles',
32
  'description' => __('It adds recent posts in tiles style.', 'auxin-elements' ),
137
  'group' => 'Query',
138
  'edit_field_class' => ''
139
  ),
140
+ array(
141
+ 'heading' => __('Load More Type','auxin-elements' ),
142
+ 'description' => '',
143
+ 'param_name' => 'loadmore_type',
144
+ 'type' => 'aux_visual_select',
145
+ 'value' => 'scroll',
146
+ 'class' => 'loadmore_type',
147
+ 'admin_label' => false,
148
+ 'dependency' => '',
149
+ 'weight' => '',
150
+ 'group' => '' ,
151
+ 'edit_field_class' => '',
152
+ 'choices' => array(
153
+ '' => array(
154
+ 'label' => __('None', 'auxin-elements' ),
155
+ 'image' => AUXIN_URL . 'images/visual-select/none.svg'
156
+ ),
157
+ 'scroll' => array(
158
+ 'label' => __('Infinite Scroll', 'auxin-elements' ),
159
+ 'image' => AUXIN_URL . 'images/visual-select/button-normal.svg'
160
+ ),
161
+ 'next' => array(
162
+ 'label' => __('Next Button', 'auxin-elements' ),
163
+ 'image' => AUXIN_URL . 'images/visual-select/button-curved.svg'
164
+ ),
165
+ 'next-prev' => array(
166
+ 'label' => __('Next Prev', 'auxin-elements' ),
167
+ 'image' => AUXIN_URL . 'images/visual-select/button-rounded.svg'
168
+ )
169
+ )
170
+ ),
171
  array(
172
  'heading' => __('Order by', 'auxin-elements'),
173
  'description' => '',
402
  'only_posts__in' => '', // display only these post IDs. array or string comma separated
403
  'include' => '', // include these post IDs in result too. array or string comma separated
404
  'exclude' => '', // exclude these post IDs from result. array or string comma separated
405
+ 'posts_per_page' => -1,
406
  'offset' => '',
407
  'paged' => '',
408
  'order_by' => 'date',
409
  'order' => 'DESC',
410
  'excerpt_len' => '160',
411
+ 'exclude_without_media' => true,
412
+ 'exclude_custom_post_formats' => true,
413
+ 'exclude_quote_link' => true,
414
  'exclude_post_formats_in' => array(), // the list od post formats to exclude
415
  'tile_style' => '',
416
+ 'display_title' => true,
417
+ 'show_info' => true,
418
+
419
  'extra_classes' => '',
420
+ 'extra_column_classes' => '',
421
  'custom_el_id' => '',
422
+
423
+ 'template_part_file' => 'theme-parts/entry/post-tile',
424
+ 'extra_template_path' => '',
425
+
426
+ 'universal_id' => '',
427
  'reset_query' => true,
428
  'use_wp_query' => false, // true to use the global wp_query, false to use internal custom query
429
  'wp_query_args' => array(), // additional wp_query args
430
+ 'loadmore_type' => '', // 'next' (more button), 'scroll', 'next-prev'
431
+ 'loadmore_per_page' => '',
432
+ 'base' => 'aux_recent_posts_tiles',
433
  'base_class' => 'aux-widget-recent-posts-tiles'
434
  );
435
 
468
  'offset' => $offset,
469
  'paged' => $paged,
470
  'cat' => $cat,
 
 
471
  'post_status' => 'publish',
472
  'posts_per_page' => $num,
473
  'ignore_sticky_posts' => 1,
501
  $post_counter = 0;
502
  $item_class = 'aux-post-tile aux-image-box';
503
 
504
+ if( ! empty( $loadmore_type ) ) {
505
+ $item_class .= ' aux-ajax-item';
506
+ }
507
+
508
+ $container_class = 'aux-tiles-layout aux-ajax-view ' . $tile_style;
509
  $column_media_width = auxin_get_content_column_width( 4, 0 );
510
 
511
  $have_posts = $wp_query->have_posts();
512
 
513
  if( $have_posts ){
514
 
515
+ echo ! $skip_wrappers ? sprintf( '<div data-element-id="%s" class="%s">', esc_attr( $universal_id ), esc_attr( $container_class ) ) : '';
516
 
517
  while ( $wp_query->have_posts() ) {
518
 
519
  $wp_query->the_post();
520
  $post = $wp_query->post;
521
 
 
522
  $item_pattern_info = auxin_get_tile_pattern( 'default', $post_counter, $column_media_width );
523
  $post_counter++;
524
 
525
  $post_vars = auxin_get_post_format_media(
526
  $post,
527
  array(
528
+ 'request_from' => 'archive',
529
+ 'media_width' => $phone_break_point,
530
+ 'media_size' => 'large',
531
+ 'upscale_image' => true,
532
+ 'image_from_content' => ! $exclude_without_media,
533
+ 'ignore_formats' => array( '*' ),
534
+ 'image_sizes' => $item_pattern_info['image_sizes'],
535
+ 'srcset_sizes' => $item_pattern_info['srcset_sizes']
536
  )
537
  );
538
 
539
  extract( $post_vars );
540
 
541
+ $post_classes = $item_class .' post '. $item_pattern_info['classname'];
542
+
543
+ $the_format = get_post_format( $post );
544
 
545
+ include auxin_get_template_file( $template_part_file, '', $extra_template_path );
546
  }
547
 
548
+ if( ! $skip_wrappers ) {
549
+ // End tag for aux-ajax-view wrapper & Execute load more functionality
550
+ echo '</div>' . auxin_get_load_more_controller( $loadmore_type );
551
+
552
+ } else {
553
+ // Get post counter in the query
554
+ echo '<span class="aux-post-count hidden">'.$wp_query->post_count.'</span>';
555
+ }
556
  }
557
 
558
  if( $reset_query ){
includes/elements/recent-posts-timeline.php CHANGED
@@ -20,7 +20,7 @@ function auxin_get_recent_posts_timeline_master_array( $master_array ) {
20
 
21
 
22
  $master_array['aux_recent_posts_timeline'] = array(
23
- 'name' => __('[Phlox] Timeline Recent Posts', 'auxin-elements' ),
24
  'auxin_output_callback' => 'auxin_widget_recent_posts_timeline_callback',
25
  'base' => 'aux_recent_posts_timeline',
26
  'description' => __('It adds recent posts in timeline style.', 'auxin-elements' ),
@@ -180,6 +180,37 @@ function auxin_get_recent_posts_timeline_master_array( $master_array ) {
180
  'group' => 'Query',
181
  'edit_field_class' => ''
182
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
183
  array(
184
  'heading' => __('Order by', 'auxin-elements'),
185
  'description' => '',
@@ -431,11 +462,21 @@ function auxin_widget_recent_posts_timeline_callback( $atts, $shortcode_content
431
  'display_like' => true,
432
  'display_categories' => true,
433
  'tag' => '',
 
434
  'extra_classes' => '',
 
435
  'custom_el_id' => '',
 
 
 
 
 
436
  'reset_query' => true,
437
  'use_wp_query' => false, // true to use the global wp_query, false to use internal custom query
438
  'wp_query_args' => array(), // additional wp_query args
 
 
 
439
  'base_class' => 'aux-widget-recent-posts-timeline aux-column-post-entry'
440
  );
441
 
@@ -515,12 +556,16 @@ function auxin_widget_recent_posts_timeline_callback( $atts, $shortcode_content
515
  $tablet_break_point = 992;
516
 
517
  $show_comments = true; // shows comments icon
518
- $wrapper_class = 'aux-timeline aux-'.$timeline_alignment;
519
  $item_class = 'aux-block';
520
- $post_classes = 'aux-block';
521
  $post_info_position = 'after-title';
522
  $previous_post_month = '';
523
 
 
 
 
 
524
  // calculate the media width
525
  $media_width = 'center' == $timeline_alignment ? $aux_content_width / 2 : $aux_content_width;
526
 
@@ -528,9 +573,9 @@ function auxin_widget_recent_posts_timeline_callback( $atts, $shortcode_content
528
  $have_posts = $wp_query->have_posts();
529
 
530
 
531
- if( $wp_query->have_posts() ){
532
 
533
- echo sprintf( '<div class="%s" data-layout="%s">', $wrapper_class, $timeline_alignment );
534
 
535
  while ( $wp_query->have_posts() ) {
536
 
@@ -543,10 +588,9 @@ function auxin_widget_recent_posts_timeline_callback( $atts, $shortcode_content
543
  'post_type' => 'post',
544
  'request_from' => 'archive',
545
  'media_width' => $phone_break_point,
546
- 'media_size' => 'large',
547
  'upscale_image' => true,
548
  'image_from_content' => ! $exclude_without_media, // whether to try to get image from content or not
549
- 'add_image_hw' => false, // whether add width and height attr or not
550
  'image_sizes' => array(
551
  array( 'min' => '', 'max' => '767px', 'width' => '80vw' ),
552
  array( 'min' => '768px', 'max' => '992px', 'width' => '40vw' ),
@@ -573,11 +617,22 @@ function auxin_widget_recent_posts_timeline_callback( $atts, $shortcode_content
573
  ?><span class="aux-date-label"><?php the_time(); ?></span><?php
574
  }
575
 
576
- include( locate_template( 'templates/theme-parts/entry/post-column.php' ) );
577
- $previous_post_month = $post_month;
 
 
 
578
  }
579
 
580
- echo "</div>";
 
 
 
 
 
 
 
 
581
  }
582
 
583
  if( $reset_query ){
20
 
21
 
22
  $master_array['aux_recent_posts_timeline'] = array(
23
+ 'name' => __('Timeline Recent Posts', 'auxin-elements' ),
24
  'auxin_output_callback' => 'auxin_widget_recent_posts_timeline_callback',
25
  'base' => 'aux_recent_posts_timeline',
26
  'description' => __('It adds recent posts in timeline style.', 'auxin-elements' ),
180
  'group' => 'Query',
181
  'edit_field_class' => ''
182
  ),
183
+ array(
184
+ 'heading' => __('Load More Type','auxin-elements' ),
185
+ 'description' => '',
186
+ 'param_name' => 'loadmore_type',
187
+ 'type' => 'aux_visual_select',
188
+ 'value' => 'scroll',
189
+ 'class' => 'loadmore_type',
190
+ 'admin_label' => false,
191
+ 'dependency' => '',
192
+ 'weight' => '',
193
+ 'group' => '' ,
194
+ 'edit_field_class' => '',
195
+ 'choices' => array(
196
+ '' => array(
197
+ 'label' => __('None', 'auxin-elements' ),
198
+ 'image' => AUXIN_URL . 'images/visual-select/none.svg'
199
+ ),
200
+ 'scroll' => array(
201
+ 'label' => __('Infinite Scroll', 'auxin-elements' ),
202
+ 'image' => AUXIN_URL . 'images/visual-select/button-normal.svg'
203
+ ),
204
+ 'next' => array(
205
+ 'label' => __('Next Button', 'auxin-elements' ),
206
+ 'image' => AUXIN_URL . 'images/visual-select/button-curved.svg'
207
+ ),
208
+ 'next-prev' => array(
209
+ 'label' => __('Next Prev', 'auxin-elements' ),
210
+ 'image' => AUXIN_URL . 'images/visual-select/button-rounded.svg'
211
+ )
212
+ )
213
+ ),
214
  array(
215
  'heading' => __('Order by', 'auxin-elements'),
216
  'description' => '',
462
  'display_like' => true,
463
  'display_categories' => true,
464
  'tag' => '',
465
+
466
  'extra_classes' => '',
467
+ 'extra_column_classes' => '',
468
  'custom_el_id' => '',
469
+
470
+ 'template_part_file' => 'theme-parts/entry/post-column',
471
+ 'extra_template_path' => '',
472
+
473
+ 'universal_id' => '',
474
  'reset_query' => true,
475
  'use_wp_query' => false, // true to use the global wp_query, false to use internal custom query
476
  'wp_query_args' => array(), // additional wp_query args
477
+ 'loadmore_type' => '', // 'next' (more button), 'scroll', 'next-prev'
478
+ 'loadmore_per_page' => '',
479
+ 'base' => 'aux_recent_posts_timeline',
480
  'base_class' => 'aux-widget-recent-posts-timeline aux-column-post-entry'
481
  );
482
 
556
  $tablet_break_point = 992;
557
 
558
  $show_comments = true; // shows comments icon
559
+ $wrapper_class = 'aux-timeline aux-ajax-view aux-'.$timeline_alignment;
560
  $item_class = 'aux-block';
561
+ $post_classes = 'post';
562
  $post_info_position = 'after-title';
563
  $previous_post_month = '';
564
 
565
+ if( ! empty( $loadmore_type ) ) {
566
+ $item_class .= ' aux-ajax-item';
567
+ }
568
+
569
  // calculate the media width
570
  $media_width = 'center' == $timeline_alignment ? $aux_content_width / 2 : $aux_content_width;
571
 
573
  $have_posts = $wp_query->have_posts();
574
 
575
 
576
+ if( $have_posts ){
577
 
578
+ echo ! $skip_wrappers ? sprintf( '<div data-element-id="%s" class="%s" data-layout="%s">', esc_attr( $universal_id ), esc_attr( $wrapper_class ), esc_attr( $timeline_alignment ) ) : '';
579
 
580
  while ( $wp_query->have_posts() ) {
581
 
588
  'post_type' => 'post',
589
  'request_from' => 'archive',
590
  'media_width' => $phone_break_point,
591
+ 'media_size' => 'full',
592
  'upscale_image' => true,
593
  'image_from_content' => ! $exclude_without_media, // whether to try to get image from content or not
 
594
  'image_sizes' => array(
595
  array( 'min' => '', 'max' => '767px', 'width' => '80vw' ),
596
  array( 'min' => '768px', 'max' => '992px', 'width' => '40vw' ),
617
  ?><span class="aux-date-label"><?php the_time(); ?></span><?php
618
  }
619
 
620
+ printf( '<div class="%s post-%s">', esc_attr( $item_class ), esc_attr( $post->ID ) );
621
+ include auxin_get_template_file( $template_part_file, '', $extra_template_path );
622
+ echo '</div>';
623
+
624
+ $previous_post_month = $post_month;
625
  }
626
 
627
+ if( ! $skip_wrappers ) {
628
+ // End tag for aux-ajax-view wrapper & Execute load more functionality
629
+ echo '</div>' . auxin_get_load_more_controller( $loadmore_type );
630
+
631
+ } else {
632
+ // Get post counter in the query
633
+ echo '<span class="aux-post-count hidden">'.$wp_query->post_count.'</span>';
634
+ }
635
+
636
  }
637
 
638
  if( $reset_query ){
includes/elements/recent-posts-widget.php CHANGED
@@ -26,7 +26,7 @@ function auxin_get_recent_post_widget_master_array( $master_array ) {
26
 
27
 
28
  $master_array['aux_recent_post_widget'] = array(
29
- 'name' => __('[Phlox] Recent Posts Widget', 'auxin-elements' ),
30
  'auxin_output_callback' => 'auxin_widget_recent_post_widget_callback',
31
  'base' => 'aux_recent_post_widget',
32
  'description' => __('Shows recent posts with thumbnail.', 'auxin-elements' ),
26
 
27
 
28
  $master_array['aux_recent_post_widget'] = array(
29
+ 'name' => __('Recent Posts Widget', 'auxin-elements' ),
30
  'auxin_output_callback' => 'auxin_widget_recent_post_widget_callback',
31
  'base' => 'aux_recent_post_widget',
32
  'description' => __('Shows recent posts with thumbnail.', 'auxin-elements' ),
includes/elements/search.php CHANGED
@@ -11,7 +11,7 @@
11
  */
12
  function auxin_get_search_master_array( $master_array ) {
13
  $master_array['aux_search'] = array(
14
- 'name' => __("[Phlox] Search", 'auxin-elements' ),
15
  'auxin_output_callback' => 'auxin_widget_search_field_callcack',
16
  'base' => 'aux_search',
17
  'description' => __('Fancy search field', 'auxin-elements'),
11
  */
12
  function auxin_get_search_master_array( $master_array ) {
13
  $master_array['aux_search'] = array(
14
+ 'name' => __("Search", 'auxin-elements' ),
15
  'auxin_output_callback' => 'auxin_widget_search_field_callcack',
16
  'base' => 'aux_search',
17
  'description' => __('Fancy search field', 'auxin-elements'),
includes/elements/socials-list.php CHANGED
@@ -12,7 +12,7 @@
12
  function auxin_get_social_master_array( $master_array ) {
13
 
14
  $master_array['aux_socials_list'] = array(
15
- 'name' => __("[Phlox] Socials", 'auxin-elements' ),
16
  'auxin_output_callback' => 'auxin_widget_socials_list_callback',
17
  'base' => 'aux_socials_list',
18
  'description' => __('It shows the website socials icons which you can configure it by the customizer.', 'auxin-elements'),
12
  function auxin_get_social_master_array( $master_array ) {
13
 
14
  $master_array['aux_socials_list'] = array(
15
+ 'name' => __("Socials", 'auxin-elements' ),
16
  'auxin_output_callback' => 'auxin_widget_socials_list_callback',
17
  'base' => 'aux_socials_list',
18
  'description' => __('It shows the website socials icons which you can configure it by the customizer.', 'auxin-elements'),
includes/elements/staff.php ADDED
@@ -0,0 +1,654 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Staff Element
4
+ *
5
+ *
6
+ * @package Auxin
7
+ * @license LICENSE.txt
8
+ * @author
9
+ * @link http://averta.net/phlox/
10
+ * @copyright (c) 2010-2017
11
+ */
12
+
13
+ function auxin_get_staff_master_array( $master_array ) {
14
+
15
+ $master_array['aux_staff'] = array(
16
+ 'name' => __('[Phlox] Staff ', 'auxin-elements'),
17
+ 'auxin_output_callback' => 'auxin_widget_staff_callback',
18
+ 'base' => 'aux_staff',
19
+ 'description' => __('Testomonial Element', 'auxin-elements'),
20
+ 'class' => 'aux-widget-staff',
21
+ 'show_settings_on_create' => true,
22
+ 'weight' => 1,
23
+ 'is_widget' => true,
24
+ 'is_shortcode' => true,
25
+ 'is_so' => true,
26
+ 'is_vc' => true,
27
+ 'category' => THEME_NAME,
28
+ 'group' => '',
29
+ 'so_api' => true,
30
+ 'admin_enqueue_js' => '',
31
+ 'admin_enqueue_css' => '',
32
+ 'front_enqueue_js' => '',
33
+ 'front_enqueue_css' => '',
34
+ 'icon' => 'auxin-element auxin-staff',
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' => __('Staff Name','auxin-elements'),
45
+ 'description' => __('Staff Name, leave it empty if you don`t need title.', 'auxin-elements'),
46
+ 'param_name' => 'title',
47
+ 'type' => 'textfield',
48
+ 'value' => '',
49
+ 'holder' => 'textfield',
50
+ 'class' => 'title',
51
+ 'admin_label' => true,
52
+ 'dependency' => '',
53
+ 'weight' => '',
54
+ 'group' => 'Staff Details' ,
55
+ 'edit_field_class' => ''
56
+ ),
57
+ array(
58
+ 'heading' => __('Staff Occupation','auxin-elements'),
59
+ 'description' => __('Staff Occupation, leave it empty if you don`t need title.', 'auxin-elements'),
60
+ 'param_name' => 'subtitle',
61
+ 'type' => 'textfield',
62
+ 'value' => '',
63
+ 'def_value' => '',
64
+ 'holder' => 'textfield',
65
+ 'class' => 'subtitle',
66
+ 'description' => '',
67
+ 'admin_label' => true,
68
+ 'dependency' => '',
69
+ 'weight' => '',
70
+ 'group' => 'Staff Details' ,
71
+ 'edit_field_class' => ''
72
+ ),
73
+ array(
74
+ 'heading' => __('Wrapper style','auxin-elements'),
75
+ 'description' => '',
76
+ 'param_name' => 'wrapper_style',
77
+ 'type' => 'aux_visual_select',
78
+ 'def_value' => 'simple',
79
+ 'choices' => array(
80
+ 'simple' => array(
81
+ 'label' => __('Simple', 'auxin-elements'),
82
+ 'image' => AUXIN_URL . 'images/visual-select/text-normal.svg'
83
+ ),
84
+ 'outline' => array(
85
+ 'label' => __('Outlined', 'auxin-elements'),
86
+ 'image' => AUXIN_URL . 'images/visual-select/text-outline.svg'
87
+ ),
88
+ 'box' => array(
89
+ 'label' => __('Boxed', 'auxin-elements'),
90
+ 'image' => AUXIN_URL . 'images/visual-select/text-boxed.svg'
91
+ )
92
+ ),
93
+ 'holder' => 'dropdown',
94
+ 'class' => 'wrapper_style',
95
+ 'admin_label' => true,
96
+ 'dependency' => '',
97
+ 'weight' => '',
98
+ 'group' => '' ,
99
+ 'edit_field_class' => ''
100
+ ), array(
101
+ 'heading' => __('Layout Style','auxin-elements'),
102
+ 'description' => '',
103
+ 'param_name' => 'layout_style',
104
+ 'type' => 'aux_visual_select',
105
+ 'def_value' => 'top',
106
+ 'choices' => array(
107
+ 'top' => array(
108
+ 'label' => __('Top', 'auxin-elements'),
109
+ 'image' => AUXIN_URL . 'images/visual-select/column-icon-top.svg'
110
+ ),
111
+ 'left' => array(
112
+ 'label' => __('Left', 'auxin-elements'),
113
+ 'image' => AUXIN_URL . 'images/visual-select/column-icon-left.svg'
114
+ ),
115
+ 'right' => array(
116
+ 'label' => __('Right', 'auxin-elements'),
117
+ 'image' => AUXIN_URL . 'images/visual-select/column-icon-right.svg'
118
+ )
119
+ ),
120
+ 'holder' => 'dropdown',
121
+ 'class' => 'layout_style',
122
+ 'admin_label' => true,
123
+ 'dependency' => '',
124
+ 'weight' => '',
125
+ 'group' => '',
126
+ 'edit_field_class' => ''
127
+ ),
128
+ array(
129
+ 'heading' => __('Layout Border Color', 'auxin-elements'),
130
+ 'description' => __('Choose a border color for this layout.', 'auxin-elements'),
131
+ 'param_name' => 'layout_border_color',
132
+ 'type' => 'colorpicker',
133
+ 'def_value' => '',
134
+ 'value' => '',
135
+ 'holder' => '',
136
+ 'class' => 'layout_border_color',
137
+ 'admin_label' => true,
138
+ 'dependency' => '',
139
+ 'weight' => '',
140
+ 'group' => '' ,
141
+ 'edit_field_class' => ''
142
+ ),
143
+ array(
144
+ 'heading' => __('Text align','auxin-elements'),
145
+ 'description' => '',
146
+ 'param_name' => 'text_align',
147
+ 'type' => 'aux_visual_select',
148
+ 'def_value' => 'left',
149
+ 'choices' => array(
150
+ 'left' => array(
151
+ 'label' => __('Left', 'auxin-elements'),
152
+ 'css_class' => 'axiAdminIcon-text-align-left',
153
+ ),
154
+ 'center' => array(
155
+ 'label' => __('Center', 'auxin-elements'),
156
+ 'css_class' => 'axiAdminIcon-text-align-center'
157
+ ),
158
+ 'right' => array(
159
+ 'label' => __('Right', 'auxin-elements'),
160
+ 'css_class' => 'axiAdminIcon-text-align-right'
161
+ )
162
+ ),
163
+ 'holder' => 'dropdown',
164
+ 'class' => 'text_align',
165
+ 'admin_label' => true,
166
+ 'dependency' => '',
167
+ 'weight' => '',
168
+ 'group' => '' ,
169
+ 'edit_field_class' => ''
170
+ ),
171
+ array(
172
+ 'heading' => __('Text color scheme','auxin-elements'),
173
+ 'description' => '',
174
+ 'param_name' => 'text_color_mode',
175
+ 'type' => 'dropdown',
176
+ 'def_value' => 'dark',
177
+ 'value' => array (
178
+ 'inherit' => __( 'Inherit' , 'auxin-elements' ),
179
+ 'light' => __( 'Light' , 'auxin-elements' ),
180
+ 'dark' => __( 'Dark' , 'auxin-elements' )
181
+ ),
182
+ 'holder' => 'dropdown',
183
+ 'class' => 'text_color_mode',
184
+ 'admin_label' => true,
185
+ 'dependency' => '',
186
+ 'weight' => '',
187
+ 'group' => '' ,
188
+ 'edit_field_class' => ''
189
+ ),
190
+ array(
191
+ 'heading' => __('Staff Page Link','auxin-elements'),
192
+ 'description' => __('leave it empty if you don`t need to add a page.', 'auxin-elements'),
193
+ 'param_name' => 'staff_link',
194
+ 'type' => 'textfield',
195
+ 'value' => '',
196
+ 'def_value' => '',
197
+ 'holder' => 'textfield',
198
+ 'class' => 'staff_link',
199
+ 'admin_label' => true,
200
+ 'dependency' => '',
201
+ 'weight' => '',
202
+ 'group' => 'Staff Details' ,
203
+ 'edit_field_class' => ''
204
+ ),
205
+ array(
206
+ 'heading' => __('Staff Image', 'auxin-elements'),
207
+ 'description' => '',
208
+ 'param_name' => 'staff_img',
209
+ 'type' => 'attach_image',
210
+ 'def_value' => '',
211
+ 'value' => '',
212
+ 'holder' => '',
213
+ 'class' => 'staff_img',
214
+ 'admin_label' => true,
215
+ 'dependency' => '',
216
+ 'weight' => '',
217
+ 'group' => 'Staff Details',
218
+ 'edit_field_class' => ''
219
+ ),
220
+ array(
221
+ 'heading' => __('Image Size','auxin-elements'),
222
+ 'description' => '',
223
+ 'param_name' => 'staff_img_size',
224
+ 'type' => 'dropdown',
225
+ 'def_value' => 'full',
226
+ 'value' => array (
227
+ 'full' => __( 'Orginal Size' , 'auxin-elements' ),
228
+ 'large' => __( 'Large' , 'auxin-elements' ),
229
+ 'medium' => __( 'Medium' , 'auxin-elements' ),
230
+ 'thumbnail' => __( 'Thumbnail' , 'auxin-elements' )
231
+ ),
232
+ 'holder' => 'dropdown',
233
+ 'class' => 'staff_img_size',
234
+ 'admin_label' => true,
235
+ 'weight' => '',
236
+ 'group' => 'Staff Details' ,
237
+ 'edit_field_class' => ''
238
+ ),
239
+ array(
240
+ 'heading' => __('Image shape','auxin-elements'),
241
+ 'description' => '',
242
+ 'param_name' => 'img_shape',
243
+ 'type' => 'aux_visual_select',
244
+ 'def_value' => '',
245
+ 'choices' => array(
246
+ 'circle' => array(
247
+ 'label' => __('Circle', 'auxin-elements'),
248
+ 'image' => AUXIN_URL . 'images/visual-select/icon-style-circle.svg'
249
+ ),
250
+ 'semi-circle' => array(
251
+ 'label' => __('Semi-circle', 'auxin-elements'),
252
+ 'image' => AUXIN_URL . 'images/visual-select/icon-style-semi-circle.svg'
253
+ ),
254
+ 'round-rect' => array(
255
+ 'label' => __('Round Rectangle', 'auxin-elements'),
256
+ 'image' => AUXIN_URL . 'images/visual-select/icon-style-round-rectangle.svg'
257
+ ),
258
+ 'rect' => array(
259
+ 'label' => __('Rectangle', 'auxin-elements'),
260
+ 'image' => AUXIN_URL . 'images/visual-select/icon-style-rectangle.svg'
261
+ ),
262
+ ),
263
+ 'holder' => 'dropdown',
264
+ 'class' => 'img_shape',
265
+ 'admin_label' => true,
266
+ 'weight' => '',
267
+ 'group' => 'Staff Details',
268
+ 'edit_field_class' => ''
269
+ ),
270
+ array(
271
+ 'heading' => __('Enable Socials','auxin-elements' ),
272
+ 'description' => '',
273
+ 'param_name' => 'socials',
274
+ 'type' => 'checkbox',
275
+ 'value' => 'false',
276
+ 'class' => '',
277
+ 'admin_label' => false,
278
+ 'dependency' => '',
279
+ 'weight' => '',
280
+ 'group' => 'Socials',
281
+ 'edit_field_class' => ''
282
+ ),
283
+ array(
284
+ 'heading' => __('Twitter Address' ,'auxin-elements' ),
285
+ 'param_name' => 'social_twitter',
286
+ 'type' => 'textfield',
287
+ 'value' => '',
288
+ 'holder' => '',
289
+ 'class' => '',
290
+ 'admin_label' => false,
291
+ 'dependency' => array(
292
+ 'element' => 'socials',
293
+ 'value' => 'true'
294
+ ),
295
+ 'weight' => '',
296
+ 'group' => 'Socials',
297
+ 'edit_field_class' => ''
298
+ ),
299
+ array(
300
+ 'heading' => __('Linkedin Address','auxin-elements' ),
301
+ 'param_name' => 'social_linkedin',
302
+ 'type' => 'textfield',
303
+ 'value' => '',
304
+ 'holder' => '',
305
+ 'class' => '',
306
+ 'admin_label' => false,
307
+ 'dependency' => array(
308
+ 'element' => 'socials',
309
+ 'value' => 'true'
310
+ ),
311
+ 'weight' => '',
312
+ 'group' => 'Socials',
313
+ 'edit_field_class' => ''
314
+ ),
315
+ array(
316
+ 'heading' => __('Facebook Address','auxin-elements' ),
317
+ 'param_name' => 'social_facebook',
318
+ 'type' => 'textfield',
319
+ 'value' => '',
320
+ 'holder' => '',
321
+ 'class' => '',
322
+ 'admin_label' => false,
323
+ 'dependency' => array(
324
+ 'element' => 'socials',
325
+ 'value' => 'true'
326
+ ),
327
+ 'weight' => '',
328
+ 'group' => 'Socials',
329
+ 'edit_field_class' => ''
330
+ ),
331
+ array(
332
+ 'heading' => __('Google Plus Address','auxin-elements' ),
333
+ 'param_name' => 'social_gp',
334
+ 'type' => 'textfield',
335
+ 'value' => '',
336
+ 'holder' => '',
337
+ 'class' => '',
338
+ 'admin_label' => false,
339
+ 'dependency' => array(
340
+ 'element' => 'socials',
341
+ 'value' => 'true'
342
+ ),
343
+ 'weight' => '',
344
+ 'group' => 'Socials',
345
+ 'edit_field_class' => ''
346
+ ),
347
+ array(
348
+ 'heading' => __('Flickr Address','auxin-elements' ),
349
+ 'param_name' => 'social_flickr',
350
+ 'type' => 'textfield',
351
+ 'value' => '',
352
+ 'holder' => '',
353
+ 'class' => '',
354
+ 'admin_label' => false,
355
+ 'dependency' => array(
356
+ 'element' => 'socials',
357
+ 'value' => 'true'
358
+ ),
359
+ 'weight' => '',
360
+ 'group' => 'Socials',
361
+ 'edit_field_class' => ''
362
+ ),
363
+ array(
364
+ 'heading' => __('Delicious Address','auxin-elements' ),
365
+ 'param_name' => 'social_delicious',
366
+ 'type' => 'textfield',
367
+ 'value' => '',
368
+ 'holder' => '',
369
+ 'class' => '',
370
+ 'admin_label' => false,
371
+ 'dependency' => array(
372
+ 'element' => 'socials',
373
+ 'value' => 'true'
374
+ ),
375
+ 'weight' => '',
376
+ 'group' => 'Socials',
377
+ 'edit_field_class' => ''
378
+ ),
379
+ array(
380
+ 'heading' => __('Pinterest Address','auxin-elements' ),
381
+ 'param_name' => 'social_pinterest',
382
+ 'type' => 'textfield',
383
+ 'value' => '',
384
+ 'holder' => '',
385
+ 'class' => '',
386
+ 'admin_label' => false,
387
+ 'dependency' => array(
388
+ 'element' => 'socials',
389
+ 'value' => 'true'
390
+ ),
391
+ 'weight' => '',
392
+ 'group' => 'Socials',
393
+ 'edit_field_class' => ''
394
+ ),
395
+ array(
396
+ 'heading' => __('GitHub Address','auxin-elements' ),
397
+ 'param_name' => 'social_github',
398
+ 'type' => 'textfield',
399
+ 'value' => '',
400
+ 'holder' => '',
401
+ 'class' => '',
402
+ 'admin_label' => false,
403
+ 'dependency' => array(
404
+ 'element' => 'socials',
405
+ 'value' => 'true'
406
+ ),
407
+ 'weight' => '',
408
+ 'group' => 'Socials',
409
+ 'edit_field_class' => ''
410
+ ),
411
+ array(
412
+ 'heading' => __('Socials Icon size','auxin-elements'),
413
+ 'description' => '',
414
+ 'param_name' => 'icon_size',
415
+ 'type' => 'dropdown',
416
+ 'def_value' => 'aux-medium',
417
+ 'value' => array (
418
+ 'aux-small' => __( 'Small' , 'auxin-elements' ),
419
+ 'aux-medium' => __( 'Medium' , 'auxin-elements' ),
420
+ 'aux-large' => __( 'Large' , 'auxin-elements' ),
421
+ 'aux-extra-large' => __( 'X-Large' , 'auxin-elements' )
422
+ ),
423
+ 'holder' => 'dropdown',
424
+ 'class' => 'icon_size',
425
+ 'admin_label' => true,
426
+ 'dependency' => array(
427
+ 'element' => 'socials',
428
+ 'value' => 'true'
429
+ ),
430
+ 'weight' => '',
431
+ 'group' => 'Socials',
432
+ 'edit_field_class' => ''
433
+ ),
434
+ array(
435
+ 'heading' => __('Icon Direction','auxin-elements'),
436
+ 'description' => '',
437
+ 'param_name' => 'icon_align',
438
+ 'type' => 'dropdown',
439
+ 'def_value' => 'aux-vertical',
440
+ 'value' => array (
441
+ 'aux-vertical' => __( 'Vertical' , 'auxin-elements' ),
442
+ 'aux-horizontal' => __( 'Horizontal' , 'auxin-elements' ),
443
+ ),
444
+ 'holder' => 'dropdown',
445
+ 'class' => 'icon_align',
446
+ 'admin_label' => true,
447
+ 'dependency' => array(
448
+ 'element' => 'socials',
449
+ 'value' => 'true'
450
+ ),
451
+ 'weight' => '',
452
+ 'group' => 'Socials',
453
+ 'edit_field_class' => ''
454
+ ),
455
+ array(
456
+ 'heading' => __('Maximum Words','auxin-elements' ),
457
+ 'description' => __('Limit the number of words in the Content','auxin-elements' ),
458
+ 'param_name' => 'max_words',
459
+ 'type' => 'textfield',
460
+ 'value' => '',
461
+ 'holder' => '',
462
+ 'def_value' => 22,
463
+ 'class' => 'max_words',
464
+ 'admin_label' => false,
465
+ 'weight' => '',
466
+ 'group' => '',
467
+ 'edit_field_class' => ''
468
+ ), array(
469
+ 'heading' => __('Content','auxin-elements'),
470
+ 'description' => __('Enter a text as a text content.','auxin-elements'),
471
+ 'param_name' => 'content',
472
+ 'type' => 'textarea_html',
473
+ 'value' => '',
474
+ 'def_value' => '',
475
+ 'holder' => 'div',
476
+ 'class' => 'content',
477
+ 'admin_label' => true,
478
+ 'dependency' => '',
479
+ 'weight' => '',
480
+ 'group' => '' ,
481
+ 'edit_field_class' => ''
482
+ ),
483
+ )
484
+ );
485
+
486
+ return $master_array;
487
+ }
488
+
489
+ add_filter( 'auxin_master_array_shortcodes', 'auxin_get_staff_master_array', 10, 1 );
490
+
491
+
492
+ /**
493
+ * Staff Element Widget Markup
494
+ *
495
+ * The front-end output of this element is returned by the following function
496
+ *
497
+ * @param array $atts The array containing the parsed values from shortcode, it should be same as defined params above.
498
+ * @param string $shortcode_content The shorcode content
499
+ * @return string The output of element markup
500
+ */
501
+ function auxin_widget_staff_callback( $atts, $shortcode_content = null ){
502
+
503
+ // Defining default attributes
504
+ $default_atts = array(
505
+ 'title' => '', // header title
506
+ 'subtitle' => '',
507
+ 'staff_link' => '',
508
+ 'staff_img' => '',
509
+ 'staff_img_size' => 'full',
510
+ 'content' => '',
511
+ 'text_color_mode' => 'dark',
512
+ 'text_align' => 'left',
513
+ 'img_shape' => 'rect',
514
+ 'layout_border_color' => '',
515
+ 'socials' => 0,
516
+ 'icon_size' => 'aux-medium',
517
+ 'social_twitter' => '',
518
+ 'social_facebook' => '',
519
+ 'social_linkedin' => '',
520
+ 'social_gp' => '',
521
+ 'wrapper_style' => 'simple',
522
+ 'max_words' => 22,
523
+ 'social_flickr' => '',
524
+ 'social_pinterest' => '',
525
+ 'icon_align' => 'aux-vertical',
526
+ 'social_github' => '',
527
+ 'social_delicious' => '',
528
+ 'layout_style' => 'top',
529
+ 'extra_classes' => '', // custom css class names for this element
530
+ 'custom_el_id' => '', // custom id attribute for this element
531
+ 'base_class' => 'aux-widget-staff' // base class name for container
532
+ );
533
+
534
+
535
+ if( ! empty( $atts['wrapper_style'] ) ){
536
+ $atts['extra_classes'] = ' aux-wrap-style-' . esc_attr( $atts['wrapper_style'] );
537
+
538
+ } elseif( ! empty( $default_atts['wrapper_style'] ) ){
539
+
540
+ if( ! isset( $atts['extra_classes'] ) ){
541
+
542
+ $atts['extra_classes'] = '';
543
+
544
+ }
545
+
546
+ $atts['extra_classes'] .= ' aux-wrap-style-' . esc_attr( $default_atts['wrapper_style'] );
547
+
548
+ }
549
+
550
+ $result = auxin_get_widget_scafold( $atts, $default_atts );
551
+
552
+ extract( $result['parsed_atts'] );
553
+
554
+ $image = wp_get_attachment_image( $staff_img, $staff_img_size, "", array( "class" => "img-square" ) );
555
+ $content = empty( $content ) ? $shortcode_content : $content ;
556
+ $content = wp_trim_words( $content , (int)$max_words , ' ...');
557
+ $rect_fill = 'rect' === $img_shape && in_array( $layout_style, array( 'right', 'left' ) ) ? 'aux-square-fill' : '' ;
558
+ $layout_border_color = ! empty( $layout_border_color ) ? 'style= "border-color: ' . esc_attr( $layout_border_color ) . '"': '' ;
559
+ $main_classes = 'aux-staff-pos-'.$layout_style. ' aux-staff-text-' .$text_align. ' aux-staff-text-' .$text_color_mode. ' ' . $rect_fill;
560
+ $main_classes .= ! empty( $layout_border_color ) ? ' aux-staff-border' : '' ;
561
+ $header_classes = 'aux-staff-img-' . $img_shape ;
562
+ $footer_classes = $icon_size . ' ' .$icon_align ;
563
+
564
+ ob_start();
565
+
566
+ // widget header ------------------------------
567
+ echo $result['widget_header'];
568
+ ?>
569
+ <div class="<?php echo esc_attr( $main_classes );?>" <?php echo $layout_border_color ;?>>
570
+ <?php if( ! empty( $image ) ){ ;?>
571
+ <div class="aux-staff-header <?php echo esc_attr( $header_classes ) ;?>">
572
+ <?php echo $image ;?>
573
+ </div>
574
+ <div class="aux-staff-content">
575
+ <?php if( ! empty( $title ) && empty( $staff_link ) ) { ?>
576
+ <h4 class="col-title"><?php echo $title; ?></h4>
577
+ <?php } elseif( ! empty( $title ) && ! empty( $staff_link ) ) {?>
578
+ <h4 class="col-title"><a href="<?php echo esc_url($staff_link); ?>">
579
+ <?php echo $title; ?></a>
580
+ </h4>
581
+ <?php } if( ! empty( $subtitle ) ) { ?>
582
+ <h5 class="col-subtitle"><?php echo $subtitle; ?></h5>
583
+ <?php } if( ! empty( $content ) ) { ?>
584
+ <div class="entry-content">
585
+ <?php $encoding_flag = defined('ENT_HTML401') ? ENT_HTML401 : ENT_QUOTES; ?>
586
+ <?php echo do_shortcode( html_entity_decode( $content, $encoding_flag, 'UTF-8') ); ?>
587
+ </div>
588
+ <?php } if ( 'true' === $socials ) { ?>
589
+ <div class="aux-staff-footer <?php echo esc_attr( $footer_classes ) ;?>">
590
+ <ul class="aux-social-list">
591
+
592
+ <?php if ( ! empty( $social_facebook ) ) { ;?>
593
+ <li>
594
+ <a class="facebook" href="<?php echo esc_url( $social_facebook ) ;?>" target="_blank"><span class="auxicon-facebook"></span>
595
+ </a>
596
+ </li>
597
+ <?php } ?>
598
+ <?php if ( ! empty( $social_linkedin ) ) { ;?>
599
+ <li>
600
+ <a class="linkedin" href="<?php echo esc_url( $social_linkedin ) ;?>" target="_blank"><span class="auxicon-linkedin"></span>
601
+ </a>
602
+ </li>
603
+ <?php } ?>
604
+ <?php if ( ! empty( $social_twitter ) ) { ;?>
605
+ <li>
606
+ <a class="twitter" href="<?php echo esc_url( $social_twitter ) ;?>" target="_blank"><span class="auxicon-twitter"></span>
607
+ </a>
608
+ </li>
609
+ <?php } ?>
610
+ <?php if ( ! empty( $social_gp ) ) { ;?>
611
+ <li>
612
+ <a class="googleplus" href="<?php echo esc_url( $social_gp ) ;?>" target="_blank"><span class="auxicon-googleplus"></span>
613
+ </a>
614
+ </li>
615
+ <?php } ?>
616
+ <?php if ( ! empty( $social_flickr ) ) { ;?>
617
+ <li>
618
+ <a class="flickr" href="<?php echo esc_url( $social_flickr ) ;?>" target="_blank"><span class="auxicon-flickr"></span>
619
+ </a>
620
+ </li>
621
+ <?php } ?>
622
+ <?php if ( ! empty( $social_delicious ) ) { ;?>
623
+ <li>
624
+ <a class="delicious" href="<?php echo esc_url( $social_delicious ) ;?>" target="_blank"><span class="auxicon-delicious"></span>
625
+ </a>
626
+ </li>
627
+ <?php } ?>
628
+ <?php if ( ! empty( $social_pinterest ) ) { ;?>
629
+ <li>
630
+ <a class="pinterest" href="<?php echo esc_url( $social_pinterest ) ;?>" target="_blank"><span class="auxicon-pinterest"></span>
631
+ </a>
632
+ </li>
633
+ <?php } ?>
634
+ <?php if ( ! empty( $social_github ) ) { ;?>
635
+ <li>
636
+ <a class="github" href="<?php echo esc_url( $social_github ) ;?>" target="_blank"><span class="auxicon-github"></span>
637
+ </a>
638
+ </li>
639
+ <?php } ?>
640
+ </ul>
641
+ </div>
642
+ <?php } ?>
643
+ </div>
644
+ <?php } ?>
645
+ </div>
646
+
647
+
648
+ <?php
649
+
650
+ // widget footer ------------------------------
651
+ echo $result['widget_footer'];
652
+ return ob_get_clean();
653
+
654
+ }
includes/elements/tabs.php CHANGED
@@ -12,7 +12,7 @@
12
  function auxin_get_tabs_master_array( $master_array ) {
13
 
14
  $master_array['aux_tabs'] = array( // shortcode info here
15
- 'name' => __('[Phlox] Tabs', 'auxin-elements'),
16
  'auxin_output_callback' => 'auxin_widget_tabs_callback',
17
  'base' => 'aux_tabs',
18
  'description' => __('It adds tabs element.', 'auxin-elements'),
12
  function auxin_get_tabs_master_array( $master_array ) {
13
 
14
  $master_array['aux_tabs'] = array( // shortcode info here
15
+ 'name' => __('Tabs', 'auxin-elements'),
16
  'auxin_output_callback' => 'auxin_widget_tabs_callback',
17
  'base' => 'aux_tabs',
18
  'description' => __('It adds tabs element.', 'auxin-elements'),
includes/elements/text.php CHANGED
@@ -12,7 +12,7 @@
12
  function auxin_get_text_master_array( $master_array ) {
13
 
14
  $master_array['aux_text'] = array(
15
- 'name' => __('[Phlox] Text', 'auxin-elements'),
16
  'auxin_output_callback' => 'auxin_widget_column_callback',
17
  'base' => 'aux_text',
18
  'description' => __('Simple text block.', 'auxin-elements'),
12
  function auxin_get_text_master_array( $master_array ) {
13
 
14
  $master_array['aux_text'] = array(
15
+ 'name' => __('Text', 'auxin-elements'),
16
  'auxin_output_callback' => 'auxin_widget_column_callback',
17
  'base' => 'aux_text',
18
  'description' => __('Simple text block.', 'auxin-elements'),
includes/elements/touch-slider.php CHANGED
@@ -13,7 +13,7 @@
13
  function auxin_touch_slider_master_array( $master_array ) {
14
 
15
  $master_array['aux_touch_slider'] = array(
16
- 'name' => __('[Phlox] Simple Image Slider ', 'auxin-elements' ),
17
  'auxin_output_callback' => 'auxin_touch_slider_callback',
18
  'base' => 'aux_touch_slider',
19
  'description' => __('Responsive image slider with touch swipe feature.', 'auxin-elements' ),
13
  function auxin_touch_slider_master_array( $master_array ) {
14
 
15
  $master_array['aux_touch_slider'] = array(
16
+ 'name' => __('Simple Image Slider ', 'auxin-elements' ),
17
  'auxin_output_callback' => 'auxin_touch_slider_callback',
18
  'base' => 'aux_touch_slider',
19
  'description' => __('Responsive image slider with touch swipe feature.', 'auxin-elements' ),
includes/elements/video.php CHANGED
@@ -12,7 +12,7 @@
12
  function auxin_get_video_master_array( $master_array ) {
13
 
14
  $master_array['aux_video'] = array(
15
- 'name' => __('[Phlox] Video', 'auxin-elements'),
16
  'auxin_output_callback' => 'auxin_widget_video_callback',
17
  'base' => 'aux_video',
18
  'description' => __('It adds a video player element.', 'auxin-elements'),
12
  function auxin_get_video_master_array( $master_array ) {
13
 
14
  $master_array['aux_video'] = array(
15
+ 'name' => __('Video', 'auxin-elements'),
16
  'auxin_output_callback' => 'auxin_widget_video_callback',
17
  'base' => 'aux_video',
18
  'description' => __('It adds a video player element.', 'auxin-elements'),
includes/general-functions.php CHANGED
@@ -328,10 +328,392 @@ function auxin_extract_text( $content = null ) {
328
  return $content;
329
  }
330
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
331
  /*-----------------------------------------------------------------------------------*/
332
  /* Tiles layout patterns
333
  /*-----------------------------------------------------------------------------------*/
334
 
 
335
  /**
336
  * Defines the size of post tile based on pattern and given index
337
  * @param string $pattern
@@ -783,6 +1165,9 @@ function auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content = ''
783
  if( empty( $parsed_atts['content'] ) ){
784
  $parsed_atts['content'] = $shortcode_content;
785
  }
 
 
 
786
 
787
  $result['parsed_atts'] = $parsed_atts;
788
 
@@ -812,7 +1197,8 @@ function auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content = ''
812
  $result['ajax_data'] = array(
813
  'nonce' => wp_create_nonce('auxin_front_load_more'),
814
  'args' => $ajax_args,
815
- 'handler' => $result['parsed_atts']["base"]
 
816
  );
817
 
818
  $_css_classes[] = 'aux-ajax-type-' . $result['parsed_atts']['loadmore_type'];
@@ -983,6 +1369,65 @@ if( ! function_exists( 'auxin_remove_action_from_class' ) ){
983
 
984
 
985
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
986
  /*-----------------------------------------------------------------------------------*/
987
  /* A function to get the custom style of Google maps
988
  /*-----------------------------------------------------------------------------------*/
@@ -1050,4 +1495,3 @@ function auxin_find_all_files( $dir, $recursive = true ){
1050
  return $result;
1051
  }
1052
 
1053
-
328
  return $content;
329
  }
330
 
331
+ /*-----------------------------------------------------------------------------------*/
332
+ /* Big Grid layout patterns
333
+ /*-----------------------------------------------------------------------------------*/
334
+
335
+ function auxin_get_grid_pattern( $pattern, $index, $column_media_width ) {
336
+
337
+ switch ( $pattern ) {
338
+ case 'pattern-1':
339
+ return auxin_big_grid_pattern_1( $index, $column_media_width );
340
+ break;
341
+ case 'pattern-2';
342
+ return auxin_big_grid_pattern_2( $index, $column_media_width );
343
+ break;
344
+ case 'pattern-3';
345
+ return auxin_big_grid_pattern_3( $index, $column_media_width );
346
+ break;
347
+ case 'pattern-4';
348
+ return auxin_big_grid_pattern_4( $index, $column_media_width );
349
+ break;
350
+ case 'pattern-5';
351
+ return auxin_big_grid_pattern_5( $index, $column_media_width );
352
+ break;
353
+ case 'pattern-6';
354
+ return auxin_big_grid_pattern_6( $index, $column_media_width );
355
+ break;
356
+ case 'pattern-7';
357
+ return auxin_big_grid_pattern_7( $index, $column_media_width );
358
+ break;
359
+ default:
360
+ return auxin_get_big_grid_pattern( 'default', $index, $column_media_width );
361
+ break;
362
+ }
363
+
364
+ }
365
+
366
+ /**
367
+ * Defines the size of post tile based on pattern and given index
368
+ * @param string $pattern
369
+ * @param int $index
370
+ * @return Array classname, image size
371
+ */
372
+ function auxin_get_big_grid_pattern( $pattern = 'default', $index, $column_media_width ) {
373
+
374
+ $div_index = $index % 12;
375
+ $return_value = array();
376
+
377
+ switch ( $div_index ) {
378
+
379
+ // large squares
380
+ case 0:
381
+ case 7:
382
+ $return_value = array(
383
+ 'classname' => 'aux-big-grid-6-6 aux-t-tile-4-2 aux-m-tile-4-2',
384
+ 'size' => array( 'width' => 2 * $column_media_width, 'height' => 2 * $column_media_width ),
385
+ 'image_sizes' => array(
386
+ array( 'min' => '' , 'max' => '992px', 'width' => '100vw' ),
387
+ array( 'min' => '' , 'max' => '', 'width' => 2 * $column_media_width . 'px' )
388
+ ),
389
+ 'srcset_sizes' => array(
390
+ array( 'width' => 2 * $column_media_width, 'height' => 2 * $column_media_width ),
391
+ array( 'width' => 4 * $column_media_width, 'height' => 4 * $column_media_width ),
392
+ array( 'width' => 8 * $column_media_width, 'height' => 8 * $column_media_width )
393
+ )
394
+ );
395
+ break;
396
+
397
+ // full width
398
+ case 5:
399
+ case 11:
400
+ $return_value = array(
401
+ 'classname' => 'aux-big-grid-12-6',
402
+ 'size' => array( 'width' => $column_media_width, 'height' => $column_media_width * 0.5 ),
403
+ 'image_sizes' => array(
404
+
405
+ ),
406
+ 'srcset_sizes' => array(
407
+ array( 'width' => $column_media_width, 'height' => $column_media_width * 0.5),
408
+ array( 'width' => 2 * $column_media_width, 'height' => 2 * $column_media_width * 0.5),
409
+ array( 'width' => 4 * $column_media_width, 'height' => 4 * $column_media_width * 0.5 )
410
+ )
411
+ );
412
+ break;
413
+
414
+ // small squares
415
+ default:
416
+ $return_value = array(
417
+ 'classname' => 'aux-big-grid-3-3 aux-t-tile-2-2 aux-m-tile-4-2',
418
+ 'size' => array( 'width' => $column_media_width, 'height' => $column_media_width ),
419
+ 'image_sizes' => array(
420
+ array( 'min' => '', 'max' => '767px', 'width' => '100vw' ),
421
+ array( 'min' => '' , 'max' => '992px', 'width' => '50vw' ),
422
+ array( 'min' => '' , 'max' => '', 'width' => $column_media_width . 'px' )
423
+ ),
424
+ 'srcset_sizes' => array(
425
+ array( 'width' => $column_media_width, 'height' => $column_media_width ),
426
+ array( 'width' => 2 * $column_media_width, 'height' => 2 * $column_media_width ),
427
+ array( 'width' => 4 * $column_media_width, 'height' => 4 * $column_media_width )
428
+ )
429
+ );
430
+
431
+ }
432
+
433
+ return $return_value;
434
+ }
435
+
436
+
437
+ function auxin_big_grid_pattern_1( $index, $column_media_width ) {
438
+
439
+ $return_value = array();
440
+
441
+ $return_value = array(
442
+ 'classname' => 'aux-big-grid-4-4 aux-t-big-grid-6-6 aux-m-big-grid-12-6',
443
+ 'size' => array( 'width' => 2 * $column_media_width, 'height' => 2 * $column_media_width ),
444
+ 'image_sizes' => array(
445
+ array( 'min' => '' , 'max' => '992px', 'width' => '100vw' ),
446
+ array( 'min' => '' , 'max' => '
447
+ ', 'width' => 2 * $column_media_width . 'px' )
448
+ ),
449
+ 'srcset_sizes' => array(
450
+ array( 'width' => 2 * $column_media_width, 'height' => 2 * $column_media_width ),
451
+ array( 'width' => 4 * $column_media_width, 'height' => 4 * $column_media_width ),
452
+ array( 'width' => 8 * $column_media_width, 'height' => 8 * $column_media_width )
453
+ )
454
+ );
455
+
456
+ return $return_value;
457
+
458
+ }
459
+
460
+
461
+ function auxin_big_grid_pattern_2( $index, $column_media_width ) {
462
+
463
+ $div_index = $index % 5;
464
+ $return_value = array();
465
+
466
+ switch ( $div_index ) {
467
+
468
+ // large squares
469
+ case 1:
470
+ $return_value = array(
471
+ 'classname' => 'aux-big-grid-6-6 aux-t-big-grid-12-6 aux-m-big-grid-12-6',
472
+ 'size' => array( 'width' => 2 * $column_media_width, 'height' => 2 * $column_media_width ),
473
+ 'image_sizes' => array(
474
+ array( 'min' => '' , 'max' => '992px', 'width' => '100vw' ),
475
+ array( 'min' => '' , 'max' => '', 'width' => 2 * $column_media_width . 'px' )
476
+ ),
477
+ 'srcset_sizes' => array(
478
+ array( 'width' => 2 * $column_media_width, 'height' => 2 * $column_media_width ),
479
+ array( 'width' => 4 * $column_media_width, 'height' => 4 * $column_media_width ),
480
+ array( 'width' => 8 * $column_media_width, 'height' => 8 * $column_media_width )
481
+ )
482
+ );
483
+ break;
484
+
485
+ // small squares
486
+ default:
487
+ $return_value = array(
488
+ 'classname' => 'aux-big-grid-3-3 aux-t-big-grid-6-6 aux-m-big-grid-12-6',
489
+ 'size' => array( 'width' => $column_media_width, 'height' => $column_media_width ),
490
+ 'image_sizes' => array(
491
+ array( 'min' => '', 'max' => '767px', 'width' => '100vw' ),
492
+ array( 'min' => '' , 'max' => '992px', 'width' => '50vw' ),
493
+ array( 'min' => '' , 'max' => '', 'width' => $column_media_width . 'px' )
494
+ ),
495
+ 'srcset_sizes' => array(
496
+ array( 'width' => $column_media_width, 'height' => $column_media_width ),
497
+ array( 'width' => 2 * $column_media_width, 'height' => 2 * $column_media_width ),
498
+ array( 'width' => 4 * $column_media_width, 'height' => 4 * $column_media_width )
499
+ )
500
+ );
501
+
502
+ }
503
+
504
+ return $return_value;
505
+
506
+ }
507
+
508
+
509
+ function auxin_big_grid_pattern_3( $index, $column_media_width ) {
510
+
511
+ $div_index = $index % 3;
512
+ $return_value = array();
513
+
514
+ switch ( $div_index ) {
515
+
516
+ case 0:
517
+ $return_value = array(
518
+ 'classname' => 'aux-big-grid-6-6 aux-t-big-grid-12-6 aux-m-big-grid-12-6',
519
+ 'size' => array( 'width' => 2 * $column_media_width, 'height' => 2 * $column_media_width ),
520
+ 'image_sizes' => array(
521
+ array( 'min' => '' , 'max' => '992px', 'width' => '100vw' ),
522
+ array( 'min' => '' , 'max' => '', 'width' => 2 * $column_media_width . 'px' )
523
+ ),
524
+ 'srcset_sizes' => array(
525
+ array( 'width' => 2 * $column_media_width, 'height' => 2 * $column_media_width ),
526
+ array( 'width' => 4 * $column_media_width, 'height' => 4 * $column_media_width ),
527
+ array( 'width' => 8 * $column_media_width, 'height' => 8 * $column_media_width )
528
+ )
529
+ );
530
+ break;
531
+
532
+ default:
533
+ $return_value = array(
534
+ 'classname' => 'aux-big-grid-6-3 aux-t-big-grid-12-6 aux-m-big-grid-12-6',
535
+ 'size' => array( 'width' => $column_media_width, 'height' => $column_media_width ),
536
+ 'image_sizes' => array(
537
+ array( 'min' => '', 'max' => '767px', 'width' => '100vw' ),
538
+ array( 'min' => '' , 'max' => '992px', 'width' => '50vw' ),
539
+ array( 'min' => '' , 'max' => '', 'width' => $column_media_width . 'px' )
540
+ ),
541
+ 'srcset_sizes' => array(
542
+ array( 'width' => $column_media_width, 'height' => $column_media_width ),
543
+ array( 'width' => 2 * $column_media_width, 'height' => 2 * $column_media_width ),
544
+ array( 'width' => 4 * $column_media_width, 'height' => 4 * $column_media_width )
545
+ )
546
+ );
547
+
548
+ }
549
+
550
+ return $return_value;
551
+
552
+ }
553
+
554
+
555
+ function auxin_big_grid_pattern_4( $index, $column_media_width ) {
556
+
557
+ $div_index = $index % 4;
558
+ $return_value = array();
559
+
560
+ switch ( $div_index ) {
561
+
562
+ // large squares
563
+ case 0:
564
+ $return_value = array(
565
+ 'classname' => 'aux-big-grid-6-6 aux-t-big-grid-12-6 aux-m-big-grid-12-6',
566
+ 'size' => array( 'width' => 2 * $column_media_width, 'height' => 2 * $column_media_width ),
567
+ 'image_sizes' => array(
568
+ array( 'min' => '' , 'max' => '992px', 'width' => '100vw' ),
569
+ array( 'min' => '' , 'max' => '', 'width' => 2 * $column_media_width . 'px' )
570
+ ),
571
+ 'srcset_sizes' => array(
572
+ array( 'width' => 2 * $column_media_width, 'height' => 2 * $column_media_width ),
573
+ array( 'width' => 4 * $column_media_width, 'height' => 4 * $column_media_width ),
574
+ array( 'width' => 8 * $column_media_width, 'height' => 8 * $column_media_width )
575
+ )
576
+ );
577
+ break;
578
+
579
+ case 1:
580
+ $return_value = array(
581
+ 'classname' => 'aux-big-grid-6-3 aux-t-big-grid-12-6 aux-m-big-grid-12-6',
582
+ 'size' => array( 'width' => 4 * $column_media_width, 'height' => 4 * $column_media_width ),
583
+ 'image_sizes' => array(
584
+ array( 'min' => '' , 'max' => '992px', 'width' => '100vw' ),
585
+ array( 'min' => '' , 'max' => '', 'width' => 2 * $column_media_width . 'px' )
586
+ ),
587
+ 'srcset_sizes' => array(
588
+ array( 'width' => 2 * $column_media_width, 'height' => 2 * $column_media_width ),
589
+ array( 'width' => 4 * $column_media_width, 'height' => 4 * $column_media_width ),
590
+ array( 'width' => 8 * $column_media_width, 'height' => 8 * $column_media_width )
591
+ )
592
+ );
593
+ break;
594
+
595
+ // small squares
596
+ default:
597
+ $return_value = array(
598
+ 'classname' => 'aux-big-grid-3-3 aux-t-big-grid-6-6 aux-m-big-grid-12-6',
599
+ 'size' => array( 'width' => $column_media_width, 'height' => $column_media_width ),
600
+ 'image_sizes' => array(
601
+ array( 'min' => '', 'max' => '767px', 'width' => '100vw' ),
602
+ array( 'min' => '' , 'max' => '992px', 'width' => '50vw' ),
603
+ array( 'min' => '' , 'max' => '', 'width' => $column_media_width . 'px' )
604
+ ),
605
+ 'srcset_sizes' => array(
606
+ array( 'width' => $column_media_width, 'height' => $column_media_width ),
607
+ array( 'width' => 2 * $column_media_width, 'height' => 2 * $column_media_width ),
608
+ array( 'width' => 4 * $column_media_width, 'height' => 4 * $column_media_width )
609
+ )
610
+ );
611
+
612
+ }
613
+
614
+ return $return_value;
615
+ }
616
+
617
+
618
+ function auxin_big_grid_pattern_5( $index, $column_media_width ) {
619
+ $div_index = $index % 6;
620
+ $return_value = array();
621
+
622
+ switch ( $div_index ) {
623
+
624
+ // large squares
625
+ case 0:
626
+ case 1:
627
+ $return_value = array(
628
+ 'classname' => 'aux-big-grid-6-6 aux-t-big-grid-12-6 aux-m-big-grid-12-6',
629
+ 'size' => array( 'width' => 2 * $column_media_width, 'height' => 2 * $column_media_width ),
630
+ 'image_sizes' => array(
631
+ array( 'min' => '' , 'max' => '992px', 'width' => '100vw' ),
632
+ array( 'min' => '' , 'max' => '', 'width' => 2 * $column_media_width . 'px' )
633
+ ),
634
+ 'srcset_sizes' => array(
635
+ array( 'width' => 2 * $column_media_width, 'height' => 2 * $column_media_width ),
636
+ array( 'width' => 4 * $column_media_width, 'height' => 4 * $column_media_width ),
637
+ array( 'width' => 8 * $column_media_width, 'height' => 8 * $column_media_width )
638
+ )
639
+ );
640
+ break;
641
+
642
+ // small squares
643
+ default:
644
+ $return_value = array(
645
+ 'classname' => 'aux-big-grid-3-3 aux-t-big-grid-6-6 aux-m-big-grid-12-6',
646
+ 'size' => array( 'width' => $column_media_width, 'height' => $column_media_width ),
647
+ 'image_sizes' => array(
648
+ array( 'min' => '', 'max' => '767px', 'width' => '100vw' ),
649
+ array( 'min' => '' , 'max' => '992px', 'width' => '50vw' ),
650
+ array( 'min' => '' , 'max' => '', 'width' => $column_media_width . 'px' )
651
+ ),
652
+ 'srcset_sizes' => array(
653
+ array( 'width' => $column_media_width, 'height' => $column_media_width ),
654
+ array( 'width' => 2 * $column_media_width, 'height' => 2 * $column_media_width ),
655
+ array( 'width' => 4 * $column_media_width, 'height' => 4 * $column_media_width )
656
+ )
657
+ );
658
+
659
+ }
660
+
661
+ return $return_value;
662
+
663
+ }
664
+
665
+
666
+ function auxin_big_grid_pattern_6( $index, $column_media_width ) {
667
+ $return_value = array();
668
+
669
+ $return_value = array(
670
+ 'classname' => 'aux-big-grid-lg-4-4 aux-t-big-grid-lg-6-6 aux-m-big-grid-lg-12-6',
671
+ 'size' => array( 'width' => 2 * $column_media_width, 'height' => 2 * $column_media_width ),
672
+ 'image_sizes' => array(
673
+ array( 'min' => '' , 'max' => '992px', 'width' => '100vw' ),
674
+ array( 'min' => '' , 'max' => '
675
+ ', 'width' => 2 * $column_media_width . 'px' )
676
+ ),
677
+ 'srcset_sizes' => array(
678
+ array( 'width' => 2 * $column_media_width, 'height' => 2 * $column_media_width ),
679
+ array( 'width' => 4 * $column_media_width, 'height' => 4 * $column_media_width ),
680
+ array( 'width' => 8 * $column_media_width, 'height' => 8 * $column_media_width )
681
+ )
682
+ );
683
+
684
+ return $return_value;
685
+
686
+ }
687
+
688
+
689
+ function auxin_big_grid_pattern_7( $index, $column_media_width ) {
690
+ $return_value = array();
691
+
692
+ $return_value = array(
693
+ 'classname' => 'aux-big-grid-sg-4-4 aux-t-big-grid-sg-6-6 aux-m-big-grid-sg-12-6',
694
+ 'size' => array( 'width' => 2 * $column_media_width, 'height' => 2 * $column_media_width ),
695
+ 'image_sizes' => array(
696
+ array( 'min' => '' , 'max' => '992px', 'width' => '100vw' ),
697
+ array( 'min' => '' , 'max' => '
698
+ ', 'width' => 2 * $column_media_width . 'px' )
699
+ ),
700
+ 'srcset_sizes' => array(
701
+ array( 'width' => 2 * $column_media_width, 'height' => 2 * $column_media_width ),
702
+ array( 'width' => 4 * $column_media_width, 'height' => 4 * $column_media_width ),
703
+ array( 'width' => 8 * $column_media_width, 'height' => 8 * $column_media_width )
704
+ )
705
+ );
706
+
707
+ return $return_value;
708
+
709
+ }
710
+
711
+
712
  /*-----------------------------------------------------------------------------------*/
713
  /* Tiles layout patterns
714
  /*-----------------------------------------------------------------------------------*/
715
 
716
+
717
  /**
718
  * Defines the size of post tile based on pattern and given index
719
  * @param string $pattern
1165
  if( empty( $parsed_atts['content'] ) ){
1166
  $parsed_atts['content'] = $shortcode_content;
1167
  }
1168
+ if( empty( $parsed_atts['loadmore_per_page'] ) ){
1169
+ $parsed_atts['loadmore_per_page'] = ! empty( $parsed_atts['num'] ) ? $parsed_atts['num'] : 12;
1170
+ }
1171
 
1172
  $result['parsed_atts'] = $parsed_atts;
1173
 
1197
  $result['ajax_data'] = array(
1198
  'nonce' => wp_create_nonce('auxin_front_load_more'),
1199
  'args' => $ajax_args,
1200
+ 'handler' => $result['parsed_atts']["base"],
1201
+ 'per_page'=> $parsed_atts['loadmore_per_page']
1202
  );
1203
 
1204
  $_css_classes[] = 'aux-ajax-type-' . $result['parsed_atts']['loadmore_type'];
1369
 
1370
 
1371
 
1372
+ /*-----------------------------------------------------------------------------------*/
1373
+ /* Auxin Load More
1374
+ /*-----------------------------------------------------------------------------------*/
1375
+
1376
+ /**
1377
+ * A callback for Auxin Load More functionality
1378
+ *
1379
+ * @return string
1380
+ */
1381
+ function auxin_get_load_more_controller( $type ) {
1382
+ // Return null when loadmore type is empty
1383
+ if ( empty( $type ) ) return;
1384
+ // Check load more type
1385
+ if ( $type == "next-prev" ) {
1386
+ return '
1387
+ <div class="aux-ajax-controller">
1388
+ <nav class="aux-next-prev-posts nav-skin-minimal">
1389
+ <section class="aux-load-next-prev hidden np-prev-section">
1390
+ <div class="np-arrow">
1391
+ <div class="aux-arrow-nav aux-hover-slide aux-round aux-outline aux-medium">
1392
+ <span class="aux-overlay"></span>
1393
+ <span class="aux-svg-arrow aux-medium-left"></span>
1394
+ <span class="aux-hover-arrow aux-svg-arrow aux-medium-left aux-white"></span>
1395
+ </div>
1396
+ </div>
1397
+ <p class="np-nav-text">'.__('Previous', 'auxin-elements').'</p>
1398
+ <h4 class="np-title">'.__('page', 'auxin-elements').'</h4>
1399
+ </section>
1400
+ <section class="aux-load-next-prev np-next-section">
1401
+ <div class="np-arrow">
1402
+ <div class="aux-arrow-nav aux-hover-slide aux-round aux-outline aux-medium">
1403
+ <span class="aux-overlay"></span>
1404
+ <span class="aux-svg-arrow aux-medium-right"></span>
1405
+ <span class="aux-hover-arrow aux-svg-arrow aux-medium-right aux-white"></span>
1406
+ </div>
1407
+ </div>
1408
+ <p class="np-nav-text">'.__('Next', 'auxin-elements').'</p>
1409
+ <h4 class="np-title">'.__('Page', 'auxin-elements').'</h4>
1410
+ </section>
1411
+
1412
+ </nav>
1413
+ </div>';
1414
+
1415
+ } elseif ( $type == "scroll" || $type == "next" ) {
1416
+
1417
+ return '
1418
+ <div class="aux-ajax-controller">
1419
+ <nav class="aux-load-more center">
1420
+ <svg class="aux-circle" width="100%" height="100%" viewBox="0 0 102 102">
1421
+ <circle class="aux-progress" r="50" cx="51" cy="51" fill="none" transform="rotate(-90 51 51)"></circle>
1422
+ </svg>
1423
+ <div class="aux-label-text">'.__('LOAD MORE', 'auxin-elements').'</div>
1424
+ <span class="aux-loading-label">'.__('LOADING', 'auxin-elements').'</span>
1425
+ </nav>
1426
+ </div>';
1427
+ }
1428
+ }
1429
+
1430
+
1431
  /*-----------------------------------------------------------------------------------*/
1432
  /* A function to get the custom style of Google maps
1433
  /*-----------------------------------------------------------------------------------*/
1495
  return $result;
1496
  }
1497
 
 
includes/general-hooks.php CHANGED
@@ -1319,6 +1319,7 @@ function auxels_blog_page_templates( $result, $page_template ){
1319
  'exclude_without_media' => 0,
1320
  'exclude_custom_post_formats' => 0,
1321
  'exclude_quote_link' => esc_attr( auxin_get_option( 'post_exclude_quote_link_formats', 0 ) ),
 
1322
  'show_title' => true,
1323
  'show_info' => true,
1324
  'show_readmore' => true,
@@ -1344,6 +1345,7 @@ function auxels_blog_page_templates( $result, $page_template ){
1344
  'exclude_without_media' => 0,
1345
  'exclude_custom_post_formats' => 0,
1346
  'exclude_quote_link' => esc_attr( auxin_get_option( 'post_exclude_quote_link_formats', 0 ) ),
 
1347
  'show_title' => true,
1348
  'show_info' => true,
1349
  'show_readmore' => true,
@@ -1369,6 +1371,7 @@ function auxels_blog_page_templates( $result, $page_template ){
1369
  'exclude_without_media' => 0,
1370
  'exclude_custom_post_formats' => 0,
1371
  'exclude_quote_link' => esc_attr( auxin_get_option( 'post_exclude_quote_link_formats', 0 ) ),
 
1372
  'show_excerpt' => true,
1373
  'excerpt_len' => '160',
1374
  'show_title' => true,
@@ -1393,6 +1396,7 @@ function auxels_blog_page_templates( $result, $page_template ){
1393
  'order_by' => 'menu_order date',
1394
  'order' => 'desc',
1395
  'exclude_quote_link' => esc_attr( auxin_get_option( 'post_exclude_quote_link_formats', 1 ) ),
 
1396
  'show_media' => true,
1397
  'show_excerpt' => true,
1398
  'excerpt_len' => '160',
@@ -1425,6 +1429,7 @@ function auxels_blog_page_templates( $result, $page_template ){
1425
  'paged' => $paged,
1426
  'show_media' => true,
1427
  'display_like' => esc_attr( auxin_get_option( 'show_blog_archive_like_button', 1 ) ),
 
1428
  'show_excerpt' => true,
1429
  'excerpt_len' => '160',
1430
  'show_title' => true,
@@ -1471,6 +1476,7 @@ function auxels_add_blog_archive_custom_template_layouts( $result, $template_typ
1471
  'exclude_custom_post_formats' => 0,
1472
  'exclude_quote_link' => esc_attr( auxin_get_option( 'post_exclude_quote_link_formats', 1 ) ),
1473
  'display_like' => esc_attr( auxin_get_option( 'show_blog_archive_like_button', 1 ) ),
 
1474
  'show_media' => true,
1475
  'show_excerpt' => true,
1476
  'excerpt_len' => esc_attr( auxin_get_option( 'blog_content_on_listing_length' ) ),
@@ -1495,6 +1501,7 @@ function auxels_add_blog_archive_custom_template_layouts( $result, $template_typ
1495
  'exclude_without_media' => esc_attr( auxin_get_option( 'exclude_without_media' ) ),
1496
  'exclude_custom_post_formats' => 0,
1497
  'exclude_quote_link' => esc_attr( auxin_get_option( 'post_exclude_quote_link_formats', 1 ) ),
 
1498
  'show_media' => true,
1499
  'show_excerpt' => true,
1500
  'excerpt_len' => esc_attr( auxin_get_option( 'blog_content_on_listing_length' ) ),
@@ -1519,6 +1526,7 @@ function auxels_add_blog_archive_custom_template_layouts( $result, $template_typ
1519
  'exclude_quote_link' => esc_attr( auxin_get_option( 'post_exclude_quote_link_formats', 1 ) ),
1520
  'show_media' => true,
1521
  'display_like' => esc_attr( auxin_get_option( 'show_blog_archive_like_button', 1 ) ),
 
1522
  'show_excerpt' => true,
1523
  'excerpt_len' => esc_attr( auxin_get_option( 'blog_content_on_listing_length' ) ),
1524
  'display_title' => true,
@@ -1543,6 +1551,7 @@ function auxels_add_blog_archive_custom_template_layouts( $result, $template_typ
1543
  'exclude_quote_link' => esc_attr( auxin_get_option( 'post_exclude_quote_link_formats', 1 ) ),
1544
  'show_media' => true,
1545
  'display_like' => esc_attr( auxin_get_option( 'show_blog_archive_like_button', 1 ) ),
 
1546
  'show_excerpt' => true,
1547
  'excerpt_len' => esc_attr( auxin_get_option( 'blog_content_on_listing_length' ) ),
1548
  'display_title' => true,
@@ -1571,6 +1580,7 @@ function auxels_add_blog_archive_custom_template_layouts( $result, $template_typ
1571
  'show_date' => true,
1572
  'display_categories' => esc_attr( auxin_get_option( 'display_post_info_categories', 1 ) ),
1573
  'display_like' => esc_attr( auxin_get_option( 'show_blog_archive_like_button', 1 ) ),
 
1574
  'content_layout' => esc_attr( auxin_get_option( 'post_index_column_content_layout', 'full' ) ),
1575
  'excerpt_len' => esc_attr( auxin_get_option( 'blog_content_on_listing_length' ) ),
1576
  'display_title' => true,
1319
  'exclude_without_media' => 0,
1320
  'exclude_custom_post_formats' => 0,
1321
  'exclude_quote_link' => esc_attr( auxin_get_option( 'post_exclude_quote_link_formats', 0 ) ),
1322
+ 'loadmore_type' => esc_attr( auxin_get_option( 'post_index_loadmore_type', '' ) ),
1323
  'show_title' => true,
1324
  'show_info' => true,
1325
  'show_readmore' => true,
1345
  'exclude_without_media' => 0,
1346
  'exclude_custom_post_formats' => 0,
1347
  'exclude_quote_link' => esc_attr( auxin_get_option( 'post_exclude_quote_link_formats', 0 ) ),
1348
+ 'loadmore_type' => esc_attr( auxin_get_option( 'post_index_loadmore_type', '' ) ),
1349
  'show_title' => true,
1350
  'show_info' => true,
1351
  'show_readmore' => true,
1371
  'exclude_without_media' => 0,
1372
  'exclude_custom_post_formats' => 0,
1373
  'exclude_quote_link' => esc_attr( auxin_get_option( 'post_exclude_quote_link_formats', 0 ) ),
1374
+ 'loadmore_type' => esc_attr( auxin_get_option( 'post_index_loadmore_type', '' ) ),
1375
  'show_excerpt' => true,
1376
  'excerpt_len' => '160',
1377
  'show_title' => true,
1396
  'order_by' => 'menu_order date',
1397
  'order' => 'desc',
1398
  'exclude_quote_link' => esc_attr( auxin_get_option( 'post_exclude_quote_link_formats', 1 ) ),
1399
+ 'loadmore_type' => esc_attr( auxin_get_option( 'post_index_loadmore_type', '' ) ),
1400
  'show_media' => true,
1401
  'show_excerpt' => true,
1402
  'excerpt_len' => '160',
1429
  'paged' => $paged,
1430
  'show_media' => true,
1431
  'display_like' => esc_attr( auxin_get_option( 'show_blog_archive_like_button', 1 ) ),
1432
+ 'loadmore_type' => esc_attr( auxin_get_option( 'post_index_loadmore_type', '' ) ),
1433
  'show_excerpt' => true,
1434
  'excerpt_len' => '160',
1435
  'show_title' => true,
1476
  'exclude_custom_post_formats' => 0,
1477
  'exclude_quote_link' => esc_attr( auxin_get_option( 'post_exclude_quote_link_formats', 1 ) ),
1478
  'display_like' => esc_attr( auxin_get_option( 'show_blog_archive_like_button', 1 ) ),
1479
+ 'loadmore_type' => esc_attr( auxin_get_option( 'post_index_loadmore_type', '' ) ),
1480
  'show_media' => true,
1481
  'show_excerpt' => true,
1482
  'excerpt_len' => esc_attr( auxin_get_option( 'blog_content_on_listing_length' ) ),
1501
  'exclude_without_media' => esc_attr( auxin_get_option( 'exclude_without_media' ) ),
1502
  'exclude_custom_post_formats' => 0,
1503
  'exclude_quote_link' => esc_attr( auxin_get_option( 'post_exclude_quote_link_formats', 1 ) ),
1504
+ 'loadmore_type' => esc_attr( auxin_get_option( 'post_index_loadmore_type', '' ) ),
1505
  'show_media' => true,
1506
  'show_excerpt' => true,
1507
  'excerpt_len' => esc_attr( auxin_get_option( 'blog_content_on_listing_length' ) ),
1526
  'exclude_quote_link' => esc_attr( auxin_get_option( 'post_exclude_quote_link_formats', 1 ) ),
1527
  'show_media' => true,
1528
  'display_like' => esc_attr( auxin_get_option( 'show_blog_archive_like_button', 1 ) ),
1529
+ 'loadmore_type' => esc_attr( auxin_get_option( 'post_index_loadmore_type', '' ) ),
1530
  'show_excerpt' => true,
1531
  'excerpt_len' => esc_attr( auxin_get_option( 'blog_content_on_listing_length' ) ),
1532
  'display_title' => true,
1551
  'exclude_quote_link' => esc_attr( auxin_get_option( 'post_exclude_quote_link_formats', 1 ) ),
1552
  'show_media' => true,
1553
  'display_like' => esc_attr( auxin_get_option( 'show_blog_archive_like_button', 1 ) ),
1554
+ 'loadmore_type' => esc_attr( auxin_get_option( 'post_index_loadmore_type', '' ) ),
1555
  'show_excerpt' => true,
1556
  'excerpt_len' => esc_attr( auxin_get_option( 'blog_content_on_listing_length' ) ),
1557
  'display_title' => true,
1580
  'show_date' => true,
1581
  'display_categories' => esc_attr( auxin_get_option( 'display_post_info_categories', 1 ) ),
1582
  'display_like' => esc_attr( auxin_get_option( 'show_blog_archive_like_button', 1 ) ),
1583
+ 'loadmore_type' => esc_attr( auxin_get_option( 'post_index_loadmore_type', '' ) ),
1584
  'content_layout' => esc_attr( auxin_get_option( 'post_index_column_content_layout', 'full' ) ),
1585
  'excerpt_len' => esc_attr( auxin_get_option( 'blog_content_on_listing_length' ) ),
1586
  'display_title' => true,
includes/index.php CHANGED
@@ -30,6 +30,7 @@ if( defined( 'WPB_VC_VERSION' ) || auxin_is_plugin_active( 'js_composer/js_compo
30
 
31
  }
32
 
 
33
  include_once( 'elements/text.php' );
34
  include_once( 'elements/recent-posts-tiles.php' );
35
  include_once( 'elements/attachment-url.php' );
30
 
31
  }
32
 
33
+ include_once( 'elements/staff.php' );
34
  include_once( 'elements/text.php' );
35
  include_once( 'elements/recent-posts-tiles.php' );
36
  include_once( 'elements/attachment-url.php' );
public/includes/frontend-ajax.php CHANGED
@@ -42,6 +42,34 @@ function auxels_ajax_handler_element_load_more(){
42
  $element_markup = auxin_widget_recent_posts_callback( $ajax_args );
43
  break;
44
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  default:
46
  wp_send_json_error( __( 'Not a valid handler.', 'auxin-elements' ) );
47
  break;
@@ -54,36 +82,6 @@ function auxels_ajax_handler_element_load_more(){
54
 
55
  wp_send_json_success( $element_markup );
56
  }
57
- add_action( 'wp_ajax_load_more_element', 'auxels_ajax_handler_element_load_more' );
58
 
59
-
60
- /**
61
- (function($){
62
- "use strict";
63
-
64
- for( var el_id in auxin.content.loadmore ){
65
- var element = auxin.content.loadmore[el_id];
66
-
67
- $.ajax({
68
- type:"POST", url :
69
- auxin.ajax_url,
70
- data : {
71
- action : "load_more_element",
72
- handler : element.handler,
73
- nonce : element.nonce,
74
- args : element.args
75
- },
76
- success: function(response){
77
- if( response.success ) {
78
- $(".aux-parent-" + el_id + " .aux-ajax-view").append( response.data );
79
- }
80
- console.log(response);
81
- },
82
- error: function( response,error ){
83
- console.log(response, error);
84
- }
85
- });
86
- }
87
-
88
- })(jQuery);
89
- */
42
  $element_markup = auxin_widget_recent_posts_callback( $ajax_args );
43
  break;
44
 
45
+ case 'aux_recent_posts_land_style':
46
+ require_once( AUXELS_INC_DIR . '/elements/recent-posts-land-style.php' );
47
+
48
+ // Get the element markup
49
+ $element_markup = auxin_widget_recent_posts_land_style_callback( $ajax_args );
50
+ break;
51
+
52
+ case 'aux_recent_posts_masonry':
53
+ require_once( AUXELS_INC_DIR . '/elements/recent-posts-masonry.php' );
54
+
55
+ // Get the element markup
56
+ $element_markup = auxin_widget_recent_posts_masonry_callback( $ajax_args );
57
+ break;
58
+
59
+ case 'aux_recent_posts_tiles':
60
+ require_once( AUXELS_INC_DIR . '/elements/recent-posts-tiles.php' );
61
+
62
+ // Get the element markup
63
+ $element_markup = auxin_widget_recent_posts_tiles_callback( $ajax_args );
64
+ break;
65
+
66
+ case 'aux_recent_posts_timeline':
67
+ require_once( AUXELS_INC_DIR . '/elements/recent-posts-timeline.php' );
68
+
69
+ // Get the element markup
70
+ $element_markup = auxin_widget_recent_posts_timeline_callback( $ajax_args );
71
+ break;
72
+
73
  default:
74
  wp_send_json_error( __( 'Not a valid handler.', 'auxin-elements' ) );
75
  break;
82
 
83
  wp_send_json_success( $element_markup );
84
  }
 
85
 
86
+ add_action( 'wp_ajax_load_more_element', 'auxels_ajax_handler_element_load_more' );
87
+ add_action( 'wp_ajax_nopriv_load_more_element', 'auxels_ajax_handler_element_load_more' );