Shortcodes and extra features for Phlox theme - Version 1.5.0

Version Description

Download this release

Release Info

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

Code changes from version 1.4.2 to 1.5.0

README.txt CHANGED
@@ -5,8 +5,8 @@ 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.0
9
- Stable tag: 1.4.2
10
  License: GPLv3
11
  License URI: http://www.gnu.org/licenses/gpl.html
12
 
@@ -140,6 +140,12 @@ Bugs can be reported in our [support forums](http://wordpress.org/tags/auxin-ele
140
 
141
  == Changelog ==
142
 
 
 
 
 
 
 
143
  = Version 1.4.2 / (10.08.2017) =
144
  - [New]: Changelog section added to welcome page
145
  - [Improvement]: Some improvements in custom permalink structures for Phlox themes
@@ -204,6 +210,5 @@ Bugs can be reported in our [support forums](http://wordpress.org/tags/auxin-ele
204
 
205
  == Upgrade Notice ==
206
 
207
- = 1.4.2 =
208
- - [New]: Changelog section added to welcome page
209
-
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
 
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.
146
+ - [Improvement]: Under the hood improvements for recent post grid element.
147
+ - [New]: New animated loop loading for gallery added.
148
+
149
  = Version 1.4.2 / (10.08.2017) =
150
  - [New]: Changelog section added to welcome page
151
  - [Improvement]: Some improvements in custom permalink structures for Phlox themes
210
 
211
  == Upgrade Notice ==
212
 
213
+ = 1.5.0 =
214
+ - [New]: Improvements in Text and Recent From Blog elements.
 
admin/includes/admin-hooks.php CHANGED
@@ -54,30 +54,45 @@ 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
- $demos_list = auxin_get_demo_info_list();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
 
59
- if( ! empty( $demos_list ) ){
60
- $wpnonce = wp_create_nonce( 'auxin-import' );
61
  ?>
62
  <h2 class="aux-featur"><?php _e('Choose the demo you want.', 'auxin-elements'); ?></h2>
63
  <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>
64
  <div class="changelog feature-section three-col">
65
- <?php
66
- foreach( $demos_list as $demo_id => $demo_info ){
67
- ?>
68
- <div class="col" id="<?php echo esc_attr( $demo_info['id'] ); ?>">
69
- <img class="demos-img" src="<?php echo esc_attr( $demo_info['thumb_url'] ); ?>" alt="<?php echo esc_attr( $demo_info['title'] ); ?>">
70
- <h3><?php echo $demo_info['title']; ?></h3>
71
- <p><?php echo $demo_info['desc' ]; ?></p>
72
- <a href="<?php echo esc_url( $demo_info['preview_url'] ); ?>" class="button button-primary aux-button" target="_blank"><?php _e('Preview', 'auxin-elements'); ?></a>
73
- <a href="<?php echo admin_url( 'import.php?import=auxin-importer&demo-id=' . $demo_id. '&_wpnonce=' . $wpnonce ); ?>" class="button button-primary aux-button import-demo">
74
  <?php _e( 'Import Demo', 'auxin-elements' ); ?>
75
  </a>
76
- </div>
77
- <?php
78
- }
79
- echo '</div>';
80
- }
81
  }
82
 
83
  function auxin_welcome_add_section_demos( $sections ){
@@ -304,40 +319,40 @@ function auxels_add_to_demo_info_list( $default_demos ){
304
  $demos_list = array(
305
  'the-journey' => array(
306
  'id' => 'the-journey',
307
- 'title' => __('The Journey', THEME_DOMAIN),
308
- 'desc' => __('Create your awesome Journey Website using this demo as a starter. Best choice for adventure looks.', THEME_DOMAIN),
309
  'preview_url' => 'http://averta.net/phlox/demo/journey/',
310
  'thumb_url' => AUXELS_URL . '/embeds/demos/journey-blog/banner.jpg',
311
  'file' => AUXELS_DIR . '/embeds/demos/journey-blog/data.xml'
312
  ),
313
  'classic-blog' => array(
314
  'id' => 'classic-blog',
315
- 'title' => __('Classic Blog', THEME_DOMAIN),
316
- 'desc' => __('Create your classic good looking Blog using this demo as a starter. Best choice for a classic blogger.', THEME_DOMAIN),
317
  'preview_url' => 'http://averta.net/phlox/demo/classic-blog/',
318
  'thumb_url' => AUXELS_URL . '/embeds/demos/classic-blog/banner.jpg',
319
  'file' => AUXELS_DIR . '/embeds/demos/classic-blog/data.xml'
320
  ),
321
  'food-blog' => array(
322
  'id' => 'food-blog',
323
- 'title' => __('Food Blog', THEME_DOMAIN),
324
- 'desc' => __('Create your awesome Food Website using this demo as a starter. Best choice for restaurant looks.', THEME_DOMAIN),
325
  'preview_url' => 'http://averta.net/phlox/demo/food/',
326
  'thumb_url' => AUXELS_URL . '/embeds/demos/food-blog/banner.jpg',
327
  'file' => AUXELS_DIR . '/embeds/demos/food-blog/data.xml'
328
  ),
329
  'portfolio' => array(
330
  'id' => 'portfolio',
331
- 'title' => __('Protfolio', THEME_DOMAIN),
332
- 'desc' => __('A stunning demo for Phlox portfolio that represents your projects in a modern and stylish way.', THEME_DOMAIN),
333
  'preview_url' => 'http://averta.net/phlox/demo/portfolio/',
334
  'thumb_url' => AUXELS_URL . '/embeds/demos/portfolio/banner.jpg',
335
  'file' => AUXELS_DIR . '/embeds/demos/food-blog/data.xml'
336
  ),
337
  'default' => array(
338
  'id' => 'default',
339
- 'title' => __('Default', THEME_DOMAIN),
340
- 'desc' => __('An excellent example to get familiar with all available layouts, elements, shortcodes and other features of Phlox.', THEME_DOMAIN),
341
  'preview_url' => 'http://averta.net/phlox/demo/default/',
342
  'thumb_url' => AUXELS_URL . '/embeds/demos/default/banner.jpg',
343
  'file' => AUXELS_DIR . '/embeds/demos/default/data.xml'
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 ){
319
  $demos_list = array(
320
  'the-journey' => array(
321
  'id' => 'the-journey',
322
+ 'title' => __('The Journey', 'auxin-elements'),
323
+ 'desc' => __('Create your awesome Journey Website using this demo as a starter. Best choice for adventure looks.', 'auxin-elements'),
324
  'preview_url' => 'http://averta.net/phlox/demo/journey/',
325
  'thumb_url' => AUXELS_URL . '/embeds/demos/journey-blog/banner.jpg',
326
  'file' => AUXELS_DIR . '/embeds/demos/journey-blog/data.xml'
327
  ),
328
  'classic-blog' => array(
329
  'id' => 'classic-blog',
330
+ 'title' => __('Classic Blog', 'auxin-elements'),
331
+ 'desc' => __('Create your classic good looking Blog using this demo as a starter. Best choice for a classic blogger.', 'auxin-elements'),
332
  'preview_url' => 'http://averta.net/phlox/demo/classic-blog/',
333
  'thumb_url' => AUXELS_URL . '/embeds/demos/classic-blog/banner.jpg',
334
  'file' => AUXELS_DIR . '/embeds/demos/classic-blog/data.xml'
335
  ),
336
  'food-blog' => array(
337
  'id' => 'food-blog',
338
+ 'title' => __('Food Blog', 'auxin-elements'),
339
+ 'desc' => __('Create your awesome Food Website using this demo as a starter. Best choice for restaurant looks.', 'auxin-elements'),
340
  'preview_url' => 'http://averta.net/phlox/demo/food/',
341
  'thumb_url' => AUXELS_URL . '/embeds/demos/food-blog/banner.jpg',
342
  'file' => AUXELS_DIR . '/embeds/demos/food-blog/data.xml'
343
  ),
344
  'portfolio' => array(
345
  'id' => 'portfolio',
346
+ 'title' => __('Protfolio', 'auxin-elements'),
347
+ 'desc' => __('A stunning demo for Phlox portfolio that represents your projects in a modern and stylish way.', 'auxin-elements'),
348
  'preview_url' => 'http://averta.net/phlox/demo/portfolio/',
349
  'thumb_url' => AUXELS_URL . '/embeds/demos/portfolio/banner.jpg',
350
  'file' => AUXELS_DIR . '/embeds/demos/food-blog/data.xml'
351
  ),
352
  'default' => array(
353
  'id' => 'default',
354
+ 'title' => __('Default', 'auxin-elements'),
355
+ 'desc' => __('An excellent example to get familiar with all available layouts, elements, shortcodes and other features of Phlox.', 'auxin-elements'),
356
  'preview_url' => 'http://averta.net/phlox/demo/default/',
357
  'thumb_url' => AUXELS_URL . '/embeds/demos/default/banner.jpg',
358
  'file' => AUXELS_DIR . '/embeds/demos/default/data.xml'
admin/includes/index.php CHANGED
@@ -11,7 +11,7 @@ include_once( 'admin-hooks.php' );
11
 
12
  // init the class for extending the menu nav in back-end
13
  Auxin_Master_Nav_Menu_Admin::get_instance();
14
-
15
 
16
  // custom permalink setting fields for custom post types
17
  function auxin_init_permalinks( ){
11
 
12
  // init the class for extending the menu nav in back-end
13
  Auxin_Master_Nav_Menu_Admin::get_instance();
14
+ new Auxels_Archive_Menu_Links();
15
 
16
  // custom permalink setting fields for custom post types
17
  function auxin_init_permalinks( ){
auxin-elements.php CHANGED
@@ -12,14 +12,14 @@
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.4.2
16
  * Author: averta
17
  * Author URI: http://averta.net
18
  * Text Domain: auxin-elements
19
  * License: GPL2
20
  * License URI: https://www.gnu.org/licenses/gpl-2.0.html
21
  * Domain Path: /languages
22
- * Tested up to: 4.8.0
23
  */
24
 
25
  // If this file is called directly, abort.
@@ -68,7 +68,7 @@ if( is_admin() || false === get_transient( 'auxels_plugin_requirements_check' )
68
  'themes' => array(
69
  array(
70
  'name' => __('Phlox', 'auxin-elements'), // The theme name.
71
- 'version' => '1.6.18', // E.g. 1.0.0. If set, the active theme must be this version or higher.
72
  'is_callable' => '', // If set, this callable will be be checked for availability to determine if a theme is active.
73
  'file_exists' => get_template_directory() . '/auxin/auxin-include/auxin.php' // If set, this file will be checked for availability to determine if a theme is active.
74
  )
12
  * Plugin Name: Phlox Core Elements
13
  * Plugin URI: https://wordpress.org/plugins/auxin-elements/
14
  * Description: Powerful and comprehensive plugin that extends the functionality of Phlox theme by adding new shortcodes, widgets and options
15
+ * Version: 1.5.0
16
  * Author: averta
17
  * Author URI: http://averta.net
18
  * Text Domain: auxin-elements
19
  * License: GPL2
20
  * License URI: https://www.gnu.org/licenses/gpl-2.0.html
21
  * Domain Path: /languages
22
+ * Tested up to: 4.8.1
23
  */
24
 
25
  // If this file is called directly, abort.
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
  )
includes/classes/class-auxels-admin-assets.php CHANGED
@@ -2,7 +2,12 @@
2
  /**
3
  * Master Slider Admin Scripts Class.
4
  *
5
- * @
 
 
 
 
 
6
  */
7
 
8
  // no direct access allowed
2
  /**
3
  * Master Slider Admin Scripts Class.
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
  // no direct access allowed
includes/classes/class-auxels-archive-menu-links.php ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Adds archive links to edit menus page
4
+ *
5
+ *
6
+ * @package Auxin
7
+ * @license LICENSE.txt
8
+ * @author
9
+ * @link http://averta.net/phlox/
10
+ * @copyright (c) 2010-2017
11
+ */
12
+ class Auxels_Archive_Menu_Links{
13
+
14
+ public function __construct(){
15
+ add_action( 'admin_init', array( $this, 'add_archive_metabox' ) );
16
+ }
17
+
18
+ /**
19
+ * Register menu metabox for archive links
20
+ */
21
+ public function add_archive_metabox(){
22
+ add_meta_box(
23
+ 'aux_archive_menubox',
24
+ __('Archive Pages', 'auxin-elements'),
25
+ array( $this, 'display_metabox' ),
26
+ 'nav-menus',
27
+ 'side',
28
+ 'low'
29
+ );
30
+ }
31
+
32
+ /**
33
+ * Display the links for archives
34
+ */
35
+ public function display_metabox(){
36
+
37
+ ?>
38
+ <div id="posttype-archive-pages" class="posttypediv">
39
+ <div id="tabs-panel-archive-pages" class="tabs-panel tabs-panel-active">
40
+
41
+ <ul id="archive-pages" class="categorychecklist form-no-clear">
42
+
43
+ <?php
44
+ //loop through all registered content types that have 'has-archive' enabled
45
+ $post_types = get_post_types( array('has_archive' => true ) );
46
+
47
+ if( $post_types ){
48
+ $counter = -1;
49
+ foreach( $post_types as $post_type ){
50
+ $post_type_obj = get_post_type_object( $post_type );
51
+ $post_type_archive_url = get_post_type_archive_link( $post_type );
52
+ $post_type_label = $post_type_obj->labels->singular_name;
53
+ ?>
54
+ <li>
55
+ <label class="menu-item-title">
56
+ <input type="checkbox" class="menu-item-checkbox" name="menu-item[<?php echo $counter; ?>][menu-item-object-id]" value="-1"/>
57
+ <?php echo __( 'Archive', 'auxin-elements' ) . ' <strong>'.$post_type_label .'</strong>'; ?>
58
+ </label>
59
+ <input type="hidden" class="menu-item-type" name="menu-item[<?php echo $counter; ?>][menu-item-type]" value="custom"/>
60
+ <input type="hidden" class="menu-item-title" name="menu-item[<?php echo $counter; ?>][menu-item-title]" value="<?php echo esc_attr( $post_type_label ); ?>"/>
61
+ <input type="hidden" class="menu-item-url" name="menu-item[<?php echo $counter; ?>][menu-item-url]" value="<?php echo esc_attr( $post_type_archive_url ); ?>"/>
62
+ <input type="hidden" class="menu-item-classes" name="menu-item[<?php echo $counter; ?>][menu-item-classes]"/>
63
+ </li>
64
+ <?php
65
+ $counter--;
66
+ }
67
+ }?>
68
+ </ul>
69
+ </div>
70
+ <p class="button-controls">
71
+ <span class="list-controls">
72
+ <a href="<?php echo admin_url('nav-menus.php?page-tab=all&selectall=1#posttype-archive-pages'); ?>" class="select-all"> <?php _e('Select All', 'auxin-elements' ); ?></a>
73
+ </span>
74
+ <span class="add-to-menu">
75
+ <input type="submit" class="button-secondary submit-add-to-menu right" value="<?php _e('Add to Menu', 'auxin-elements') ?>" name="add-post-type-menu-item" id="submit-posttype-archive-pages">
76
+ <span class="spinner"></span>
77
+ </span>
78
+ </p>
79
+ </div>
80
+ <?php
81
+ }
82
+
83
+ }
includes/classes/class-auxin-master-nav-menu-admin.php CHANGED
@@ -30,7 +30,8 @@ class Auxin_Master_Nav_Menu_Admin {
30
  add_action( 'wp_update_nav_menu_item', array( $this, 'update_backend_nav_menu_fields' ), 9, 3 );
31
 
32
  // Change the walker class for back-end menu editor
33
- add_filter( 'wp_edit_nav_menu_walker', array( $this, 'change_nav_menu_backend_walker' ), 9, 1 );
 
34
 
35
  // Register stylesheet and javascript for edit menu page
36
  add_action( 'admin_menu' , array( $this, 'enqueue_edit_menu_assests' ) );
30
  add_action( 'wp_update_nav_menu_item', array( $this, 'update_backend_nav_menu_fields' ), 9, 3 );
31
 
32
  // Change the walker class for back-end menu editor
33
+ add_filter( 'wp_edit_nav_menu_walker', array( $this, 'change_nav_menu_backend_walker' ), 1000000000, 1 ); // the high priority is a fix for "popup-maker" plugin
34
+
35
 
36
  // Register stylesheet and javascript for edit menu page
37
  add_action( 'admin_menu' , array( $this, 'enqueue_edit_menu_assests' ) );
includes/classes/class-auxin-plugin-requirements.php CHANGED
@@ -135,6 +135,9 @@ if( ! class_exists( 'Auxin_Plugin_Requirements' ) ){
135
  */
136
  function update_plugins_dependencies(){
137
 
 
 
 
138
  if( empty( $this->requirements['plugins'] ) ){
139
  return;
140
  }
135
  */
136
  function update_plugins_dependencies(){
137
 
138
+ // Flush the rewrite rules on plugin activation
139
+ flush_rewrite_rules();
140
+
141
  if( empty( $this->requirements['plugins'] ) ){
142
  return;
143
  }
includes/classes/class-auxin-widget-shortcode-map.php CHANGED
@@ -158,6 +158,17 @@ class Auxin_Widget_Shortcode_Map {
158
  }
159
 
160
 
 
 
 
 
 
 
 
 
 
 
 
161
  /**
162
  * Generates shortcode info
163
  */
158
  }
159
 
160
 
161
+ /**
162
+ * Sanitize and proper
163
+ *
164
+ * @param [type] $element_info [description]
165
+ * @return [type] [description]
166
+ */
167
+ protected function sanitize_element_info( $element_info ){
168
+
169
+ }
170
+
171
+
172
  /**
173
  * Generates shortcode info
174
  */
includes/classes/class-auxin-widget.php CHANGED
@@ -108,7 +108,7 @@ class Auxin_Widget extends WP_Widget {
108
  'hide_empty' => true
109
  ));
110
 
111
- $categories_list = array( ' ' => __('All Categories', AUXPFO_DOMAIN ) ) ;
112
  foreach ( $categories as $key => $value ) {
113
  $categories_list[ $value->term_id ] = $value->name;
114
  }
@@ -227,27 +227,31 @@ class Auxin_Widget extends WP_Widget {
227
  case 'aux_select2_multiple' :
228
 
229
  if( gettype( $instance[ $id ] ) ==="string" ) {
230
- $select = array( $instance[ $id ] );
 
 
231
  }
232
- else
233
- $select = $instance[ $id ];
234
 
235
- echo '<div class="aux-element-field aux-multiple-selector ">',
236
- '<label for="'.$this->get_field_id($id).'" >'.$field["name"].'</label>',
237
- '<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">';
 
238
  foreach ( $field['options'] as $key => $value ) {
239
- printf(
240
- '<option value="%s" class="hot-topic" %s style="margin-bottom:3px;">%s</option>',
241
- $key,
242
- in_array( $key, $select) ? 'selected="selected"' : '',
243
- $value
244
- );
245
  }
246
- echo '</select>';
247
- if ( $field["description"] ) {
248
- echo '<p class="option-description">' . $field["description"] . '</p>';
 
 
 
249
  }
250
- echo '</div>' ;
 
 
251
 
252
  break;
253
 
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;
114
  }
227
  case 'aux_select2_multiple' :
228
 
229
  if( gettype( $instance[ $id ] ) ==="string" ) {
230
+
231
+ $select = explode( ',', $instance[ $id ] );
232
+
233
  }
 
 
234
 
235
+ $output = '';
236
+ $output .= '<div class="aux-element-field aux-multiple-selector ">';
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>';
247
+
248
+ if ( $field["description"] ) {
249
+
250
+ $output .= '<p class="option-description">' . $field["description"] . '</p>';
251
  }
252
+
253
+ $output .= '</div>' ;
254
+ echo $output;
255
 
256
  break;
257
 
includes/define.php CHANGED
@@ -12,7 +12,7 @@ if( ! defined( 'THEME_NAME' ) ){
12
  }
13
 
14
 
15
- define( 'AUXELS_VERSION' , '1.4.2' );
16
 
17
  define( 'AUXELS_SLUG' , 'auxin-elements' );
18
 
12
  }
13
 
14
 
15
+ define( 'AUXELS_VERSION' , '1.5.0' );
16
 
17
  define( 'AUXELS_SLUG' , 'auxin-elements' );
18
 
includes/elements/gallery.php CHANGED
@@ -484,6 +484,17 @@ function auxin_widget_gallery_callback( $attr, $shortcode_content = null ){
484
 
485
  if ( $lazyload ) {
486
  $isotope_item_classes .= ' aux-loading';
 
 
 
 
 
 
 
 
 
 
 
487
  }
488
 
489
  $index = 0;
484
 
485
  if ( $lazyload ) {
486
  $isotope_item_classes .= ' aux-loading';
487
+
488
+ ?>
489
+ <div class="aux-items-loading">
490
+ <div class="aux-loading-loop">
491
+ <svg class="aux-circle" width="100%" height="100%" viewBox="0 0 42 42">
492
+ <circle class="aux-stroke-bg" r="20" cx="21" cy="21" fill="none"></circle>
493
+ <circle class="aux-progress" r="20" cx="21" cy="21" fill="none" transform="rotate(-90 21 21)"></circle>
494
+ </svg>
495
+ </div>
496
+ </div>
497
+ <?php
498
  }
499
 
500
  $index = 0;
includes/elements/popular-posts-widget.php CHANGED
@@ -379,7 +379,7 @@ function auxin_widget_popular_post_widget_callback( $atts, $shortcode_content =
379
  $output .= $result['widget_title'];
380
 
381
 
382
- $output .= '<div class="'. $widget_class .'"><div class="widget-inner">';
383
 
384
  // only display tabs if more that one tab is enabled
385
  if( $tabs_count > 1 ){
379
  $output .= $result['widget_title'];
380
 
381
 
382
+ $output .= '<div class="'. esc_attr( $widget_class ) .'"><div class="widget-inner">';
383
 
384
  // only display tabs if more that one tab is enabled
385
  if( $tabs_count > 1 ){
includes/elements/recent-posts-grid-carousel.php CHANGED
@@ -644,10 +644,9 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
644
 
645
  // Defining default attributes
646
  $default_atts = array(
647
- 'title' => '', // header title
648
  'cat' => ' ',
649
  'num' => '8', // max generated entry
650
- 'ignore_media' => false, // whether to ignore media for this
651
  'only_posts__in' => '', // display only these post IDs. array or string comma separated
652
  'include' => '', // include these post IDs in result too. array or string comma separated
653
  'exclude' => '', // exclude these post IDs from result. array or string comma separated
@@ -695,10 +694,14 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
695
  'template_part_file' => 'theme-parts/entry/post-column',
696
  'extra_template_path' => '',
697
 
698
- 'reset_query' => true,
699
  'use_wp_query' => false, // true to use the global wp_query, false to use internal custom query
700
- 'custom_wp_query' => '',
701
  'wp_query_args' => array(), // additional wp_query args
 
 
 
 
702
  'base_class' => 'aux-widget-recent-posts'
703
  );
704
 
@@ -708,7 +711,7 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
708
  // get content width
709
  global $aux_content_width;
710
 
711
- // post-olumn needs to have below variables
712
  if( $author_or_readmore == 'readmore') {
713
  $show_readmore = true;
714
  $show_author_footer = false;
@@ -736,8 +739,6 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
736
 
737
  ob_start();
738
 
739
- global $wp_query;
740
-
741
  if( $custom_wp_query ){
742
  $wp_query = $custom_wp_query;
743
 
@@ -772,6 +773,9 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
772
 
773
  // pass the args through the auxin query parser
774
  $wp_query = new WP_Query( auxin_parse_query_args( $args ) );
 
 
 
775
  }
776
 
777
  // widget header ------------------------------
@@ -827,12 +831,12 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
827
  $column_class .= ' aux-grid-table-layout aux-border-collapse';
828
  $column_class .= 'none' != $grid_table_hover ? ' aux-has-bghover' : '';
829
 
830
- $ignore_media = true;
831
  }
832
 
833
  // Specifies whether the columns have footer meta or not
834
  $column_class .= ! $show_author_footer && ! $show_readmore ? ' aux-no-meta' : '';
835
- $column_class .= ' ' . $extra_column_classes;
836
 
837
  $column_media_width = auxin_get_content_column_width( $desktop_cnum, 15 );
838
 
@@ -840,12 +844,12 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
840
 
841
  if( $have_posts ){
842
 
843
- echo sprintf( '<div class="%s" %s>', $column_class, $carousel_attrs );
844
 
845
  while ( $wp_query->have_posts() ) {
846
 
847
  $wp_query->the_post();
848
- $post = $wp_query->post;
849
 
850
  $post_vars = auxin_get_post_format_media(
851
  $post,
@@ -856,8 +860,8 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
856
  'media_size' => 'large',//array( 'width' => $column_media_width, 'height' => $column_media_width * $image_aspect_ratio ),
857
  'upscale_image' => true,
858
  'image_from_content' => ! $exclude_without_media, // whether to try to get image from content or not
859
- 'no_gallery' => 'carousel' == $preview_mode,
860
- 'ignore_media' => 'grid-table' == $preview_mode,
861
  'add_image_hw' => false, // whether add width and height attr or not
862
  'image_sizes' => array(
863
  array( 'min' => '', 'max' => '767px', 'width' => '80vw' ),
@@ -875,11 +879,8 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
875
  extract( $post_vars );
876
  $the_format = get_post_format( $post );
877
 
878
- // dont show media tag if media is ignored
879
- $show_media = ! $ignore_media;
880
-
881
  // add specific class to current classes for each column
882
- $post_classes = $has_attach && $show_media ? 'column-entry' : 'column-entry no-media';
883
 
884
  // generate custom inline style base on feature colors for each post if the preview mode is table cell
885
  if ( 'grid-table' == $preview_mode ) {
@@ -913,9 +914,17 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
913
  }
914
 
915
  }
916
- printf( '<div class="%s post-%s">', $item_class, $post->ID );
917
- include auxin_get_template_file( $template_part_file, '', $extra_template_path );
918
- echo "</div>";
 
 
 
 
 
 
 
 
919
  }
920
 
921
  if ( 'carousel' == $preview_mode && 'arrows' == $carousel_navigation_control ) {
@@ -933,15 +942,14 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
933
  <?php
934
  }
935
 
936
- // use it as data attribute on load more button
937
- $ajax_nonce = wp_create_nonce( 'post-recent-grid-nonce' );
938
  // print the custom inline style if available
939
  echo $columns_custom_styles ? "<style>$columns_custom_styles</style>" : '';
940
- echo '</div>';
 
941
  }
942
 
943
  if( $reset_query ){
944
- wp_reset_query();
945
  }
946
 
947
  // return false if no result found
@@ -959,6 +967,7 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
959
 
960
 
961
 
 
962
  /**
963
  * Retrieves the markup of a recent post grid
964
  *
@@ -985,26 +994,9 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
985
  });
986
  })(jQuery);
987
  */
988
- function auxin_widget_recent_posts_grid_ajax_callback(){
989
-
990
- if( empty( $_POST['action'] ) ){
991
- wp_send_json_error( __( 'Action handler not found.', 'auxin-elements' ) );
992
- } elseif( ! wp_verify_nonce( $_POST['nonce'], 'post-recent-grid-nonce' ) ){
993
- wp_send_json_error( __( 'Authorization failed.', 'auxin-elements' ) );
994
- }
995
-
996
- $from = $_POST['from'];
997
- $to = $_POST['to'];
998
-
999
- //wp_send_json_success( array() );
1000
-
1001
- //wp_send_json_error( __( 'An error occurred.', 'auxin-elements' ) );
1002
- }
1003
-
1004
- add_action( 'wp_ajax_recent-post-grid', 'auxin_widget_recent_posts_grid_ajax_callback' );
1005
-
1006
 
1007
 
 
1008
  $data = array(
1009
  'blog_style' => 'timeline',
1010
  'slider_autoscroll' => '0',
@@ -1028,3 +1020,4 @@ $data = array(
1028
  'separator' => 'load-more'
1029
  )
1030
  );
 
644
 
645
  // Defining default attributes
646
  $default_atts = array(
647
+ 'title' => '', // header title (required)
648
  'cat' => ' ',
649
  'num' => '8', // max generated entry
 
650
  'only_posts__in' => '', // display only these post IDs. array or string comma separated
651
  'include' => '', // include these post IDs in result too. array or string comma separated
652
  'exclude' => '', // exclude these post IDs from result. array or string comma separated
694
  'template_part_file' => 'theme-parts/entry/post-column',
695
  'extra_template_path' => '',
696
 
697
+ 'universal_id' => '',
698
  'use_wp_query' => false, // true to use the global wp_query, false to use internal custom query
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
  );
707
 
711
  // get content width
712
  global $aux_content_width;
713
 
714
+ // post-column needs to have below variables
715
  if( $author_or_readmore == 'readmore') {
716
  $show_readmore = true;
717
  $show_author_footer = false;
739
 
740
  ob_start();
741
 
 
 
742
  if( $custom_wp_query ){
743
  $wp_query = $custom_wp_query;
744
 
773
 
774
  // pass the args through the auxin query parser
775
  $wp_query = new WP_Query( auxin_parse_query_args( $args ) );
776
+ } else {
777
+
778
+ global $wp_query;
779
  }
780
 
781
  // widget header ------------------------------
831
  $column_class .= ' aux-grid-table-layout aux-border-collapse';
832
  $column_class .= 'none' != $grid_table_hover ? ' aux-has-bghover' : '';
833
 
834
+ $show_media = false;
835
  }
836
 
837
  // Specifies whether the columns have footer meta or not
838
  $column_class .= ! $show_author_footer && ! $show_readmore ? ' aux-no-meta' : '';
839
+ $column_class .= ' aux-ajax-view ' . $extra_column_classes;
840
 
841
  $column_media_width = auxin_get_content_column_width( $desktop_cnum, 15 );
842
 
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
 
851
  $wp_query->the_post();
852
+ $post = get_post();
853
 
854
  $post_vars = auxin_get_post_format_media(
855
  $post,
860
  'media_size' => 'large',//array( 'width' => $column_media_width, 'height' => $column_media_width * $image_aspect_ratio ),
861
  'upscale_image' => true,
862
  'image_from_content' => ! $exclude_without_media, // whether to try to get image from content or not
863
+ 'no_gallery' => 'carousel' == $preview_mode,
864
+ 'ignore_media' => ! $show_media,
865
  'add_image_hw' => false, // whether add width and height attr or not
866
  'image_sizes' => array(
867
  array( 'min' => '', 'max' => '767px', 'width' => '80vw' ),
879
  extract( $post_vars );
880
  $the_format = get_post_format( $post );
881
 
 
 
 
882
  // add specific class to current classes for each column
883
+ $post_classes = $has_attach && $show_media ? 'post column-entry' : 'post column-entry no-media';
884
 
885
  // generate custom inline style base on feature colors for each post if the preview mode is table cell
886
  if ( 'grid-table' == $preview_mode ) {
914
  }
915
 
916
  }
917
+
918
+ // Generate the markup by template parts
919
+ if( has_action( $base_class . '-template-part' ) ){
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 ) {
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
  }
954
 
955
  // return false if no result found
967
 
968
 
969
 
970
+
971
  /**
972
  * Retrieves the markup of a recent post grid
973
  *
994
  });
995
  })(jQuery);
996
  */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
997
 
998
 
999
+ /*
1000
  $data = array(
1001
  'blog_style' => 'timeline',
1002
  'slider_autoscroll' => '0',
1020
  'separator' => 'load-more'
1021
  )
1022
  );
1023
+ */
includes/elements/related-posts.php CHANGED
@@ -68,7 +68,7 @@ function auxin_get_the_related_posts( $args = array() ){
68
  'base_class' => 'aux-widget-recent-posts aux-widget-related-posts',
69
 
70
  'text_alignment' => '',
71
- 'container_start_tag' => '<div class="container aux-fold">',
72
  'container_end_tag' => '</div>'
73
  );
74
 
68
  'base_class' => 'aux-widget-recent-posts aux-widget-related-posts',
69
 
70
  'text_alignment' => '',
71
+ 'container_start_tag' => '<div class="aux-container aux-fold">',
72
  'container_end_tag' => '</div>'
73
  );
74
 
includes/elements/sample-element.php CHANGED
@@ -9,8 +9,10 @@
9
  * @link http://averta.net/phlox/
10
  * @copyright (c) 2010-2017
11
  */
12
-
13
- function auxin_get_sample_master_array( $master_array ) {
 
 
14
 
15
  $master_array['aux_sample'] = array( // the key should be same as 'base' param
16
 
9
  * @link http://averta.net/phlox/
10
  * @copyright (c) 2010-2017
11
  */
12
+ /**
13
+ * http://docs.averta.net/display/ADD/Add+New+Element
14
+ */
15
+ function auxin_get_sample_master_array( $master_array ) {
16
 
17
  $master_array['aux_sample'] = array( // the key should be same as 'base' param
18
 
includes/elements/text.php CHANGED
@@ -106,7 +106,7 @@ function auxin_get_text_master_array( $master_array ) {
106
  'css_class' => 'axiAdminIcon-text-align-center'
107
  ),
108
  'right' => array(
109
- 'label' => __('Center', 'auxin-elements'),
110
  'css_class' => 'axiAdminIcon-text-align-right'
111
  )
112
  ),
@@ -221,7 +221,9 @@ function auxin_get_text_master_array( $master_array ) {
221
  'class' => 'overlay_color',
222
  'admin_label' => true,
223
  'dependency' => array(
224
- 'element' => 'wrapper_bg_image'
 
 
225
  ),
226
  'weight' => '',
227
  'group' => '',
@@ -232,10 +234,9 @@ function auxin_get_text_master_array( $master_array ) {
232
  'description' => '',
233
  'param_name' => 'background_display',
234
  'type' => 'dropdown',
235
- 'def_value' => 'cover',
236
  'value' => array (
237
- 'tile' => __( 'Tiled Image', 'auxin-elements' ),
238
  'cover' => __( 'Cover', 'auxin-elements' ),
 
239
  'center' => __( 'Centered, with original size', 'auxin-elements' ),
240
  'fixed' => __( 'Fixed', 'auxin-elements' )
241
  ),
@@ -363,7 +364,7 @@ function auxin_get_text_master_array( $master_array ) {
363
  'admin_label' => true,
364
  'dependency' => array(
365
  'element' => 'icon_or_image',
366
- 'value' => array('icon')
367
  ),
368
  'weight' => '',
369
  'group' => '',
@@ -373,7 +374,7 @@ function auxin_get_text_master_array( $master_array ) {
373
  'heading' => __( 'Fill background color', 'auxin-elements' ),
374
  'description' => __( 'Choose a color for fill area', 'auxin-elements' ),
375
  'param_name' => 'fill_bg_color',
376
- 'type' => 'color',
377
  'def_value' => '',
378
  'value' => '',
379
  'holder' => '',
@@ -516,7 +517,7 @@ function auxin_get_text_master_array( $master_array ) {
516
  'admin_label' => false,
517
  'dependency' => array(
518
  'element' => 'display_button',
519
- 'value' => true,
520
  ),
521
  'weight' => '',
522
  'group' => '' ,
@@ -540,7 +541,7 @@ function auxin_get_text_master_array( $master_array ) {
540
  'admin_label' => true,
541
  'dependency' => array(
542
  'element' => 'display_button',
543
- 'value' => true,
544
  ),
545
  'weight' => '',
546
  'group' => '' ,
@@ -556,7 +557,7 @@ function auxin_get_text_master_array( $master_array ) {
556
  'admin_label' => false,
557
  'dependency' => array(
558
  'element' => 'display_button',
559
- 'value' => true,
560
  ),
561
  'weight' => '',
562
  'group' => '' ,
@@ -586,7 +587,7 @@ function auxin_get_text_master_array( $master_array ) {
586
  'admin_label' => false,
587
  'dependency' => array(
588
  'element' => 'display_button',
589
- 'value' => true,
590
  ),
591
  'weight' => '',
592
  'group' => '' ,
@@ -616,7 +617,7 @@ function auxin_get_text_master_array( $master_array ) {
616
  'admin_label' => false,
617
  'dependency' => array(
618
  'element' => 'display_button',
619
- 'value' => true,
620
  ),
621
  'weight' => '',
622
  'group' => '' ,
@@ -632,7 +633,7 @@ function auxin_get_text_master_array( $master_array ) {
632
  'admin_label' => false,
633
  'dependency' => array(
634
  'element' => 'display_button',
635
- 'value' => true,
636
  ),
637
  'weight' => '',
638
  'group' => '' ,
@@ -648,7 +649,7 @@ function auxin_get_text_master_array( $master_array ) {
648
  'admin_label' => false,
649
  'dependency' => array(
650
  'element' => 'display_button',
651
- 'value' => true,
652
  ),
653
  'weight' => '',
654
  'group' => '' ,
@@ -673,7 +674,7 @@ function auxin_get_text_master_array( $master_array ) {
673
  'admin_label' => false,
674
  'dependency' => array(
675
  'element' => 'display_button',
676
- 'value' => true,
677
  ),
678
  'weight' => '',
679
  'group' => '' ,
@@ -691,7 +692,7 @@ function auxin_get_text_master_array( $master_array ) {
691
  'admin_label' => false,
692
  'dependency' => array(
693
  'element' => 'display_button',
694
- 'value' => true,
695
  ),
696
  'weight' => '',
697
  'group' => '' ,
@@ -708,7 +709,7 @@ function auxin_get_text_master_array( $master_array ) {
708
  'admin_label' => false,
709
  'dependency' => array(
710
  'element' => 'display_button',
711
- 'value' => true,
712
  ),
713
  'weight' => '',
714
  'group' => '' ,
@@ -729,7 +730,7 @@ function auxin_get_text_master_array( $master_array ) {
729
  'admin_label' => false,
730
  'dependency' => array(
731
  'element' => 'display_button',
732
- 'value' => true,
733
  ),
734
  'weight' => '',
735
  'group' => '' ,
@@ -867,8 +868,12 @@ function auxin_widget_column_callback( $atts, $shortcode_content = null ){
867
 
868
 
869
  if( ! empty( $atts['wrapper_style'] ) ){
870
- $atts['extra_classes'] .= ' aux-wrap-style-' . esc_attr( $atts['wrapper_style'] );
 
871
  } elseif( ! empty( $default_atts['wrapper_style'] ) ){
 
 
 
872
  $atts['extra_classes'] .= ' aux-wrap-style-' . esc_attr( $default_atts['wrapper_style'] );
873
  }
874
 
@@ -957,6 +962,7 @@ function auxin_widget_column_callback( $atts, $shortcode_content = null ){
957
  // widget header ------------------------------
958
  echo $result['widget_header'];
959
  ?>
 
960
  <div class="<?php echo $main_classes; ?>" <?php echo $main_inline_style; ?>>
961
  <?php if ( ! empty( $overlay_color ) ) { ?>
962
  <div class="aux-text-widget-overlay" <?php echo $overlay_style; ?>></div>
@@ -992,7 +998,7 @@ function auxin_widget_column_callback( $atts, $shortcode_content = null ){
992
  </div>
993
  <?php if ( ! empty( $bottom_shape_classes ) ) { ?>
994
  <div class="aux-text-widget-footer">
995
- <div class="aux-border-shape <?php echo $bottom_shape_classes; ?>"<?php echo $bottom_shape_color; ?>>
996
  <?php if ( 'wave' === $bottom_shape_style ){?>
997
  <svg width="100%" height="16" <?php echo $bottom_shape_color;?> >
998
  <defs>
106
  'css_class' => 'axiAdminIcon-text-align-center'
107
  ),
108
  'right' => array(
109
+ 'label' => __('Right', 'auxin-elements'),
110
  'css_class' => 'axiAdminIcon-text-align-right'
111
  )
112
  ),
221
  'class' => 'overlay_color',
222
  'admin_label' => true,
223
  'dependency' => array(
224
+ 'key' => 'wrapper_bg_image',
225
+ 'value' => '',
226
+ 'compare' => '!='
227
  ),
228
  'weight' => '',
229
  'group' => '',
234
  'description' => '',
235
  'param_name' => 'background_display',
236
  'type' => 'dropdown',
 
237
  'value' => array (
 
238
  'cover' => __( 'Cover', 'auxin-elements' ),
239
+ 'tile' => __( 'Tiled Image', 'auxin-elements' ),
240
  'center' => __( 'Centered, with original size', 'auxin-elements' ),
241
  'fixed' => __( 'Fixed', 'auxin-elements' )
242
  ),
364
  'admin_label' => true,
365
  'dependency' => array(
366
  'element' => 'icon_or_image',
367
+ 'value' => array('icon','image')
368
  ),
369
  'weight' => '',
370
  'group' => '',
374
  'heading' => __( 'Fill background color', 'auxin-elements' ),
375
  'description' => __( 'Choose a color for fill area', 'auxin-elements' ),
376
  'param_name' => 'fill_bg_color',
377
+ 'type' => 'colorpicker',
378
  'def_value' => '',
379
  'value' => '',
380
  'holder' => '',
517
  'admin_label' => false,
518
  'dependency' => array(
519
  'element' => 'display_button',
520
+ 'value' => "true",
521
  ),
522
  'weight' => '',
523
  'group' => '' ,
541
  'admin_label' => true,
542
  'dependency' => array(
543
  'element' => 'display_button',
544
+ 'value' => "true",
545
  ),
546
  'weight' => '',
547
  'group' => '' ,
557
  'admin_label' => false,
558
  'dependency' => array(
559
  'element' => 'display_button',
560
+ 'value' => "true",
561
  ),
562
  'weight' => '',
563
  'group' => '' ,
587
  'admin_label' => false,
588
  'dependency' => array(
589
  'element' => 'display_button',
590
+ 'value' => "true",
591
  ),
592
  'weight' => '',
593
  'group' => '' ,
617
  'admin_label' => false,
618
  'dependency' => array(
619
  'element' => 'display_button',
620
+ 'value' => "true",
621
  ),
622
  'weight' => '',
623
  'group' => '' ,
633
  'admin_label' => false,
634
  'dependency' => array(
635
  'element' => 'display_button',
636
+ 'value' => "true",
637
  ),
638
  'weight' => '',
639
  'group' => '' ,
649
  'admin_label' => false,
650
  'dependency' => array(
651
  'element' => 'display_button',
652
+ 'value' => "true",
653
  ),
654
  'weight' => '',
655
  'group' => '' ,
674
  'admin_label' => false,
675
  'dependency' => array(
676
  'element' => 'display_button',
677
+ 'value' => "true",
678
  ),
679
  'weight' => '',
680
  'group' => '' ,
692
  'admin_label' => false,
693
  'dependency' => array(
694
  'element' => 'display_button',
695
+ 'value' => "true",
696
  ),
697
  'weight' => '',
698
  'group' => '' ,
709
  'admin_label' => false,
710
  'dependency' => array(
711
  'element' => 'display_button',
712
+ 'value' => "true",
713
  ),
714
  'weight' => '',
715
  'group' => '' ,
730
  'admin_label' => false,
731
  'dependency' => array(
732
  'element' => 'display_button',
733
+ 'value' => "true",
734
  ),
735
  'weight' => '',
736
  'group' => '' ,
868
 
869
 
870
  if( ! empty( $atts['wrapper_style'] ) ){
871
+ $atts['extra_classes'] = ' aux-wrap-style-' . esc_attr( $atts['wrapper_style'] );
872
+
873
  } elseif( ! empty( $default_atts['wrapper_style'] ) ){
874
+ if( ! isset( $atts['extra_classes'] ) ){
875
+ $atts['extra_classes'] = '';
876
+ }
877
  $atts['extra_classes'] .= ' aux-wrap-style-' . esc_attr( $default_atts['wrapper_style'] );
878
  }
879
 
962
  // widget header ------------------------------
963
  echo $result['widget_header'];
964
  ?>
965
+
966
  <div class="<?php echo $main_classes; ?>" <?php echo $main_inline_style; ?>>
967
  <?php if ( ! empty( $overlay_color ) ) { ?>
968
  <div class="aux-text-widget-overlay" <?php echo $overlay_style; ?>></div>
998
  </div>
999
  <?php if ( ! empty( $bottom_shape_classes ) ) { ?>
1000
  <div class="aux-text-widget-footer">
1001
+ <div class="aux-border-shape <?php echo $bottom_shape_classes; ?>"<?php echo $bottom_shape_color; ?>>
1002
  <?php if ( 'wave' === $bottom_shape_style ){?>
1003
  <svg width="100%" height="16" <?php echo $bottom_shape_color;?> >
1004
  <defs>
includes/general-functions.php CHANGED
@@ -661,6 +661,31 @@ function auxin_get_numerics( $str, $default = null ) {
661
  return $matches[0];
662
  }
663
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
664
  /*-----------------------------------------------------------------------------------*/
665
  /* Returns post type menu name
666
  /*-----------------------------------------------------------------------------------*/
@@ -677,6 +702,27 @@ if( ! function_exists( 'auxin_get_post_type_name' ) ){
677
 
678
  }
679
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
680
 
681
  /*-----------------------------------------------------------------------------------*/
682
  /* A function to generate header and footer for all widgets
@@ -689,7 +735,8 @@ function auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content = ''
689
  'widget_info' => '',
690
  'widget_header' => '',
691
  'widget_title' => '',
692
- 'widget_footer' => ''
 
693
  );
694
 
695
  // ----
@@ -702,6 +749,18 @@ function auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content = ''
702
  if( ! isset( $default_atts['content'] ) ){
703
  $default_atts['content'] = '';
704
  }
 
 
 
 
 
 
 
 
 
 
 
 
705
 
706
  // Widget general info
707
  $before_widget = $after_widget = '';
@@ -730,27 +789,61 @@ function auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content = ''
730
  // make the result params filterable prior to generating markup variables
731
  $result = apply_filters( 'auxin_pre_widget_scafold_params', $result, $atts, $default_atts, $shortcode_content );
732
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
733
  // Defining extra class names --------------
734
 
735
  // Add extra class names to class list here - widget-{element_name}
736
  $_css_classes[] = $result['parsed_atts']['base_class'];
737
 
738
- // Covering classes in list to class attribute for main section
739
- $section_class_attr = auxin_make_html_class_attribute( $_css_classes, $result['parsed_atts']['extra_classes'] );
740
 
741
 
 
 
 
 
742
  if( $before_widget ){
 
743
  $result['widget_header'] .= str_replace(
744
  array( 'class="', '<div'),
745
- array( 'class="'. $result['parsed_atts']['base_class'].' '.$result['parsed_atts']['extra_classes'].' widget-container ', '<section' ),
746
  $before_widget
747
  );
748
  } elseif ( !empty($result['parsed_atts']['custom_el_id']) ){
749
- $result['widget_header'] .= sprintf('<section id="%s" %s>', $result['parsed_atts']['custom_el_id'], $section_class_attr );
750
  } else {
751
- $result['widget_header'] .= sprintf('<section %s>', $section_class_attr );
752
  }
753
 
 
754
  if( ! empty( $result['parsed_atts']['title'] ) ){
755
  if( $before_title ){
756
  $result['widget_title'] .= $before_title . $result['parsed_atts']['title'] . $after_title;
@@ -759,6 +852,7 @@ function auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content = ''
759
  }
760
  }
761
 
 
762
  if( $after_widget ){
763
  // fix for the difference in end tag in siteorigin page builder
764
  $result['widget_footer'] .= str_replace( '</div', '</section', $after_widget );
@@ -766,6 +860,16 @@ function auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content = ''
766
  $result['widget_footer'] .= '</section><!-- widget-container -->';
767
  }
768
 
 
 
 
 
 
 
 
 
 
 
769
  return $result;
770
  }
771
 
661
  return $matches[0];
662
  }
663
 
664
+
665
+ /**
666
+ * Prints JS variable
667
+ *
668
+ * @param string $object_name The object or variable name
669
+ * @param array $object_value The object value
670
+ */
671
+ function auxin_print_script_object( $object_name, $object_value = array() ){
672
+
673
+ if( empty( $object_name ) ){
674
+ _doing_it_wrong( __FUNCTION__, 'The object name cannot be empty' );
675
+ return;
676
+ }
677
+ // remove unespected chars
678
+ $object_name = trim( $object_name, '.' );
679
+
680
+ if( false !== strpos( $object_name, '.') ){
681
+ $script = sprintf( 'auxinNS("%1$s"); %1$s=%2$s;', esc_js( $object_name ), wp_json_encode( $object_value ) );
682
+ } else {
683
+ $script = sprintf( 'var %1$s=%2$s;', esc_js( $object_name ), wp_json_encode( $object_value ) );
684
+ }
685
+
686
+ echo $script ? '<script>'. $script .'</script>' : '';
687
+ }
688
+
689
  /*-----------------------------------------------------------------------------------*/
690
  /* Returns post type menu name
691
  /*-----------------------------------------------------------------------------------*/
702
 
703
  }
704
 
705
+ /**
706
+ * Generates and retrieves a random token
707
+ *
708
+ * @param integer $length The token length
709
+ * @return strinf The random token
710
+ */
711
+ function auxin_random_token( $length = 32 ){
712
+ $length = ! is_numeric( $length ) ? 4 : $length;
713
+ $length = $length < 1 ? 32 : $length;
714
+
715
+ if ( function_exists('random_bytes') ) {
716
+ return bin2hex(random_bytes( $length ));
717
+ }
718
+ if (function_exists('mcrypt_create_iv')) {
719
+ return bin2hex(mcrypt_create_iv( $length, MCRYPT_DEV_URANDOM ));
720
+ }
721
+ if ( function_exists('openssl_random_pseudo_bytes') ) {
722
+ return bin2hex(openssl_random_pseudo_bytes( $length ));
723
+ }
724
+ }
725
+
726
 
727
  /*-----------------------------------------------------------------------------------*/
728
  /* A function to generate header and footer for all widgets
735
  'widget_info' => '',
736
  'widget_header' => '',
737
  'widget_title' => '',
738
+ 'widget_footer' => '',
739
+ 'ajax_data' => ''
740
  );
741
 
742
  // ----
749
  if( ! isset( $default_atts['content'] ) ){
750
  $default_atts['content'] = '';
751
  }
752
+ if( empty( $default_atts['universal_id'] ) ){
753
+ $default_atts['universal_id'] = 'au'.auxin_random_token(4);
754
+ }
755
+ if( ! isset( $default_atts['skip_wrappers'] ) ){
756
+ $default_atts['skip_wrappers'] = false;
757
+ }
758
+ if( ! isset( $default_atts['loadmore_type'] ) ){
759
+ $default_atts['loadmore_type'] = '';
760
+ }
761
+ if( ! isset( $default_atts['base'] ) ){
762
+ $default_atts['base'] = '';
763
+ }
764
 
765
  // Widget general info
766
  $before_widget = $after_widget = '';
789
  // make the result params filterable prior to generating markup variables
790
  $result = apply_filters( 'auxin_pre_widget_scafold_params', $result, $atts, $default_atts, $shortcode_content );
791
 
792
+ if( $result['parsed_atts']['skip_wrappers'] ){
793
+ return $result;
794
+ }
795
+
796
+ if( ! empty( $result['parsed_atts']['loadmore_type'] ) ){
797
+
798
+ if( empty( $result['parsed_atts']["base"] ) ){
799
+ _doing_it_wrong( __FUNCTION__, 'For using ajax load more feature, "base" parameter in element default attributes is required.' );
800
+ }
801
+
802
+ $ajax_args = $result['parsed_atts'];
803
+
804
+ // remove redundant ajax args
805
+ unset( $ajax_args['base'] );
806
+ unset( $ajax_args['base_class'] );
807
+ unset( $ajax_args['use_wp_query'] );
808
+
809
+ // force the element not to render wrappers for ajax handler
810
+ $ajax_args['skip_wrappers'] = true;
811
+
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'];
819
+ }
820
+
821
  // Defining extra class names --------------
822
 
823
  // Add extra class names to class list here - widget-{element_name}
824
  $_css_classes[] = $result['parsed_atts']['base_class'];
825
 
826
+ $_css_classes[] = 'aux-parent-' . $result['parsed_atts']['universal_id'];
 
827
 
828
 
829
+ $_widget_classes = auxin_merge_css_classes( $_css_classes, $result['parsed_atts']['extra_classes'] );
830
+ $_widget_classes = esc_attr( trim( join( ' ', array_unique( $_widget_classes ) ) ) );
831
+
832
+ // Generate the opening tags for widget or shortcode element
833
  if( $before_widget ){
834
+
835
  $result['widget_header'] .= str_replace(
836
  array( 'class="', '<div'),
837
+ array( 'class="'.$_widget_classes.' ', '<section' ),
838
  $before_widget
839
  );
840
  } elseif ( !empty($result['parsed_atts']['custom_el_id']) ){
841
+ $result['widget_header'] .= sprintf('<section id="%s" class="%s">', $result['parsed_atts']['custom_el_id'], $_widget_classes );
842
  } else {
843
+ $result['widget_header'] .= sprintf('<section class="%s">', $_widget_classes );
844
  }
845
 
846
+ // Generate the title for widget or shortcode element
847
  if( ! empty( $result['parsed_atts']['title'] ) ){
848
  if( $before_title ){
849
  $result['widget_title'] .= $before_title . $result['parsed_atts']['title'] . $after_title;
852
  }
853
  }
854
 
855
+ // Generate the close tags for widget or shortcode element
856
  if( $after_widget ){
857
  // fix for the difference in end tag in siteorigin page builder
858
  $result['widget_footer'] .= str_replace( '</div', '</section', $after_widget );
860
  $result['widget_footer'] .= '</section><!-- widget-container -->';
861
  }
862
 
863
+ // Enable filtering the result variable
864
+ $result = apply_filters( 'auxin_widget_scafold_params', $result, $atts, $default_atts, $shortcode_content );
865
+
866
+ // Prints the javascript variable if load more is enabled
867
+ // We can modify the ajax args using "auxin_widget_scafold_params" filter
868
+ if( ! empty( $result['parsed_atts']['loadmore_type'] ) ){
869
+ // echo js dependencies
870
+ auxin_print_script_object( "auxin.content.loadmore." . $result['parsed_atts']['universal_id'], $result['ajax_data'] );
871
+ }
872
+
873
  return $result;
874
  }
875
 
includes/general-hooks.php CHANGED
@@ -158,7 +158,7 @@ function auxin_add_vc_field_types(){
158
  'hide_empty' => true
159
  ));
160
 
161
- $categories_list = array( ' ' => __('All Categories', AUXPFO_DOMAIN ) );
162
  foreach ( $categories as $key => $value_id ) {
163
  $categories_list[$value_id->term_id] = $value_id->name;
164
  }
@@ -456,7 +456,7 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
456
  $fields_sections_list['fields'][] = array(
457
  'title' => __('Custom Javascript in Head', 'auxin-elements'),
458
  'description' => sprintf( __('You can add your custom javascript code here.%s DO NOT use %s tag.', 'auxin-elements'), '<br />' , '<code>&lt;script&gt;</code>' )."<br />".
459
- __('In order to save your custom javascript code, you are expected to execute the code prior for saving.', 'auxin-elements'),
460
  'id' => 'auxin_user_custom_js_head',
461
  'section' => 'general-section-custom-js',
462
  'dependency' => array(),
@@ -470,7 +470,7 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
470
  $fields_sections_list['fields'][] = array(
471
  'title' => __('Custom Javascript in Footer', 'auxin-elements'),
472
  'description' => sprintf( __('You can add your custom javascript code here.%s DO NOT use %s tag.', 'auxin-elements'), '<br />' , '<code>&lt;script&gt;</code>' )."<br />".
473
- __('In order to save your custom javascript code, you are expected to execute the code prior for saving.', 'auxin-elements'),
474
  'id' => 'auxin_user_custom_js',
475
  'section' => 'general-section-custom-js',
476
  'dependency' => array(),
158
  'hide_empty' => true
159
  ));
160
 
161
+ $categories_list = array( ' ' => __('All Categories', 'auxin-elements' ) );
162
  foreach ( $categories as $key => $value_id ) {
163
  $categories_list[$value_id->term_id] = $value_id->name;
164
  }
456
  $fields_sections_list['fields'][] = array(
457
  'title' => __('Custom Javascript in Head', 'auxin-elements'),
458
  'description' => sprintf( __('You can add your custom javascript code here.%s DO NOT use %s tag.', 'auxin-elements'), '<br />' , '<code>&lt;script&gt;</code>' )."<br />".
459
+ __('In order to save your custom javascript code, you are expected to execute the code prior to saving.', 'auxin-elements'),
460
  'id' => 'auxin_user_custom_js_head',
461
  'section' => 'general-section-custom-js',
462
  'dependency' => array(),
470
  $fields_sections_list['fields'][] = array(
471
  'title' => __('Custom Javascript in Footer', 'auxin-elements'),
472
  'description' => sprintf( __('You can add your custom javascript code here.%s DO NOT use %s tag.', 'auxin-elements'), '<br />' , '<code>&lt;script&gt;</code>' )."<br />".
473
+ __('In order to save your custom javascript code, you are expected to execute the code prior to saving.', 'auxin-elements'),
474
  'id' => 'auxin_user_custom_js',
475
  'section' => 'general-section-custom-js',
476
  'dependency' => array(),
public/class-auxels.php CHANGED
@@ -86,6 +86,7 @@ class AUXELS {
86
  // Load AJAX spesific codes on demand
87
  if ( defined('DOING_AJAX') && DOING_AJAX ){
88
  include( AUXELS_ADMIN_DIR . '/includes/admin-ajax.php' );
 
89
  }
90
 
91
  // Load admin spesific codes
86
  // Load AJAX spesific codes on demand
87
  if ( defined('DOING_AJAX') && DOING_AJAX ){
88
  include( AUXELS_ADMIN_DIR . '/includes/admin-ajax.php' );
89
+ include( 'includes/frontend-ajax.php' );
90
  }
91
 
92
  // Load admin spesific codes
public/includes/frontend-ajax.php ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Load more ajax handler for "Recent Posts Grid" element
5
+ *
6
+ * @return void
7
+ */
8
+ function auxels_ajax_handler_element_load_more(){
9
+ if( ! defined( 'AUXIN_INC' ) ){
10
+ wp_send_json_success("Phlox theme is required.");
11
+ }
12
+ if( empty( $_POST["handler"] ) ){
13
+ wp_send_json_success("Please specify a handler.");
14
+ }
15
+ // Direct call is not alloweded
16
+ if( empty( $_POST['action'] ) ){
17
+ wp_send_json_error( __( 'Ajax action not found.', 'auxin-elements' ) );
18
+ }
19
+ if( empty( $_POST['args'] ) ){
20
+ wp_send_json_error( __( 'Ajax args is required.', 'auxin-elements' ) );
21
+ }
22
+ // Authorize the call
23
+ if( ! wp_verify_nonce( $_POST['nonce'], 'auxin_front_load_more' ) ){
24
+ wp_send_json_error( __( 'Authorization failed.', 'auxin-elements' ) );
25
+ }
26
+
27
+ $ajax_args = $_POST['args'];
28
+ $element_markup = '';
29
+
30
+ // include the required resources
31
+ require_once( AUXELS_INC_DIR . '/general-functions.php' );
32
+ require_once( THEME_DIR . AUXIN_INC . 'include/functions.php' );
33
+ require_once( THEME_DIR . AUXIN_INC . 'include/templates/templates-post.php' );
34
+
35
+ // take required actions based on custom handler (element base name)
36
+ switch( $_POST['handler'] ) {
37
+
38
+ case 'aux_recent_posts':
39
+ require_once( AUXELS_INC_DIR . '/elements/recent-posts-grid-carousel.php' );
40
+
41
+ // Get the element markup
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;
48
+ }
49
+
50
+ // if the output is empty
51
+ if( empty( $element_markup ) ){
52
+ wp_send_json_error( __( 'No data received.', 'auxin-elements' ) );
53
+ }
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
+ */
wpml-config.xml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <wpml-config>
2
+ <custom-fields>
3
+ <custom-field action="translate">page_subtitle</custom-field>
4
+ </custom-fields>
5
+ <admin-texts>
6
+ <key name="phlox_theme_options">
7
+ <key name="auxin_login_message"/>
8
+ <key name="auxin_login_logo_image"/>
9
+ <key name="auxin_login_logo_width"/>
10
+ <key name="auxin_login_logo_height"/>
11
+ </key>
12
+ </admin-texts>
13
+ </wpml-config>