Shortcodes and extra features for Phlox theme - Version 1.6.2

Version Description

Download this release

Release Info

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

Code changes from version 1.6.0 to 1.6.2

Files changed (44) hide show
  1. README.txt +8 -4
  2. admin/includes/admin-hooks.php +6 -0
  3. admin/includes/admin-the-functions.php +48 -0
  4. admin/includes/compatibility/siteorigin/fields/visualselect.class.php +2 -1
  5. auxin-elements.php +2 -2
  6. includes/classes/class-auxin-demo-importer.php +431 -221
  7. includes/classes/class-auxin-widget.php +3 -1
  8. includes/classes/class-auxin-wizard.php +20 -23
  9. includes/define.php +1 -1
  10. includes/elements/about-widget.php +1 -1
  11. includes/elements/accordion.php +2 -2
  12. includes/elements/audio.php +1 -1
  13. includes/elements/before-after.php +1 -1
  14. includes/elements/button.php +2 -2
  15. includes/elements/code.php +1 -1
  16. includes/elements/contact-box.php +1 -1
  17. includes/elements/contact-form.php +1 -1
  18. includes/elements/divider.php +1 -1
  19. includes/elements/dropcap.php +1 -1
  20. includes/elements/facebook.php +1 -1
  21. includes/elements/flickr.php +1 -1
  22. includes/elements/gallery.php +1 -1
  23. includes/elements/gmap.php +1 -1
  24. includes/elements/image.php +1 -1
  25. includes/elements/instagram-feed.php +1 -1
  26. includes/elements/latest-posts-slider.php +1 -1
  27. includes/elements/popular-posts-widget.php +1 -1
  28. includes/elements/quote.php +1 -1
  29. includes/elements/recent-posts-grid-carousel.php +6 -6
  30. includes/elements/recent-posts-land-style.php +12 -12
  31. includes/elements/recent-posts-masonry.php +14 -14
  32. includes/elements/recent-posts-tiles.php +11 -11
  33. includes/elements/recent-posts-timeline.php +5 -5
  34. includes/elements/recent-posts-widget.php +1 -1
  35. includes/elements/search.php +1 -1
  36. includes/elements/socials-list.php +1 -1
  37. includes/elements/staff.php +98 -96
  38. includes/elements/tabs.php +1 -1
  39. includes/elements/testomonial.php +4 -4
  40. includes/elements/text.php +1 -1
  41. includes/elements/touch-slider.php +1 -1
  42. includes/elements/video.php +1 -1
  43. includes/general-hooks.php +51 -10
  44. public/assets/js/wizard.js +29 -54
README.txt CHANGED
@@ -3,11 +3,11 @@ Contributors: averta
3
  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 PHP: 5.3
8
  Requires at least: 4.6
9
  Tested up to: 4.8.3
10
- Stable tag: 1.6.0
11
  License: GPLv3
12
  License URI: http://www.gnu.org/licenses/gpl.html
13
 
@@ -141,6 +141,10 @@ Bugs can be reported in our [support forums](http://wordpress.org/tags/auxin-ele
141
 
142
  == Changelog ==
143
 
 
 
 
 
144
  = Version 1.6.0 / (11.10.2017) =
145
  - [New]: Introducing setup Wizard for importing demo content and installing recommended plugins.
146
  - [New]: New Testimonial Widget added
@@ -219,5 +223,5 @@ Bugs can be reported in our [support forums](http://wordpress.org/tags/auxin-ele
219
 
220
  == Upgrade Notice ==
221
 
222
- = 1.6.0 =
223
- - [New]: Introducing setup Wizard for importing demo content and installing recommended plugins.
3
  Donate link: http://averta.net/
4
  License: GPLv3
5
  License URI: http://www.gnu.org/licenses/gpl.html
6
+ Tags: testimonial, gallery, page-builder, siteorigin, auxin, phlox, averta, auxin-elements, framework, widget, fullwidth, masonry, timeline, parallax
7
  Requires PHP: 5.3
8
  Requires at least: 4.6
9
  Tested up to: 4.8.3
10
+ Stable tag: 1.6.2
11
  License: GPLv3
12
  License URI: http://www.gnu.org/licenses/gpl.html
13
 
141
 
142
  == Changelog ==
143
 
144
+ = Version 1.6.2 / (23.10.2017) =
145
+ - [Improvement]: Improvement and bug fix for setup wizard.
146
+
147
+
148
  = Version 1.6.0 / (11.10.2017) =
149
  - [New]: Introducing setup Wizard for importing demo content and installing recommended plugins.
150
  - [New]: New Testimonial Widget added
223
 
224
  == Upgrade Notice ==
225
 
226
+ = 1.6.2 =
227
+ [Improvement]: Improvement and bug fix for setup wizard
admin/includes/admin-hooks.php CHANGED
@@ -592,3 +592,9 @@ function auxels_strip_style_tags_from_custom_css( $css_string ){
592
  add_filter( 'auxin_custom_css_string', 'auxels_strip_style_tags_from_custom_css' );
593
 
594
  /*-----------------------------------------------------------------------------------*/
 
 
 
 
 
 
592
  add_filter( 'auxin_custom_css_string', 'auxels_strip_style_tags_from_custom_css' );
593
 
594
  /*-----------------------------------------------------------------------------------*/
595
+
596
+ function auxin_update_custom_js_css_file_on_post_save( $post_ID ){
597
+ auxin_save_custom_js();
598
+ auxin_save_custom_css();
599
+ }
600
+ add_action( "save_post", "auxin_update_custom_js_css_file_on_post_save" );
admin/includes/admin-the-functions.php CHANGED
@@ -235,3 +235,51 @@ function auxin_get_remote_changelog( $item_name = '' ){
235
  return $response;
236
  }
237
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
235
  return $response;
236
  }
237
 
238
+
239
+ /**
240
+ * Searchs and removes unexpected fields and sections from metabox hub models
241
+ *
242
+ * @param array $models The list of metabox models
243
+ * @param array $args The metabox field and sections which should be dropped
244
+ * @return List of models
245
+ */
246
+ function auxin_remove_from_metabox_hub( $models, $args = array() ){
247
+
248
+ if( empty( $models ) ){
249
+ return;
250
+ }
251
+
252
+ $defaults = array(
253
+ 'model_ids' => array(), // the list of model IDs to be dropped
254
+ 'field_ids' => array() // the list of field IDs to be dropped
255
+ );
256
+
257
+ $args = wp_parse_args( $args, $defaults );
258
+
259
+ $args['model_ids' ] = (array) $args['model_ids'];
260
+ $args['field_ids' ] = (array) $args['field_ids'];
261
+
262
+ foreach ( $models as $model_info_index => $model_info ) {
263
+ // if similar field id detected, drop it
264
+ if( in_array( $model_info['model']->id, $args['model_ids' ] ) ){
265
+ unset( $models[ $model_info_index ] );
266
+ continue;
267
+ }
268
+
269
+ $fields = $model_info['model']->fields;
270
+
271
+ if( ! empty( $fields ) ){
272
+ foreach ( $fields as $field_index => $field ) {
273
+ if( empty( $field["id"] ) ){
274
+ continue;
275
+ }
276
+ if( in_array( $field["id"], $args['field_ids' ] ) ){
277
+ unset( $fields[ $field_index ] );
278
+ $models[ $model_info_index ]['model']->fields = $fields;
279
+ }
280
+ }
281
+ }
282
+ }
283
+
284
+ return $models;
285
+ }
admin/includes/compatibility/siteorigin/fields/visualselect.class.php CHANGED
@@ -16,7 +16,8 @@ class Auxin_SiteOrigin_Field_Visualselect extends SiteOrigin_Widget_Field_Base {
16
  $active_attr = ( $value == $id ) ? ' selected ' : "";
17
  $data_class = isset( $option_info['css_class'] ) && !empty( $option_info['css_class'] ) ? 'data-class="'. $option_info['css_class'].'"' : '';
18
  $data_symbol = empty( $data_class ) && isset( $option_info['image'] ) && ! empty( $option_info['image'] ) ? 'data-symbol="'. $option_info['image'].'"' : '';
19
- $output .= sprintf( '<option value="%s" %s %s %s>%s</option>', $id, $active_attr, $data_symbol, $data_class, $option_info['label'] );
 
20
  }
21
 
22
  $output .= '</select></div>';
16
  $active_attr = ( $value == $id ) ? ' selected ' : "";
17
  $data_class = isset( $option_info['css_class'] ) && !empty( $option_info['css_class'] ) ? 'data-class="'. $option_info['css_class'].'"' : '';
18
  $data_symbol = empty( $data_class ) && isset( $option_info['image'] ) && ! empty( $option_info['image'] ) ? 'data-symbol="'. $option_info['image'].'"' : '';
19
+ $data_video = ! empty( $option_info['video_src'] ) ? 'data-video-src="'. esc_attr( $option_info['video_src'] ).'"' : '';
20
+ $output .= sprintf( '<option value="%s" %s %s %s %s>%s</option>', $id, $active_attr, $data_symbol, $data_video, $data_class, $option_info['label'] );
21
  }
22
 
23
  $output .= '</select></div>';
auxin-elements.php CHANGED
@@ -12,7 +12,7 @@
12
  * Plugin Name: Phlox Core Elements
13
  * Plugin URI: https://wordpress.org/plugins/auxin-elements/
14
  * Description: Powerful and comprehensive plugin that extends the functionality of Phlox theme by adding new shortcodes, widgets and options
15
- * Version: 1.6.0
16
  * Author: averta
17
  * Author URI: http://averta.net
18
  * Text Domain: auxin-elements
@@ -68,7 +68,7 @@ if( is_admin() || false === get_transient( 'auxels_plugin_requirements_check' )
68
  'themes' => array(
69
  array(
70
  'name' => __('Phlox', 'auxin-elements'), // The theme name.
71
- 'version' => '1.8.0', // E.g. 1.0.0. If set, the active theme must be this version or higher.
72
  'is_callable' => '', // If set, this callable will be be checked for availability to determine if a theme is active.
73
  'file_exists' => get_template_directory() . '/auxin/auxin-include/auxin.php' // If set, this file will be checked for availability to determine if a theme is active.
74
  )
12
  * Plugin Name: Phlox Core Elements
13
  * Plugin URI: https://wordpress.org/plugins/auxin-elements/
14
  * Description: Powerful and comprehensive plugin that extends the functionality of Phlox theme by adding new shortcodes, widgets and options
15
+ * Version: 1.6.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.8.2', // 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-auxin-demo-importer.php CHANGED
@@ -56,12 +56,12 @@ class Auxin_Demo_Importer {
56
 
57
  if ( ! wp_verify_nonce( $_POST['verify'], 'aux-import-demo-' . $demo_ID ) ) {
58
  // This nonce is not valid.
59
- wp_send_json_error();
60
- }
61
 
62
  $data = $this->parse( 'http://averta.net/phlox/wordpress-theme/demo/api/?demo=' . $demo_ID, $demo_ID );
63
-
64
- if( ! empty( $data ) ) {
65
 
66
  $get_options = $_POST['options'];
67
 
@@ -75,53 +75,43 @@ class Auxin_Demo_Importer {
75
 
76
  if( isset( $option['import-media'] ) && isset( $data['medias'] ) ){
77
  $status[] = $this->import_medias( $data['medias'] );
78
- }
79
  if( isset( $data['content'] ) ){
80
  $status[] = $this->import_posts( $data['content'] );
81
  }
82
- if( isset( $data['widgets'] ) ){
83
- $status[] = $this->import_widgets( $data['widgets'] );
84
  }
85
  if( isset( $data['menus'] ) ){
86
  $status[] = $this->import_menus( $data['menus'] );
87
  }
88
- if( isset( $data['auxin_options'] ) ){
89
- $status[] = $this->import_auxin_options( $data['auxin_options'] );
90
- }
91
- if( isset( $data['site_options'] ) ){
92
- $status[] = $this->import_site_options( $data['site_options'] );
93
- }
94
 
95
  } else {
96
 
97
  if( isset( $option['medias'] ) && isset( $data['medias'] ) ){
98
  $status[] = $this->import_medias( $data['medias'] );
99
- }
100
  if( isset( $option['posts'] ) && isset( $data['content'] ) ){
101
  $status[] = $this->import_posts( $data['content'] );
102
  }
103
- if( isset( $option['widgets'] ) && isset( $data['widgets'] ) ){
104
- $status[] = $this->import_widgets( $data['widgets'] );
105
  }
106
  if( isset( $option['menus'] ) && isset( $data['menus'] ) ){
107
  $status[] = $this->import_menus( $data['menus'] );
108
  }
109
- if( isset( $option['options'] ) ){
110
- if( isset( $data['auxin_options'] ) ){
111
- $status[] = $this->import_auxin_options( $data['auxin_options'] );
112
- }
113
- if( isset( $data['site_options'] ) ){
114
- $status[] = $this->import_site_options( $data['site_options'] );
115
- }
116
- }
117
-
118
  }
119
 
120
  wp_send_json_success( $status );
121
 
122
  } else {
123
-
124
- wp_send_json_error();
125
 
126
  }
127
 
@@ -135,99 +125,117 @@ class Auxin_Demo_Importer {
135
  * @return Array
136
  */
137
  public function parse( $url, $id ) {
138
-
139
- $key = sanitize_key( 'auxin_demo_item_' . $id );
140
-
141
- if ( ! get_transient( $key ) ) {
142
- //Get JSON
143
- $request = wp_remote_get( $url );
144
- //If the remote request fails, wp_remote_get() will return a WP_Error
145
- if( is_wp_error( $request ) || ! current_user_can( 'import' ) ) wp_die();
146
- //proceed to retrieving the data
147
- $body = wp_remote_retrieve_body( $request );
148
- //translate the JSON into Array
149
- $data = json_decode( $body, true );
150
- //Add transient
151
- set_transient( $key, $data, 2 * HOUR_IN_SECONDS );
152
  }
153
 
154
- return get_transient( $key );
 
 
 
 
 
155
 
156
- }
 
 
157
 
158
  // Importers
159
- // =====================================================================
160
 
161
  /**
162
- * Import auxin customizer options data
163
  *
164
- * @param array $args
 
 
165
  *
166
  * @return String
167
  */
168
- public function import_auxin_options( array $args ) {
169
-
170
- foreach ( $args as $key => $value ) {
171
 
172
- // if ( empty( $value ) ) continue;
173
-
174
- auxin_update_option( $key , $value);
175
 
 
 
 
 
 
 
 
176
  }
177
 
178
- return 'auxin options dones';
179
-
180
- }
181
-
182
- /**
183
- * Import site options data
184
- *
185
- * @param array $args
186
- *
187
- * @return String
188
- */
189
- public function import_site_options( array $args ) {
190
-
191
- foreach ( $args as $key => $value ) {
192
-
193
- if ( empty( $value ) ) continue;
194
-
195
- if( $key === 'page_on_front' || $key === 'page_for_posts' ) {
196
  // Retrieves page object given its title.
197
- $page = get_page_by_title( $value );
198
- // Set $value to page ID
199
- $value = $page->ID;
200
  }
 
 
 
201
 
202
- update_option( $key, $value );
203
-
 
 
 
 
 
 
204
  }
205
 
206
- return 'site options dones';
 
 
 
 
 
207
 
208
  }
209
 
210
  /**
211
  * Import widgets data
212
  *
213
- * @param array $args
 
214
  *
215
  * @return String
216
  */
217
- public function import_widgets( array $args ) {
218
 
219
- $default_widgets = get_option( 'sidebars_widgets' );
220
-
221
- foreach ( $default_widgets as $key => $value ) {
 
 
 
 
 
 
 
 
222
 
223
- if (array_key_exists( $key, $args)) {
224
- $value = $args[$key];
225
- }
226
- $default_widgets[$key] = $value;
227
 
228
- }
 
 
 
 
229
 
230
- update_option( 'sidebars_widgets' , $default_widgets );
 
 
 
231
 
232
  return 'widgets dones';
233
 
@@ -242,6 +250,8 @@ class Auxin_Demo_Importer {
242
  */
243
  public function import_menus( array $args ) {
244
 
 
 
245
  foreach ($args as $menu_name => $menu_data) {
246
 
247
  $menu_exists = wp_get_nav_menu_object( $menu_name );
@@ -257,22 +267,52 @@ class Auxin_Demo_Importer {
257
  foreach ( $menu_data['items'] as $item_key => $item_value ) {
258
  //Keep 'menu-meta' in a variable
259
  $meta_data = $item_value['menu-meta'];
260
- //remove Non-standard 'menu-meta' from array
261
- array_pop( $item_value );
262
- //add new menu item
263
- $item_id = wp_update_nav_menu_item($menu_id, 0, $item_value);
 
 
 
 
 
 
 
 
 
 
 
264
  //Add 'meta-data' options for menu items
265
  foreach ($meta_data as $meta_key => $meta_value) {
266
 
267
  switch ( $meta_key ) {
268
  case '_menu_item_object_id':
269
- add_option( 'auxin-menu-item-old-parent-id-' . $meta_value, $item_id );
270
- $meta_value = $item_id;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
271
  break;
272
 
273
  case '_menu_item_menu_item_parent':
274
  if( (int) $meta_value != 0 ) {
275
- $meta_value = get_option( 'auxin-menu-item-old-parent-id-' . $meta_value );
 
 
 
 
 
276
  }
277
  break;
278
  }
@@ -292,6 +332,11 @@ class Auxin_Demo_Importer {
292
 
293
  }
294
 
 
 
 
 
 
295
  return 'menus dones';
296
 
297
  }
@@ -309,89 +354,194 @@ class Auxin_Demo_Importer {
309
  foreach ($args as $slug => $post) {
310
 
311
  $title = sanitize_text_field( $post['post_title'] ); // remove any junk
312
- $post_type = post_type_exists( $post['post_type'] ) ? $post['post_type'] : 'post';
313
-
314
- // If the page doesn't already exist, then create it (check by title)
315
- if ( ! get_page_by_title( $title, 'OBJECT', $post_type ) ) {
316
-
317
- $content = base64_decode( $post['post_content'] );
318
- $author_id = get_current_user_id();
319
-
320
- $post_id = wp_insert_post(
321
- array(
322
- 'post_title' => $title,
323
- 'post_content' => $content,
324
- 'post_excerpt' => $post['post_excerpt'],
325
- 'post_date' => $post['post_date'],
326
- 'post_password' => $post['post_password'],
327
- 'post_parent' => $post['post_parent'],
328
- 'post_type' => $post_type,
329
- 'post_author' => $author_id,
330
- 'post_status' => 'publish',
331
- )
332
- );
333
-
334
- if ( ! is_wp_error( $post_id ) ) {
335
-
336
- //Add post terms
 
 
 
 
 
337
  foreach ( $post['post_terms'] as $tax => $term ) {
338
 
339
- if( taxonomy_exists( $tax ) ){
 
 
 
 
 
 
 
 
 
 
 
 
 
340
 
341
  foreach ($term as $key => $value) {
342
 
343
- $term = term_exists( $value, $tax );
344
 
345
  // If the taxonomy doesn't exist, then we create it
346
- if ( 0 === $term || null === $term ) {
 
 
 
 
 
347
 
348
  $term = wp_insert_term(
349
- $value,
350
  $tax,
351
- array(
352
- 'slug' => strtolower( str_ireplace( ' ', '-', $value ) )
353
- )
354
  );
355
 
 
 
 
 
356
  }
 
 
357
  }
358
 
359
- wp_set_post_terms( $post_id, $term, $tax );
360
-
361
  }
362
 
363
  }
364
 
 
 
 
 
365
  foreach ( $post['post_meta'] as $meta_key => $meta_value ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
366
  update_post_meta( $post_id, $meta_key, $meta_value );
367
  }
 
368
 
369
- //Add auxin meta flag
370
- add_post_meta( $post_id, 'auxin_import_post', 'demo' );
371
-
372
- if( $post['post_thumb'] != "" ){
373
- /* Get Attachment ID */
374
- $attachment_id = $this->get_attachment_id( 'auxin_import_id', $post['post_thumb'] );
375
 
376
- if ( $attachment_id ) {
377
- set_post_thumbnail( $post_id, $attachment_id );
 
 
 
 
 
 
 
 
378
  }
379
-
380
  }
381
-
382
- } else {
 
 
383
 
384
- return 'posts faild!';
 
 
 
 
 
 
385
 
386
  }
387
 
 
 
 
 
 
 
 
388
  }
389
 
390
  }
391
 
392
  return 'posts dones';
393
 
394
- }
395
 
396
 
397
  /**
@@ -414,7 +564,53 @@ class Auxin_Demo_Importer {
414
  }
415
 
416
  // Custom Functionalities
417
- // =====================================================================
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
418
 
419
  /**
420
  * Get the attachment ID
@@ -428,26 +624,58 @@ class Auxin_Demo_Importer {
428
 
429
  global $wpdb;
430
 
431
- $meta = $wpdb->get_results( "
432
- SELECT *
433
- FROM $wpdb->postmeta
434
- WHERE
435
- meta_key='".$key."'
436
- AND
437
- meta_value='".$value."'
438
- ");
 
 
439
 
440
  if ( is_array($meta) && !empty($meta) && isset($meta[0]) ) {
441
- $meta = $meta[0];
442
  }
443
 
444
  if ( is_object( $meta ) ) {
445
  return $meta->post_id;
446
  } else {
447
- return false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
448
  }
449
 
450
- }
451
 
452
  /**
453
  * Insert attachment from url
@@ -458,60 +686,48 @@ class Auxin_Demo_Importer {
458
  *
459
  * @return Integer
460
  */
461
- public function insert_attachment( $import_id, $url, $post_id = null ) {
462
-
463
- //Check media existence
464
- if ( $this->attachment_exist( pathinfo( $url, PATHINFO_FILENAME ) ) ) return;
465
-
466
- if( !class_exists( 'WP_Http' ) ){
467
- include_once( ABSPATH . WPINC . '/class-http.php' );
 
 
 
 
 
468
  }
469
 
470
- // $http = new WP_Http();
471
- // $response = $http->request( $url );
472
-
473
- // if( $response['response']['code'] != 200 ) {
474
- // return false;
475
- // }
476
-
477
- // Retrieve the raw response from the HTTP request using the GET method for our image URL.
478
- $response = wp_remote_get( $url );
479
-
480
- if ( ! is_array( $response ) ) return false;
481
-
482
- $upload = wp_upload_bits( basename($url), null, $response['body'] );
483
-
484
- if( ! empty( $upload['error'] ) ) {
485
- return false;
486
  }
487
 
488
- $file_path = $upload['file'];
489
- $file_name = basename( $file_path );
490
- $file_type = wp_check_filetype( $file_name, null );
491
- $attachment_title = sanitize_file_name( pathinfo( $file_name, PATHINFO_FILENAME ) );
492
- $wp_upload_dir = wp_upload_dir();
493
-
494
- $post_info = array(
495
- 'guid' => $wp_upload_dir['url'] . '/' . $file_name,
496
- 'post_mime_type' => $file_type['type'],
497
- 'post_title' => $attachment_title,
498
- 'post_content' => '',
499
- 'post_status' => 'inherit',
500
- );
501
-
502
- // Create the attachment
503
- $attach_id = wp_insert_attachment( $post_info, $file_path, $post_id );
504
-
505
- // Include image.php
506
- require_once( ABSPATH . 'wp-admin/includes/image.php' );
507
-
508
- // Define attachment metadata
509
- $attach_data = wp_generate_attachment_metadata( $attach_id, $file_path );
510
-
511
- // Assign metadata to attachment
512
- wp_update_attachment_metadata( $attach_id, $attach_data );
513
 
514
- //Add auxin meta flag
515
  update_post_meta( $attach_id, 'auxin_import_id', $import_id );
516
 
517
  return $attach_id;
@@ -529,25 +745,19 @@ class Auxin_Demo_Importer {
529
 
530
  global $wpdb;
531
 
532
- $query = $wpdb->get_var( "
533
- SELECT COUNT(*)
534
- FROM
535
- $wpdb->posts AS p,
536
- $wpdb->postmeta AS m
537
- WHERE
538
- p.ID = m.post_ID
539
- AND p.post_type = 'attachment'
540
- AND m.meta_key = 'auxin_import_id'
541
- AND p.guid LIKE '%".$filename."%'
542
- ");
543
 
544
- if ( $query ) {
545
- return true;
546
- } else {
547
- return false;
548
- }
549
-
550
- }
551
 
552
 
553
- }//End class
56
 
57
  if ( ! wp_verify_nonce( $_POST['verify'], 'aux-import-demo-' . $demo_ID ) ) {
58
  // This nonce is not valid.
59
+ wp_send_json_error( 'Invalid Nonce' );
60
+ }
61
 
62
  $data = $this->parse( 'http://averta.net/phlox/wordpress-theme/demo/api/?demo=' . $demo_ID, $demo_ID );
63
+
64
+ if( ! empty( $data ) ) {
65
 
66
  $get_options = $_POST['options'];
67
 
75
 
76
  if( isset( $option['import-media'] ) && isset( $data['medias'] ) ){
77
  $status[] = $this->import_medias( $data['medias'] );
78
+ }
79
  if( isset( $data['content'] ) ){
80
  $status[] = $this->import_posts( $data['content'] );
81
  }
82
+ if( isset( $data['auxin_options'] ) ){
83
+ $status[] = $this->import_options( $data['auxin_options'], $data['site_options'], $data['theme_mods'] );
84
  }
85
  if( isset( $data['menus'] ) ){
86
  $status[] = $this->import_menus( $data['menus'] );
87
  }
88
+ if( isset( $data['widgets'] ) && isset( $data['widgets_data'] ) ){
89
+ $status[] = $this->import_widgets( $data['widgets'], $data['widgets_data'] );
90
+ }
 
 
 
91
 
92
  } else {
93
 
94
  if( isset( $option['medias'] ) && isset( $data['medias'] ) ){
95
  $status[] = $this->import_medias( $data['medias'] );
96
+ }
97
  if( isset( $option['posts'] ) && isset( $data['content'] ) ){
98
  $status[] = $this->import_posts( $data['content'] );
99
  }
100
+ if( isset( $option['options'] ) && isset( $data['auxin_options'] ) ){
101
+ $status[] = $this->import_options( $data['auxin_options'], $data['site_options'], $data['theme_mods'] );
102
  }
103
  if( isset( $option['menus'] ) && isset( $data['menus'] ) ){
104
  $status[] = $this->import_menus( $data['menus'] );
105
  }
106
+ if( isset( $option['widgets'] ) && isset( $data['widgets'] ) && isset( $data['widgets_data'] ) ){
107
+ $status[] = $this->import_widgets( $data['widgets'], $data['widgets_data'] );
108
+ }
 
 
 
 
 
 
109
  }
110
 
111
  wp_send_json_success( $status );
112
 
113
  } else {
114
+ wp_send_json_error( 'No Data Receives' );
 
115
 
116
  }
117
 
125
  * @return Array
126
  */
127
  public function parse( $url, $id ) {
128
+ //Get JSON
129
+ $request = wp_remote_get( $url );
130
+ //If the remote request fails, wp_remote_get() will return a WP_Error
131
+ if( is_wp_error( $request ) || ! current_user_can( 'import' ) ){
132
+ wp_send_json_error( 'Remote Request Fails' );
 
 
 
 
 
 
 
 
 
133
  }
134
 
135
+ //proceed to retrieving the data
136
+ $body = wp_remote_retrieve_body( $request );
137
+ // Check for error
138
+ if ( is_wp_error( $body ) ) {
139
+ wp_send_json_error( 'Retrieve Body Fails' );
140
+ }
141
 
142
+ //translate the JSON into Array
143
+ return json_decode( $body, true );
144
+ }
145
 
146
  // Importers
147
+ // =====================================================================
148
 
149
  /**
150
+ * Import options ( Customizer & Site Options )
151
  *
152
+ * @param array $auxin_options
153
+ * @param array $site_options
154
+ * @param array $theme_mods
155
  *
156
  * @return String
157
  */
158
+ public function import_options( array $auxin_options, array $site_options, array $theme_mods ) {
 
 
159
 
160
+ $auxin_custom_images = $this->get_options_by_type( 'image' );
 
 
161
 
162
+ foreach ( $auxin_options as $auxin_key => $auxin_value ) {
163
+ if ( in_array( $auxin_key, $auxin_custom_images ) && ! empty( $auxin_value ) ) {
164
+ // This line is for changing the old attachment ID with new one.
165
+ $auxin_value = $this->get_attachment_id( 'auxin_import_id', $auxin_value );
166
+ }
167
+ // Update exclusive auxin options
168
+ auxin_update_option( $auxin_key , $auxin_value);
169
  }
170
 
171
+ foreach ( $site_options as $site_key => $site_value ) {
172
+ // If option value is empty, continue...
173
+ if ( empty( $site_value ) ) continue;
174
+ // Else change some values :)
175
+ if( $site_key === 'page_on_front' || $site_key === 'page_for_posts' ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
176
  // Retrieves page object given its title.
177
+ $page = get_page_by_title( $site_value );
178
+ // Set $site_value to page ID
179
+ $site_value = $page->ID;
180
  }
181
+ // Finally update options :)
182
+ update_option( $site_key, $site_value );
183
+ }
184
 
185
+ foreach ( $theme_mods as $theme_mods_key => $theme_mods_value ) {
186
+ // Start theme mods loop:
187
+ if( $theme_mods_key === 'custom_logo' ) {
188
+ // This line is for changing the old attachment ID with new one.
189
+ $theme_mods_value = $this->get_attachment_id( 'auxin_import_id', $theme_mods_value );
190
+ }
191
+ // Update theme mods
192
+ set_theme_mod( $theme_mods_key , $theme_mods_value);
193
  }
194
 
195
+ // Stores css content in custom css file
196
+ auxin_save_custom_css();
197
+ // Stores JavaScript content in custom js file
198
+ auxin_save_custom_js();
199
+
200
+ return 'options dones';
201
 
202
  }
203
 
204
  /**
205
  * Import widgets data
206
  *
207
+ * @param array $widgets
208
+ * @param array $widgets_data
209
  *
210
  * @return String
211
  */
212
+ public function import_widgets( array $widgets, array $widgets_data ) {
213
 
214
+ if ( ! function_exists( 'wp_get_sidebars_widgets' ) ) {
215
+ require_once ABSPATH . WPINC . '/widgets.php';
216
+ }
217
+ $default_widgets = wp_get_sidebars_widgets();
218
+ // Import widgets
219
+ foreach ( $widgets as $key => $value ) {
220
+ if ( ! array_key_exists( $key, $default_widgets) ) continue;
221
+ $default_widgets[$key] = $value;
222
+ }
223
+ // Replace new widgets with old ones.
224
+ wp_set_sidebars_widgets( $default_widgets );
225
 
226
+ // Import widgets data
227
+ foreach ( $widgets_data as $data_key => $data_values ) {
 
 
228
 
229
+ foreach ( $data_values as $counter => $options ) {
230
+ // This line is for changing the old attachment ID with new one.
231
+ if( isset( $options['about_image'] ) ) {
232
+ $data_values[$counter]['about_image'] = $this->get_attachment_id( 'auxin_import_id', $options['about_image'] );
233
+ }
234
 
235
+ }
236
+ // Finally update widgets data.
237
+ update_option( $data_key, $data_values );
238
+ }
239
 
240
  return 'widgets dones';
241
 
250
  */
251
  public function import_menus( array $args ) {
252
 
253
+ global $wp_rewrite;
254
+
255
  foreach ($args as $menu_name => $menu_data) {
256
 
257
  $menu_exists = wp_get_nav_menu_object( $menu_name );
267
  foreach ( $menu_data['items'] as $item_key => $item_value ) {
268
  //Keep 'menu-meta' in a variable
269
  $meta_data = $item_value['menu-meta'];
270
+ $post_name = isset( $item_value['menu-item-object-id'] ) ? $item_value['menu-item-object-id'] : '';
271
+ //remove Non-standard items from nav_menu input array
272
+ unset( $item_value['menu-meta'] );
273
+ unset( $item_value['menu-item-attr-title'] );
274
+ unset( $item_value['menu-item-classes'] );
275
+ unset( $item_value['menu-item-description'] );
276
+ unset( $item_value['menu-item-object-id'] );
277
+ unset( $item_value['menu-item-url'] );
278
+
279
+ $item_id = wp_update_nav_menu_item( $menu_id, 0, $item_value );
280
+
281
+ if ( is_wp_error( $item_id ) ) {
282
+ continue;
283
+ }
284
+
285
  //Add 'meta-data' options for menu items
286
  foreach ($meta_data as $meta_key => $meta_value) {
287
 
288
  switch ( $meta_key ) {
289
  case '_menu_item_object_id':
290
+ // Create a flag transient
291
+ set_transient( 'auxin_menu_item_old_parent_id_' . $meta_value, $item_id, 3600 );
292
+ // Change exporter's object ID value
293
+ switch ( $item_value['menu-item-type'] ) {
294
+ case 'post_type':
295
+ $get_page = get_page_by_title( $post_name, 'OBJECT', $item_value['menu-item-object'] );
296
+ $meta_value = $get_page->ID;
297
+ break;
298
+ case 'taxonomy':
299
+ $get_term = get_term_by( 'name', $post_name, $item_value['menu-item-object'] );
300
+ $meta_value = (int) $get_term->term_id;
301
+ break;
302
+
303
+ default:
304
+ $meta_value = null;
305
+ }
306
  break;
307
 
308
  case '_menu_item_menu_item_parent':
309
  if( (int) $meta_value != 0 ) {
310
+ $meta_value = get_transient( 'auxin_menu_item_old_parent_id_' . $meta_value );
311
+ }
312
+ break;
313
+ case '_menu_item_url':
314
+ if( ! empty( $meta_value ) ) {
315
+ $meta_value = str_replace( "{{demo_home_url}}", get_site_url(), $meta_value );
316
  }
317
  break;
318
  }
332
 
333
  }
334
 
335
+ // Change permalink structure
336
+ $wp_rewrite->set_permalink_structure('/%postname%/');
337
+ // Automatic flushing of the WordPress rewrite rules
338
+ $wp_rewrite->flush_rules();
339
+
340
  return 'menus dones';
341
 
342
  }
354
  foreach ($args as $slug => $post) {
355
 
356
  $title = sanitize_text_field( $post['post_title'] ); // remove any junk
357
+ $post_type = $post['post_type'];
358
+ $get_page = get_page_by_title( $title, 'OBJECT', $post_type );
359
+
360
+ // If the post already exists or there is no post_type, then continue loop...
361
+ if ( ! post_type_exists( $post_type ) || ! empty( $get_page ) ) {
362
+ continue;
363
+ }
364
+
365
+ $content = base64_decode( $post['post_content'] );
366
+ $author_id = get_current_user_id();
367
+
368
+ $post_id = wp_insert_post(
369
+ array(
370
+ 'post_title' => $title,
371
+ 'post_content' => $content,
372
+ 'post_excerpt' => $post['post_excerpt'],
373
+ 'post_date' => $post['post_date'],
374
+ 'post_password' => $post['post_password'],
375
+ 'post_parent' => $post['post_parent'],
376
+ 'post_type' => $post_type,
377
+ 'post_author' => $author_id,
378
+ 'post_status' => 'publish',
379
+ )
380
+ );
381
+
382
+ if ( ! is_wp_error( $post_id ) ) {
383
+
384
+ //Check post terms existence
385
+ if ( ! empty( $post['post_terms'] ) ){
386
+ // Start adding post terms
387
  foreach ( $post['post_terms'] as $tax => $term ) {
388
 
389
+ if( $tax === 'post_format' ) {
390
+ // Get post_format key value
391
+ $term = array_keys( $term );
392
+ // Set post format (Video, Audio, Gallery, ...)
393
+ set_post_format( $post_id , $term[0] );
394
+
395
+ } else {
396
+
397
+ // If taxonomy not exists, then continue loop...
398
+ if( ! taxonomy_exists( $tax ) ){
399
+ continue;
400
+ }
401
+
402
+ $add_these_terms = array();
403
 
404
  foreach ($term as $key => $value) {
405
 
406
+ $term = term_exists( $key, $tax );
407
 
408
  // If the taxonomy doesn't exist, then we create it
409
+ if ( ! $term ) {
410
+
411
+ // Get parent term
412
+ $parent_term = $value != "0" ? get_term_by( 'name', $value, $tax ) : (object) array( 'term_id' => "0" );
413
+ $parent_term_ID = (int) $parent_term->term_id;
414
+ $term_args = $parent_term_ID ? array( 'parent' => $parent_term_ID ) : array();
415
 
416
  $term = wp_insert_term(
417
+ $key,
418
  $tax,
419
+ $term_args
 
 
420
  );
421
 
422
+ if ( is_wp_error( $term ) ) {
423
+ continue;
424
+ }
425
+
426
  }
427
+
428
+ $add_these_terms[] = $term['term_id'];
429
  }
430
 
431
+ // Add post terms
432
+ wp_set_post_terms( $post_id, $add_these_terms, $tax );
433
  }
434
 
435
  }
436
 
437
+ }
438
+
439
+ if ( ! empty( $post['post_meta'] ) ){
440
+ // Add post meta data
441
  foreach ( $post['post_meta'] as $meta_key => $meta_value ) {
442
+ // Unserialize when data is serialized
443
+ $meta_value = maybe_unserialize( $meta_value );
444
+
445
+ switch ( $meta_key ) {
446
+ case '_panels_data_preview':
447
+ case 'panels_data' :
448
+ $auxin_custom_images = $this->get_widget_by_type( array('attach_image', 'attach_images', 'aux_select_video', 'aux_select_audio') );
449
+ foreach ( $meta_value['widgets'] as $widgets_key => $widgets_value ) {
450
+ foreach ($widgets_value as $panel_key => $panel_value) {
451
+ if ( in_array( $panel_key, $auxin_custom_images ) && ! empty( $panel_key ) ) {
452
+ // This line is for changing the old attachment ID with new one.
453
+ if( strpos( $panel_value, ',' ) !== false ) {
454
+ $panel_value = explode( ",", $panel_value );
455
+ $gallery_widget = array();
456
+ foreach ( $panel_value as $gallery_key => $gallery_value ) {
457
+ $get_new_attachment = $this->get_attachment_id( 'auxin_import_id', $gallery_value );
458
+ if ( $get_new_attachment ) {
459
+ $gallery_widget[] = $get_new_attachment;
460
+ }
461
+ }
462
+ $panel_value = implode( ",", $gallery_widget );
463
+ } else {
464
+ $panel_value = $this->get_attachment_id( 'auxin_import_id', $panel_value );
465
+ }
466
+
467
+ $meta_value['widgets'][$widgets_key][$panel_key] = $panel_value;
468
+ }
469
+ }
470
+ }
471
+ break;
472
+ case '_thumbnail_id' :
473
+ case '_thumbnail_id2':
474
+ case '_format_audio_attachment':
475
+ case '_format_video_attachment':
476
+ case '_format_video_attachment_poster':
477
+ case '_format_gallery_type':
478
+ if( strpos( $meta_value, ',' ) !== false ) {
479
+ $meta_value = explode( ",", $meta_value );
480
+ $gallery_widget = array();
481
+ foreach ( $meta_value as $gallery_key => $gallery_value ) {
482
+ $get_new_attachment = $this->get_attachment_id( 'auxin_import_id', $gallery_value );
483
+ if ( $get_new_attachment ) {
484
+ $gallery_widget[] = $get_new_attachment;
485
+ }
486
+ }
487
+ $meta_value = implode( ",", $gallery_widget );
488
+ } else {
489
+ $meta_value = $this->get_attachment_id( 'auxin_import_id', $meta_value );
490
+ }
491
+ break;
492
+ }
493
+
494
  update_post_meta( $post_id, $meta_key, $meta_value );
495
  }
496
+ }
497
 
498
+ if ( ! empty( $post['comments'] ) ){
499
+ // Add post comments
500
+ foreach ( $post['comments'] as $comment_key => $comment_values ) {
501
+ $comment_values['comment_post_ID'] = $post_id;
502
+ $comment_old_ID = $comment_values['comment_ID'];
 
503
 
504
+ if ( $comment_values['comment_parent'] != 0 ) {
505
+ $comment_values['comment_parent'] = get_transient( 'auxin_comment_new_comment_id_' . $comment_values['comment_parent'] );
506
+ }
507
+
508
+ unset( $comment_values['comment_ID'] );
509
+ $comment_ID = wp_insert_comment( $comment_values );
510
+ if ( is_wp_error( $comment_ID ) ) {
511
+ continue;
512
+ } else {
513
+ set_transient( 'auxin_comment_new_comment_id_' . $comment_old_ID, $comment_ID, 3600 );
514
  }
 
515
  }
516
+ }
517
+
518
+ //Add auxin meta flag
519
+ add_post_meta( $post_id, 'auxin_import_post', 'demo' );
520
 
521
+ if( $post['post_thumb'] != "" ){
522
+ /* Get Attachment ID */
523
+ $attachment_id = $this->get_attachment_id( 'auxin_import_id', $post['post_thumb'] );
524
+
525
+ if ( $attachment_id ) {
526
+ set_post_thumbnail( $post_id, $attachment_id );
527
+ }
528
 
529
  }
530
 
531
+ // Trash the default WordPress Post, "Hello World," which has an ID of '1'.
532
+ wp_trash_post( 1 );
533
+
534
+ } else {
535
+
536
+ return 'posts faild!';
537
+
538
  }
539
 
540
  }
541
 
542
  return 'posts dones';
543
 
544
+ }
545
 
546
 
547
  /**
564
  }
565
 
566
  // Custom Functionalities
567
+ // =====================================================================
568
+
569
+ /**
570
+ * Get options (ID) by type
571
+ *
572
+ * @param string $type
573
+ * @param array $output
574
+ *
575
+ * @return array | empty array
576
+ */
577
+ public function get_options_by_type( $type, $output = array() ) {
578
+
579
+ $get_options = auxin_get_defined_options();
580
+
581
+ foreach ( $get_options['fields'] as $key => $value ) {
582
+ if ( ! array_search( $type, $value ) ) {
583
+ continue;
584
+ }
585
+ $output[] = $value['id'];
586
+ }
587
+
588
+ return $output;
589
+ }
590
+
591
+ /**
592
+ * Get page builder (param_name) by type
593
+ *
594
+ * @param string $type
595
+ * @param array $output
596
+ *
597
+ * @return array | empty array
598
+ */
599
+ public function get_widget_by_type( array $type, $output = array() ) {
600
+
601
+ $get_widgets = Auxin_Widget_Shortcode_Map::get_instance()->get_master_array();
602
+
603
+ foreach ( $get_widgets as $key => $value ) {
604
+ foreach ( $value['params'] as $params_key => $params_value ) {
605
+ if ( ! in_array( $params_value['type'], $type ) ) {
606
+ continue;
607
+ }
608
+ $output[] = $params_value['param_name'];
609
+ }
610
+ }
611
+
612
+ return $output;
613
+ }
614
 
615
  /**
616
  * Get the attachment ID
624
 
625
  global $wpdb;
626
 
627
+ $meta = $wpdb->get_results( "
628
+ SELECT *
629
+ FROM $wpdb->postmeta
630
+ WHERE
631
+ meta_key='".$key."'
632
+ AND
633
+ meta_value='".$value."'
634
+ OR
635
+ meta_key='auxin_attachment_has_duplicate_".$value."'
636
+ ");
637
 
638
  if ( is_array($meta) && !empty($meta) && isset($meta[0]) ) {
639
+ $meta = $meta[0];
640
  }
641
 
642
  if ( is_object( $meta ) ) {
643
  return $meta->post_id;
644
  } else {
645
+ return null;
646
+ }
647
+
648
+ }
649
+
650
+ /**
651
+ * Get the attachment ID by PATHINFO_BASENAME
652
+ *
653
+ * @param string $path
654
+ *
655
+ * @return ID | false
656
+ */
657
+ public function get_attachment_id_by_basename( $path ) {
658
+
659
+ global $wpdb;
660
+
661
+ $post = $wpdb->get_results( "
662
+ SELECT *
663
+ FROM $wpdb->posts
664
+ WHERE
665
+ guid LIKE '%".$path."%'
666
+ ");
667
+
668
+ if ( is_array($post) && !empty($post) && isset($post[0]) ) {
669
+ $post = $post[0];
670
+ }
671
+
672
+ if ( is_object( $post ) ) {
673
+ return $post->ID;
674
+ } else {
675
+ return null;
676
  }
677
 
678
+ }
679
 
680
  /**
681
  * Insert attachment from url
686
  *
687
  * @return Integer
688
  */
689
+ public function insert_attachment( $import_id, $url, $post_id = 0 ) {
690
+
691
+ // Check if media exist then get out
692
+ if ( $this->attachment_exist( pathinfo( $url, PATHINFO_BASENAME ) ) ) {
693
+ // Add meta data for duplicated videos
694
+ if( pathinfo( $url, PATHINFO_FILENAME ) == "video" ) {
695
+ $imported_id = $this->get_attachment_id_by_basename( pathinfo( $url, PATHINFO_BASENAME ) );
696
+ update_post_meta( $imported_id, 'auxin_attachment_has_duplicate_' . $import_id , $import_id );
697
+ return;
698
+ } else {
699
+ return;
700
+ }
701
  }
702
 
703
+ if ( ! function_exists('media_sideload_image') ) {
704
+ require_once(ABSPATH . "wp-admin" . '/includes/image.php');
705
+ require_once(ABSPATH . "wp-admin" . '/includes/file.php');
706
+ require_once(ABSPATH . "wp-admin" . '/includes/media.php');
 
 
 
 
 
 
 
 
 
 
 
 
707
  }
708
 
709
+ $attach_id = media_sideload_image( $url, $post_id, null, 'id' );
710
+
711
+ // Maybe it's a Video/Audio So:
712
+ if ( is_wp_error( $attach_id ) ){
713
+
714
+ $file_array = array();
715
+ $file_array['name'] = basename( $url );
716
+ // Download file to temp location.
717
+ $file_array['tmp_name'] = download_url( $url );
718
+ // If error storing temporarily, return the error.
719
+ if ( is_wp_error( $file_array['tmp_name'] ) ) {
720
+ return;
721
+ }
722
+ // Do the validation and storage stuff.
723
+ $attach_id = media_handle_sideload( $file_array, $post_id );
724
+ // If error storing temporarily, return the error.
725
+ if ( is_wp_error( $attach_id ) ) {
726
+ return;
727
+ }
728
+ }
 
 
 
 
 
729
 
730
+ //Add auxin meta flag on attachment
731
  update_post_meta( $attach_id, 'auxin_import_id', $import_id );
732
 
733
  return $attach_id;
745
 
746
  global $wpdb;
747
 
748
+ return $wpdb->get_var( "
749
+ SELECT COUNT(*)
750
+ FROM
751
+ $wpdb->posts AS p,
752
+ $wpdb->postmeta AS m
753
+ WHERE
754
+ p.ID = m.post_ID
755
+ AND p.post_type = 'attachment'
756
+ AND m.meta_key = 'auxin_import_id'
757
+ AND p.guid LIKE '%/".$filename."%'
758
+ " );
759
 
760
+ }
 
 
 
 
 
 
761
 
762
 
763
+ }//End class
includes/classes/class-auxin-widget.php CHANGED
@@ -272,7 +272,9 @@ class Auxin_Widget extends WP_Widget {
272
  $active_attr = ( $tmp_instance_id == $id ) ? ' selected ' : "";
273
  $data_class = isset( $option_info['css_class'] ) && ! empty( $option_info['css_class'] ) ? 'data-class="'. $option_info['css_class'].'"' : '';
274
  $data_symbol = empty( $data_class ) && isset( $option_info['image'] ) && ! empty( $option_info['image'] ) ? 'data-symbol="'. $option_info['image'].'"' : '';
275
- $output .= sprintf( '<option value="%s" %s %s %s>%s</option>', $id, $active_attr, $data_symbol, $data_class, $option_info['label'] );
 
 
276
  }
277
  $output .= '</select>';
278
  if ( $field["description"] ) {
272
  $active_attr = ( $tmp_instance_id == $id ) ? ' selected ' : "";
273
  $data_class = isset( $option_info['css_class'] ) && ! empty( $option_info['css_class'] ) ? 'data-class="'. $option_info['css_class'].'"' : '';
274
  $data_symbol = empty( $data_class ) && isset( $option_info['image'] ) && ! empty( $option_info['image'] ) ? 'data-symbol="'. $option_info['image'].'"' : '';
275
+ $data_video = ! empty( $option_info['video_src'] ) ? 'data-video-src="'. esc_attr( $option_info['video_src'] ).'"' : '';
276
+
277
+ $output .= sprintf( '<option value="%s" %s %s %s %s>%s</option>', $id, $active_attr, $data_symbol,$data_video, $data_class, $option_info['label'] );
278
  }
279
  $output .= '</select>';
280
  if ( $field["description"] ) {
includes/classes/class-auxin-wizard.php CHANGED
@@ -185,7 +185,8 @@ class Auxin_Wizard {
185
  'nextstep_text' => esc_html__( 'Next Step', 'auxin-elements' ),
186
  'activate_text' => esc_html__( 'Install Plugins', 'auxin-elements' ),
187
  'makedemo_text' => esc_html__( 'Install Demo', 'auxin-elements' ),
188
- 'btnworks_text' => esc_html__( 'Work In Progress...', 'auxin-elements' )
 
189
  ) );
190
 
191
  }
@@ -257,12 +258,7 @@ class Auxin_Wizard {
257
  * @return boolean
258
  */
259
  public function is_appearance_submenu() {
260
-
261
- if ( empty ( $GLOBALS['admin_page_hooks'][$this->parent_slug] ) ) {
262
- return true;
263
- } else {
264
- return false;
265
- }
266
  }
267
 
268
  /**
@@ -383,24 +379,16 @@ class Auxin_Wizard {
383
  <ol class="aux-setup-steps">
384
  <?php foreach ( $ouput_steps as $step_key => $step ) : ?>
385
  <li class="<?php
386
- $show_link = false;
387
  if ( $step_key === $this->step ) {
388
  echo 'active';
389
  } elseif ( array_search( $this->step, array_keys( $this->steps ) ) > array_search( $step_key, array_keys( $this->steps ) ) ) {
390
  echo 'done';
391
- $show_link = true;
392
  } else {
393
  echo 'queue';
394
  }
395
- ?>"><?php
396
- if ( $show_link ) {
397
- ?>
398
- <a href="<?php echo esc_url( $this->get_step_link( $step_key ) ); ?>"><?php echo esc_html( $step['name'] ); ?></a>
399
- <?php
400
- } else {
401
- echo esc_html( $step['name'] );
402
- }
403
- ?></li>
404
  <?php endforeach; ?>
405
  </ol>
406
  <?php
@@ -437,7 +425,7 @@ class Auxin_Wizard {
437
  /* First Step (Welcome)
438
  /*-----------------------------------------------------------------------------------*/
439
  public function setup_introduction() {
440
- if ( 0 && get_option( 'aux_setup_complete', false ) ) {
441
  ?>
442
  <div class="aux-welcome-step">
443
  <h1><?php printf( __( 'Beautiful Portfolio %s Websites, Free with %s Phlox Theme.', 'auxin-elements' ), '<br />', '<br />' ); ?></h1>
@@ -749,7 +737,9 @@ class Auxin_Wizard {
749
 
750
  <div class="aux-setup-actions step">
751
  <a href="<?php echo esc_url( $this->get_next_step_link() ); ?>"
752
- class="aux-button aux-primary button-next"><?php esc_html_e( 'Continue', 'auxin-elements' ); ?></a>
 
 
753
  </div>
754
  <?php
755
  } ?>
@@ -1012,7 +1002,7 @@ class Auxin_Wizard {
1012
  <div class="aux-return-back">
1013
  <?php if ( $has_plugin_required ) : ?>
1014
  <div class="aux-alert">
1015
- <p><?php esc_html_e( 'You need to active all plugins.', 'auxin-elements' ); ?></p>
1016
  </div>
1017
  <a href="<?php echo esc_url( $this->get_next_step_link() ); ?>"
1018
  class="aux-button aux-medium aux-primary button-next"
@@ -1030,7 +1020,13 @@ class Auxin_Wizard {
1030
  ><?php esc_html_e( 'Install Demo', 'auxin-elements' ); ?></a>
1031
  <?php endif; ?>
1032
  </div>
1033
- <div class="progressbar hide"></div>
 
 
 
 
 
 
1034
  </div>
1035
  </div>
1036
  </div>
@@ -1091,7 +1087,8 @@ class Auxin_Wizard {
1091
  /*-----------------------------------------------------------------------------------*/
1092
  public function setup_ready() {
1093
 
1094
- update_option( 'aux_setup_complete', time() );
 
1095
  ?>
1096
 
1097
  <div class="aux-final-step">
185
  'nextstep_text' => esc_html__( 'Next Step', 'auxin-elements' ),
186
  'activate_text' => esc_html__( 'Install Plugins', 'auxin-elements' ),
187
  'makedemo_text' => esc_html__( 'Install Demo', 'auxin-elements' ),
188
+ 'btnworks_text' => esc_html__( 'Work In Progress...', 'auxin-elements' ),
189
+ 'onbefore_text' => esc_html__( 'Please do not refresh or leave the page during the wizard\'s process.', 'auxin-elements' )
190
  ) );
191
 
192
  }
258
  * @return boolean
259
  */
260
  public function is_appearance_submenu() {
261
+ return empty ( $GLOBALS['admin_page_hooks'][$this->parent_slug] );
 
 
 
 
 
262
  }
263
 
264
  /**
379
  <ol class="aux-setup-steps">
380
  <?php foreach ( $ouput_steps as $step_key => $step ) : ?>
381
  <li class="<?php
 
382
  if ( $step_key === $this->step ) {
383
  echo 'active';
384
  } elseif ( array_search( $this->step, array_keys( $this->steps ) ) > array_search( $step_key, array_keys( $this->steps ) ) ) {
385
  echo 'done';
 
386
  } else {
387
  echo 'queue';
388
  }
389
+ ?>">
390
+ <a href="<?php echo esc_url( $this->get_step_link( $step_key ) ); ?>"><?php echo esc_html( $step['name'] ); ?></a>
391
+ </li>
 
 
 
 
 
 
392
  <?php endforeach; ?>
393
  </ol>
394
  <?php
425
  /* First Step (Welcome)
426
  /*-----------------------------------------------------------------------------------*/
427
  public function setup_introduction() {
428
+ if ( 0 && get_transient( 'aux_setup_complete' ) ) {
429
  ?>
430
  <div class="aux-welcome-step">
431
  <h1><?php printf( __( 'Beautiful Portfolio %s Websites, Free with %s Phlox Theme.', 'auxin-elements' ), '<br />', '<br />' ); ?></h1>
737
 
738
  <div class="aux-setup-actions step">
739
  <a href="<?php echo esc_url( $this->get_next_step_link() ); ?>"
740
+ class="aux-button aux-primary button-next"><?php esc_html_e( 'Next Step', 'auxin-elements' ); ?></a>
741
+ <a href="<?php echo esc_url( $this->get_prev_step_link() ); ?>"
742
+ class="aux-button aux-outline button-next"><?php esc_html_e( 'Previous Step', 'auxin-elements' ); ?></a>
743
  </div>
744
  <?php
745
  } ?>
1002
  <div class="aux-return-back">
1003
  <?php if ( $has_plugin_required ) : ?>
1004
  <div class="aux-alert">
1005
+ <p><?php esc_html_e( 'You need to activate all above plugins.', 'auxin-elements' ); ?></p>
1006
  </div>
1007
  <a href="<?php echo esc_url( $this->get_next_step_link() ); ?>"
1008
  class="aux-button aux-medium aux-primary button-next"
1020
  ><?php esc_html_e( 'Install Demo', 'auxin-elements' ); ?></a>
1021
  <?php endif; ?>
1022
  </div>
1023
+ <div class="aux-progress hide">
1024
+ <div class="aux-big">
1025
+ <div class="aux-progress-bar aux-progress-info aux-progress-active" data-percent="100" style="transition: none; width: 100%;">
1026
+ <span class="aux-progress-label"><?php esc_html_e( 'Please wait, this may take several minutes ..', 'auxin-elements' ); ?></span>
1027
+ </div>
1028
+ </div>
1029
+ </div>
1030
  </div>
1031
  </div>
1032
  </div>
1087
  /*-----------------------------------------------------------------------------------*/
1088
  public function setup_ready() {
1089
 
1090
+ set_transient( 'aux_setup_complete', time(), 4 * YEAR_IN_SECONDS );
1091
+ set_transient( 'auxin_hide_core_plugin_notice', time(), 4 * YEAR_IN_SECONDS );
1092
  ?>
1093
 
1094
  <div class="aux-final-step">
includes/define.php CHANGED
@@ -12,7 +12,7 @@ if( ! defined( 'THEME_NAME' ) ){
12
  }
13
 
14
 
15
- define( 'AUXELS_VERSION' , '1.6.0' );
16
 
17
  define( 'AUXELS_SLUG' , 'auxin-elements' );
18
 
12
  }
13
 
14
 
15
+ define( 'AUXELS_VERSION' , '1.6.2' );
16
 
17
  define( 'AUXELS_SLUG' , 'auxin-elements' );
18
 
includes/elements/about-widget.php CHANGED
@@ -30,7 +30,7 @@ function get_auxin_about_widget( $master_array ) {
30
  'admin_enqueue_css' => '',
31
  'front_enqueue_js' => '',
32
  'front_enqueue_css' => '',
33
- 'icon' => 'auxin-element auxin-about',
34
  'custom_markup' => '',
35
  'js_view' => '',
36
  'html_template' => '',
30
  'admin_enqueue_css' => '',
31
  'front_enqueue_js' => '',
32
  'front_enqueue_css' => '',
33
+ 'icon' => 'aux-element aux-element-about',
34
  'custom_markup' => '',
35
  'js_view' => '',
36
  'html_template' => '',
includes/elements/accordion.php CHANGED
@@ -31,7 +31,7 @@ function auxin_get_new_accordion_master_array( $master_array ) {
31
  'admin_enqueue_css' => '',
32
  'front_enqueue_js' => '',
33
  'front_enqueue_css' => '',
34
- 'icon' => 'auxin-element auxin-accordion',
35
  'custom_markup' => '',
36
  'js_view' => '',
37
  'html_template' => '',
@@ -45,7 +45,7 @@ function auxin_get_new_accordion_master_array( $master_array ) {
45
  'description' => __('Accordion title, 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,
31
  'admin_enqueue_css' => '',
32
  'front_enqueue_js' => '',
33
  'front_enqueue_css' => '',
34
+ 'icon' => 'aux-element aux-element-accordion',
35
  'custom_markup' => '',
36
  'js_view' => '',
37
  'html_template' => '',
45
  'description' => __('Accordion title, leave it empty if you don`t need title.', 'auxin-elements'),
46
  'param_name' => 'title',
47
  'type' => 'textfield',
48
+ 'value' => __( 'Accordion Title', 'auxin-elements' ),
49
  'holder' => 'textfield',
50
  'class' => 'title',
51
  'admin_label' => true,
includes/elements/audio.php CHANGED
@@ -30,7 +30,7 @@ function auxin_get_audio_master_array( $master_array ) {
30
  'admin_enqueue_css' => '',
31
  'front_enqueue_js' => '',
32
  'front_enqueue_css' => '',
33
- 'icon' => 'auxin-element auxin-sound-cloud',
34
  'custom_markup' => '',
35
  'js_view' => '',
36
  'html_template' => '',
30
  'admin_enqueue_css' => '',
31
  'front_enqueue_js' => '',
32
  'front_enqueue_css' => '',
33
+ 'icon' => 'aux-element aux-element-sound-cloud',
34
  'custom_markup' => '',
35
  'js_view' => '',
36
  'html_template' => '',
includes/elements/before-after.php CHANGED
@@ -29,7 +29,7 @@ function auxin_get_before_after_master_array( $master_array ) {
29
  'admin_enqueue_css' => '',
30
  'front_enqueue_js' => '',
31
  'front_enqueue_css' => '',
32
- 'icon' => 'auxin-element auxin-image',
33
  'custom_markup' => '',
34
  'js_view' => '',
35
  'html_template' => '',
29
  'admin_enqueue_css' => '',
30
  'front_enqueue_js' => '',
31
  'front_enqueue_css' => '',
32
+ 'icon' => 'aux-element aux-element-image',
33
  'custom_markup' => '',
34
  'js_view' => '',
35
  'html_template' => '',
includes/elements/button.php CHANGED
@@ -30,7 +30,7 @@ function auxin_get_button_master_array( $master_array ) {
30
  'admin_enqueue_css' => '',
31
  'front_enqueue_js' => '',
32
  'front_enqueue_css' => '',
33
- 'icon' => 'auxin-element auxin-button',
34
  'custom_markup' => '',
35
  'js_view' => '',
36
  'html_template' => '',
@@ -143,7 +143,7 @@ function auxin_get_button_master_array( $master_array ) {
143
  ),
144
  array(
145
  'heading' => __('Darken the label','auxin-elements' ),
146
- 'description' => __('Darken label of button while mouse over it.','auxin-elements' ),
147
  'param_name' => 'dark',
148
  'type' => 'aux_switch',
149
  'value' => '0',
30
  'admin_enqueue_css' => '',
31
  'front_enqueue_js' => '',
32
  'front_enqueue_css' => '',
33
+ 'icon' => 'aux-element aux-element-button',
34
  'custom_markup' => '',
35
  'js_view' => '',
36
  'html_template' => '',
143
  ),
144
  array(
145
  'heading' => __('Darken the label','auxin-elements' ),
146
+ 'description' => __('Darken label of button.','auxin-elements' ),
147
  'param_name' => 'dark',
148
  'type' => 'aux_switch',
149
  'value' => '0',
includes/elements/code.php CHANGED
@@ -30,7 +30,7 @@ function auxin_get_code_master_array( $master_array ) {
30
  'admin_enqueue_css' => '',
31
  'front_enqueue_js' => '',
32
  'front_enqueue_css' => '',
33
- 'icon' => 'auxin-element auxin-code',
34
  'custom_markup' => '',
35
  'js_view' => '',
36
  'html_template' => '',
30
  'admin_enqueue_css' => '',
31
  'front_enqueue_js' => '',
32
  'front_enqueue_css' => '',
33
+ 'icon' => 'aux-element aux-element-code',
34
  'custom_markup' => '',
35
  'js_view' => '',
36
  'html_template' => '',
includes/elements/contact-box.php CHANGED
@@ -26,7 +26,7 @@ function get_auxin_contact_box( $master_array ) {
26
  'admin_enqueue_css' => '',
27
  'front_enqueue_js' => '',
28
  'front_enqueue_css' => '',
29
- 'icon' => 'auxin-element auxin-message-box',
30
  'custom_markup' => '',
31
  'js_view' => '',
32
  'html_template' => '',
26
  'admin_enqueue_css' => '',
27
  'front_enqueue_js' => '',
28
  'front_enqueue_css' => '',
29
+ 'icon' => 'aux-element aux-element-message-box',
30
  'custom_markup' => '',
31
  'js_view' => '',
32
  'html_template' => '',
includes/elements/contact-form.php CHANGED
@@ -30,7 +30,7 @@ function auxin_get_contact_form_master_array( $master_array ) {
30
  'admin_enqueue_css' => '',
31
  'front_enqueue_js' => '',
32
  'front_enqueue_css' => '',
33
- 'icon' => 'auxin-element auxin-contact-form',
34
  'custom_markup' => '',
35
  'js_view' => '',
36
  'html_template' => '',
30
  'admin_enqueue_css' => '',
31
  'front_enqueue_js' => '',
32
  'front_enqueue_css' => '',
33
+ 'icon' => 'aux-element aux-element-contact-form',
34
  'custom_markup' => '',
35
  'js_view' => '',
36
  'html_template' => '',
includes/elements/divider.php CHANGED
@@ -30,7 +30,7 @@ function auxin_get_divider_master_array( $master_array ) {
30
  'admin_enqueue_css' => '',
31
  'front_enqueue_js' => '',
32
  'front_enqueue_css' => '',
33
- 'icon' => 'auxin-element auxin-divider',
34
  'custom_markup' => '',
35
  'js_view' => '',
36
  'html_template' => '',
30
  'admin_enqueue_css' => '',
31
  'front_enqueue_js' => '',
32
  'front_enqueue_css' => '',
33
+ 'icon' => 'aux-element aux-element-divider',
34
  'custom_markup' => '',
35
  'js_view' => '',
36
  'html_template' => '',
includes/elements/dropcap.php CHANGED
@@ -29,7 +29,7 @@ function auxin_get_dropcap_master_array( $master_array ) {
29
  'admin_enqueue_css' => '',
30
  'front_enqueue_js' => '',
31
  'front_enqueue_css' => '',
32
- 'icon' => 'auxin-element auxin-dropcap',
33
  'custom_markup' => '',
34
  'js_view' => '',
35
  'html_template' => '',
29
  'admin_enqueue_css' => '',
30
  'front_enqueue_js' => '',
31
  'front_enqueue_css' => '',
32
+ 'icon' => 'aux-element aux-element-dropcap',
33
  'custom_markup' => '',
34
  'js_view' => '',
35
  'html_template' => '',
includes/elements/facebook.php CHANGED
@@ -30,7 +30,7 @@ function auxin_get_facebook_master_array( $master_array ) {
30
  'admin_enqueue_css' => '',
31
  'front_enqueue_js' => '',
32
  'front_enqueue_css' => '',
33
- 'icon' => 'auxin-element auxin-facebook',
34
  'custom_markup' => '',
35
  'js_view' => '',
36
  'html_template' => '',
30
  'admin_enqueue_css' => '',
31
  'front_enqueue_js' => '',
32
  'front_enqueue_css' => '',
33
+ 'icon' => 'aux-element aux-element-facebook',
34
  'custom_markup' => '',
35
  'js_view' => '',
36
  'html_template' => '',
includes/elements/flickr.php CHANGED
@@ -30,7 +30,7 @@ function auxin_get_flickr_master_array( $master_array ) {
30
  'admin_enqueue_css' => '',
31
  'front_enqueue_js' => '',
32
  'front_enqueue_css' => '',
33
- 'icon' => 'auxin-element auxin-flickr',
34
  'custom_markup' => '',
35
  'js_view' => '',
36
  'html_template' => '',
30
  'admin_enqueue_css' => '',
31
  'front_enqueue_js' => '',
32
  'front_enqueue_css' => '',
33
+ 'icon' => 'aux-element aux-element-flickr',
34
  'custom_markup' => '',
35
  'js_view' => '',
36
  'html_template' => '',
includes/elements/gallery.php CHANGED
@@ -29,7 +29,7 @@ function auxin_get_gallery_master_array( $master_array ) {
29
  'admin_enqueue_css' => '',
30
  'front_enqueue_js' => '',
31
  'front_enqueue_css' => '',
32
- 'icon' => 'auxin-element auxin-gallery',
33
  'custom_markup' => '',
34
  'js_view' => '',
35
  'html_template' => '',
29
  'admin_enqueue_css' => '',
30
  'front_enqueue_js' => '',
31
  'front_enqueue_css' => '',
32
+ 'icon' => 'aux-element aux-element-gallery',
33
  'custom_markup' => '',
34
  'js_view' => '',
35
  'html_template' => '',
includes/elements/gmap.php CHANGED
@@ -25,7 +25,7 @@ function auxin_get_gmap_master_array( $master_array ) {
25
  'admin_enqueue_css' => '',
26
  'front_enqueue_js' => '',
27
  'front_enqueue_css' => '',
28
- 'icon' => 'auxin-element auxin-google-maps',
29
  'custom_markup' => '',
30
  'js_view' => '',
31
  'html_template' => '',
25
  'admin_enqueue_css' => '',
26
  'front_enqueue_js' => '',
27
  'front_enqueue_css' => '',
28
+ 'icon' => 'aux-element aux-element-google-maps',
29
  'custom_markup' => '',
30
  'js_view' => '',
31
  'html_template' => '',
includes/elements/image.php CHANGED
@@ -29,7 +29,7 @@ function auxin_get_image_master_array( $master_array ) {
29
  'admin_enqueue_css' => '',
30
  'front_enqueue_js' => '',
31
  'front_enqueue_css' => '',
32
- 'icon' => 'auxin-element auxin-image',
33
  'custom_markup' => '',
34
  'js_view' => '',
35
  'html_template' => '',
29
  'admin_enqueue_css' => '',
30
  'front_enqueue_js' => '',
31
  'front_enqueue_css' => '',
32
+ 'icon' => 'aux-element aux-element-image',
33
  'custom_markup' => '',
34
  'js_view' => '',
35
  'html_template' => '',
includes/elements/instagram-feed.php CHANGED
@@ -29,7 +29,7 @@ function auxin_get_instagram_master_array( $master_array ) {
29
  'admin_enqueue_css' => '',
30
  'front_enqueue_js' => '',
31
  'front_enqueue_css' => '',
32
- 'icon' => 'auxin-element auxin-image',
33
  'custom_markup' => '',
34
  'js_view' => '',
35
  'html_template' => '',
29
  'admin_enqueue_css' => '',
30
  'front_enqueue_js' => '',
31
  'front_enqueue_css' => '',
32
+ 'icon' => 'aux-element aux-element-image',
33
  'custom_markup' => '',
34
  'js_view' => '',
35
  'html_template' => '',
includes/elements/latest-posts-slider.php CHANGED
@@ -29,7 +29,7 @@ function auxin_get_post_slider_master_array( $master_array ) {
29
  'admin_enqueue_css' => '',
30
  'front_enqueue_js' => '',
31
  'front_enqueue_css' => '',
32
- 'icon' => 'auxin-element auxin-post-slider',
33
  'custom_markup' => '',
34
  'js_view' => '',
35
  'html_template' => '',
29
  'admin_enqueue_css' => '',
30
  'front_enqueue_js' => '',
31
  'front_enqueue_css' => '',
32
+ 'icon' => 'aux-element aux-element-post-slider',
33
  'custom_markup' => '',
34
  'js_view' => '',
35
  'html_template' => '',
includes/elements/popular-posts-widget.php CHANGED
@@ -37,7 +37,7 @@ function auxin_get_popular_post_widget_master_array( $master_array ) {
37
  'admin_enqueue_css' => '',
38
  'front_enqueue_js' => '',
39
  'front_enqueue_css' => '',
40
- 'icon' => 'auxin-element auxin-code',
41
  'custom_markup' => '',
42
  'js_view' => '',
43
  'html_template' => '',
37
  'admin_enqueue_css' => '',
38
  'front_enqueue_js' => '',
39
  'front_enqueue_css' => '',
40
+ 'icon' => 'aux-element aux-element-code',
41
  'custom_markup' => '',
42
  'js_view' => '',
43
  'html_template' => '',
includes/elements/quote.php CHANGED
@@ -28,7 +28,7 @@ function auxin_get_quote_master_array( $master_array ) {
28
  'admin_enqueue_css' => '',
29
  'front_enqueue_js' => '',
30
  'front_enqueue_css' => '',
31
- 'icon' => 'auxin-element auxin-quote',
32
  'custom_markup' => '',
33
  'js_view' => '',
34
  'html_template' => '',
28
  'admin_enqueue_css' => '',
29
  'front_enqueue_js' => '',
30
  'front_enqueue_css' => '',
31
+ 'icon' => 'aux-element aux-element-quote',
32
  'custom_markup' => '',
33
  'js_view' => '',
34
  'html_template' => '',
includes/elements/recent-posts-grid-carousel.php CHANGED
@@ -43,7 +43,7 @@ function auxin_get_recent_posts_master_array( $master_array ) {
43
  'admin_enqueue_css' => '',
44
  'front_enqueue_js' => '',
45
  'front_enqueue_css' => '',
46
- 'icon' => 'auxin-element auxin-grid',
47
  'custom_markup' => '',
48
  'js_view' => '',
49
  'html_template' => '',
@@ -362,22 +362,22 @@ function auxin_get_recent_posts_master_array( $master_array ) {
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' ),
43
  'admin_enqueue_css' => '',
44
  'front_enqueue_js' => '',
45
  'front_enqueue_css' => '',
46
+ 'icon' => 'aux-element aux-element-grid',
47
  'custom_markup' => '',
48
  'js_view' => '',
49
  'html_template' => '',
362
  'choices' => array(
363
  '' => array(
364
  'label' => __('None', 'auxin-elements' ),
365
+ 'image' => AUXIN_URL . 'images/visual-select/load-more-none.svg'
366
  ),
367
  'scroll' => array(
368
  'label' => __('Infinite Scroll', 'auxin-elements' ),
369
+ 'image' => AUXIN_URL . 'images/visual-select/load-more-infinite.svg'
370
  ),
371
  'next' => array(
372
  'label' => __('Next Button', 'auxin-elements' ),
373
+ 'image' => AUXIN_URL . 'images/visual-select/load-more-button.svg'
374
  ),
375
  'next-prev' => array(
376
  'label' => __('Next Prev', 'auxin-elements' ),
377
+ 'image' => AUXIN_URL . 'images/visual-select/load-more-next-prev.svg'
378
  )
379
  )
380
+ ),
381
  array(
382
  'heading' => __('Excerpt length','auxin-elements' ),
383
  'description' => __('Specify summary content in character.','auxin-elements' ),
includes/elements/recent-posts-land-style.php CHANGED
@@ -43,7 +43,7 @@ function auxin_get_recent_posts_land_master_array( $master_array ) {
43
  'admin_enqueue_css' => '',
44
  'front_enqueue_js' => '',
45
  'front_enqueue_css' => '',
46
- 'icon' => 'auxin-element auxin-land',
47
  'custom_markup' => '',
48
  'js_view' => '',
49
  'html_template' => '',
@@ -325,22 +325,22 @@ function auxin_get_recent_posts_land_master_array( $master_array ) {
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' ),
@@ -448,14 +448,14 @@ function auxin_widget_recent_posts_land_style_callback( $atts, $shortcode_conten
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
  );
@@ -544,7 +544,7 @@ function auxin_widget_recent_posts_land_style_callback( $atts, $shortcode_conten
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
 
@@ -552,7 +552,7 @@ function auxin_widget_recent_posts_land_style_callback( $atts, $shortcode_conten
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() ) {
@@ -579,13 +579,13 @@ function auxin_widget_recent_posts_land_style_callback( $atts, $shortcode_conten
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>';
43
  'admin_enqueue_css' => '',
44
  'front_enqueue_js' => '',
45
  'front_enqueue_css' => '',
46
+ 'icon' => 'aux-element aux-element-land',
47
  'custom_markup' => '',
48
  'js_view' => '',
49
  'html_template' => '',
325
  'choices' => array(
326
  '' => array(
327
  'label' => __('None', 'auxin-elements' ),
328
+ 'image' => AUXIN_URL . 'images/visual-select/load-more-none.svg'
329
  ),
330
  'scroll' => array(
331
  'label' => __('Infinite Scroll', 'auxin-elements' ),
332
+ 'image' => AUXIN_URL . 'images/visual-select/load-more-infinite.svg'
333
  ),
334
  'next' => array(
335
  'label' => __('Next Button', 'auxin-elements' ),
336
+ 'image' => AUXIN_URL . 'images/visual-select/load-more-button.svg'
337
  ),
338
  'next-prev' => array(
339
  'label' => __('Next Prev', 'auxin-elements' ),
340
+ 'image' => AUXIN_URL . 'images/visual-select/load-more-next-prev.svg'
341
  )
342
  )
343
+ ),
344
  array(
345
  'heading' => __('Excerpt length','auxin-elements' ),
346
  'description' => __('Specify summary content in character.','auxin-elements' ),
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
  );
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
 
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() ) {
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>';
includes/elements/recent-posts-masonry.php CHANGED
@@ -43,7 +43,7 @@ function auxin_get_recent_posts_masonry_master_array( $master_array ) {
43
  'admin_enqueue_css' => '',
44
  'front_enqueue_js' => '',
45
  'front_enqueue_css' => '',
46
- 'icon' => 'auxin-element auxin-masonry',
47
  'custom_markup' => '',
48
  'js_view' => '',
49
  'html_template' => '',
@@ -305,22 +305,22 @@ function auxin_get_recent_posts_masonry_master_array( $master_array ) {
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' ),
@@ -481,15 +481,15 @@ function auxin_widget_recent_posts_masonry_callback( $atts, $shortcode_content =
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
 
@@ -578,7 +578,7 @@ function auxin_widget_recent_posts_masonry_callback( $atts, $shortcode_content =
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;
@@ -593,7 +593,7 @@ function auxin_widget_recent_posts_masonry_callback( $atts, $shortcode_content =
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() ) {
@@ -629,7 +629,7 @@ function auxin_widget_recent_posts_masonry_callback( $atts, $shortcode_content =
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 );
@@ -639,7 +639,7 @@ function auxin_widget_recent_posts_masonry_callback( $atts, $shortcode_content =
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>';
@@ -661,4 +661,4 @@ function auxin_widget_recent_posts_masonry_callback( $atts, $shortcode_content =
661
  echo $result['widget_footer'];
662
 
663
  return ob_get_clean();
664
- }
43
  'admin_enqueue_css' => '',
44
  'front_enqueue_js' => '',
45
  'front_enqueue_css' => '',
46
+ 'icon' => 'aux-element aux-element-masonry',
47
  'custom_markup' => '',
48
  'js_view' => '',
49
  'html_template' => '',
305
  'choices' => array(
306
  '' => array(
307
  'label' => __('None', 'auxin-elements' ),
308
+ 'image' => AUXIN_URL . 'images/visual-select/load-more-none.svg'
309
  ),
310
  'scroll' => array(
311
  'label' => __('Infinite Scroll', 'auxin-elements' ),
312
+ 'image' => AUXIN_URL . 'images/visual-select/load-more-infinite.svg'
313
  ),
314
  'next' => array(
315
  'label' => __('Next Button', 'auxin-elements' ),
316
+ 'image' => AUXIN_URL . 'images/visual-select/load-more-button.svg'
317
  ),
318
  'next-prev' => array(
319
  'label' => __('Next Prev', 'auxin-elements' ),
320
+ 'image' => AUXIN_URL . 'images/visual-select/load-more-next-prev.svg'
321
  )
322
  )
323
+ ),
324
  array(
325
  'heading' => __('Excerpt length','auxin-elements' ),
326
  'description' => __('Specify summary content in character.','auxin-elements' ),
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
 
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;
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() ) {
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 );
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>';
661
  echo $result['widget_footer'];
662
 
663
  return ob_get_clean();
664
+ }
includes/elements/recent-posts-tiles.php CHANGED
@@ -43,7 +43,7 @@ function auxin_get_recent_posts_tiles_master_array( $master_array ) {
43
  'admin_enqueue_css' => '',
44
  'front_enqueue_js' => '',
45
  'front_enqueue_css' => '',
46
- 'icon' => 'auxin-element auxin-tile',
47
  'custom_markup' => '',
48
  'js_view' => '',
49
  'html_template' => '',
@@ -152,22 +152,22 @@ function auxin_get_recent_posts_tiles_master_array( $master_array ) {
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' => '',
@@ -421,14 +421,14 @@ function auxin_widget_recent_posts_tiles_callback( $atts, $shortcode_content = n
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
  );
@@ -503,7 +503,7 @@ function auxin_widget_recent_posts_tiles_callback( $atts, $shortcode_content = n
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 );
@@ -548,11 +548,11 @@ function auxin_widget_recent_posts_tiles_callback( $atts, $shortcode_content = n
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 ){
43
  'admin_enqueue_css' => '',
44
  'front_enqueue_js' => '',
45
  'front_enqueue_css' => '',
46
+ 'icon' => 'aux-element aux-element-tile',
47
  'custom_markup' => '',
48
  'js_view' => '',
49
  'html_template' => '',
152
  'choices' => array(
153
  '' => array(
154
  'label' => __('None', 'auxin-elements' ),
155
+ 'image' => AUXIN_URL . 'images/visual-select/load-more-none.svg'
156
  ),
157
  'scroll' => array(
158
  'label' => __('Infinite Scroll', 'auxin-elements' ),
159
+ 'image' => AUXIN_URL . 'images/visual-select/load-more-infinite.svg'
160
  ),
161
  'next' => array(
162
  'label' => __('Next Button', 'auxin-elements' ),
163
+ 'image' => AUXIN_URL . 'images/visual-select/load-more-button.svg'
164
  ),
165
  'next-prev' => array(
166
  'label' => __('Next Prev', 'auxin-elements' ),
167
+ 'image' => AUXIN_URL . 'images/visual-select/load-more-next-prev.svg'
168
  )
169
  )
170
+ ),
171
  array(
172
  'heading' => __('Order by', 'auxin-elements'),
173
  'description' => '',
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
  );
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 );
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
@@ -37,7 +37,7 @@ function auxin_get_recent_posts_timeline_master_array( $master_array ) {
37
  'admin_enqueue_css' => '',
38
  'front_enqueue_js' => '',
39
  'front_enqueue_css' => '',
40
- 'icon' => 'auxin-element auxin-timeline',
41
  'custom_markup' => '',
42
  'js_view' => '',
43
  'html_template' => '',
@@ -195,19 +195,19 @@ function auxin_get_recent_posts_timeline_master_array( $master_array ) {
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
  ),
37
  'admin_enqueue_css' => '',
38
  'front_enqueue_js' => '',
39
  'front_enqueue_css' => '',
40
+ 'icon' => 'aux-element aux-element-timeline',
41
  'custom_markup' => '',
42
  'js_view' => '',
43
  'html_template' => '',
195
  'choices' => array(
196
  '' => array(
197
  'label' => __('None', 'auxin-elements' ),
198
+ 'image' => AUXIN_URL . 'images/visual-select/load-more-none.svg'
199
  ),
200
  'scroll' => array(
201
  'label' => __('Infinite Scroll', 'auxin-elements' ),
202
+ 'image' => AUXIN_URL . 'images/visual-select/load-more-infinite.svg'
203
  ),
204
  'next' => array(
205
  'label' => __('Next Button', 'auxin-elements' ),
206
+ 'image' => AUXIN_URL . 'images/visual-select/load-more-button.svg'
207
  ),
208
  'next-prev' => array(
209
  'label' => __('Next Prev', 'auxin-elements' ),
210
+ 'image' => AUXIN_URL . 'images/visual-select/load-more-next-prev.svg'
211
  )
212
  )
213
  ),
includes/elements/recent-posts-widget.php CHANGED
@@ -43,7 +43,7 @@ function auxin_get_recent_post_widget_master_array( $master_array ) {
43
  'admin_enqueue_css' => '',
44
  'front_enqueue_js' => '',
45
  'front_enqueue_css' => '',
46
- 'icon' => 'auxin-element auxin-code',
47
  'custom_markup' => '',
48
  'js_view' => '',
49
  'html_template' => '',
43
  'admin_enqueue_css' => '',
44
  'front_enqueue_js' => '',
45
  'front_enqueue_css' => '',
46
+ 'icon' => 'aux-element aux-element-code',
47
  'custom_markup' => '',
48
  'js_view' => '',
49
  'html_template' => '',
includes/elements/search.php CHANGED
@@ -28,7 +28,7 @@ function auxin_get_search_master_array( $master_array ) {
28
  'admin_enqueue_css' => '',
29
  'front_enqueue_js' => '',
30
  'front_enqueue_css' => '',
31
- 'icon' => 'auxin-element auxin-search',
32
  'custom_markup' => '',
33
  'js_view' => '',
34
  'html_template' => '',
28
  'admin_enqueue_css' => '',
29
  'front_enqueue_js' => '',
30
  'front_enqueue_css' => '',
31
+ 'icon' => 'aux-element aux-element-search',
32
  'custom_markup' => '',
33
  'js_view' => '',
34
  'html_template' => '',
includes/elements/socials-list.php CHANGED
@@ -29,7 +29,7 @@ function auxin_get_social_master_array( $master_array ) {
29
  'admin_enqueue_css' => '',
30
  'front_enqueue_js' => '',
31
  'front_enqueue_css' => '',
32
- 'icon' => 'auxin-element auxin-socials',
33
  'custom_markup' => '',
34
  'js_view' => '',
35
  'html_template' => '',
29
  'admin_enqueue_css' => '',
30
  'front_enqueue_js' => '',
31
  'front_enqueue_css' => '',
32
+ 'icon' => 'aux-element aux-element-socials',
33
  'custom_markup' => '',
34
  'js_view' => '',
35
  'html_template' => '',
includes/elements/staff.php CHANGED
@@ -16,7 +16,7 @@ function auxin_get_staff_master_array( $master_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,
@@ -26,12 +26,11 @@ function auxin_get_staff_master_array( $master_array ) {
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' => '',
@@ -70,6 +69,86 @@ function auxin_get_staff_master_array( $master_array ) {
70
  'group' => 'Staff Details' ,
71
  'edit_field_class' => ''
72
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
  array(
74
  'heading' => __('Wrapper style','auxin-elements'),
75
  'description' => '',
@@ -135,7 +214,10 @@ function auxin_get_staff_master_array( $master_array ) {
135
  'holder' => '',
136
  'class' => 'layout_border_color',
137
  'admin_label' => true,
138
- 'dependency' => '',
 
 
 
139
  'weight' => '',
140
  'group' => '' ,
141
  'edit_field_class' => ''
@@ -187,92 +269,12 @@ function auxin_get_staff_master_array( $master_array ) {
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' => '',
@@ -290,7 +292,7 @@ function auxin_get_staff_master_array( $master_array ) {
290
  'admin_label' => false,
291
  'dependency' => array(
292
  'element' => 'socials',
293
- 'value' => 'true'
294
  ),
295
  'weight' => '',
296
  'group' => 'Socials',
@@ -306,7 +308,7 @@ function auxin_get_staff_master_array( $master_array ) {
306
  'admin_label' => false,
307
  'dependency' => array(
308
  'element' => 'socials',
309
- 'value' => 'true'
310
  ),
311
  'weight' => '',
312
  'group' => 'Socials',
@@ -322,7 +324,7 @@ function auxin_get_staff_master_array( $master_array ) {
322
  'admin_label' => false,
323
  'dependency' => array(
324
  'element' => 'socials',
325
- 'value' => 'true'
326
  ),
327
  'weight' => '',
328
  'group' => 'Socials',
@@ -338,7 +340,7 @@ function auxin_get_staff_master_array( $master_array ) {
338
  'admin_label' => false,
339
  'dependency' => array(
340
  'element' => 'socials',
341
- 'value' => 'true'
342
  ),
343
  'weight' => '',
344
  'group' => 'Socials',
@@ -354,7 +356,7 @@ function auxin_get_staff_master_array( $master_array ) {
354
  'admin_label' => false,
355
  'dependency' => array(
356
  'element' => 'socials',
357
- 'value' => 'true'
358
  ),
359
  'weight' => '',
360
  'group' => 'Socials',
@@ -370,7 +372,7 @@ function auxin_get_staff_master_array( $master_array ) {
370
  'admin_label' => false,
371
  'dependency' => array(
372
  'element' => 'socials',
373
- 'value' => 'true'
374
  ),
375
  'weight' => '',
376
  'group' => 'Socials',
@@ -386,7 +388,7 @@ function auxin_get_staff_master_array( $master_array ) {
386
  'admin_label' => false,
387
  'dependency' => array(
388
  'element' => 'socials',
389
- 'value' => 'true'
390
  ),
391
  'weight' => '',
392
  'group' => 'Socials',
@@ -402,7 +404,7 @@ function auxin_get_staff_master_array( $master_array ) {
402
  'admin_label' => false,
403
  'dependency' => array(
404
  'element' => 'socials',
405
- 'value' => 'true'
406
  ),
407
  'weight' => '',
408
  'group' => 'Socials',
@@ -425,7 +427,7 @@ function auxin_get_staff_master_array( $master_array ) {
425
  'admin_label' => true,
426
  'dependency' => array(
427
  'element' => 'socials',
428
- 'value' => 'true'
429
  ),
430
  'weight' => '',
431
  'group' => 'Socials',
@@ -446,7 +448,7 @@ function auxin_get_staff_master_array( $master_array ) {
446
  'admin_label' => true,
447
  'dependency' => array(
448
  'element' => 'socials',
449
- 'value' => 'true'
450
  ),
451
  'weight' => '',
452
  'group' => 'Socials',
@@ -585,7 +587,7 @@ function auxin_widget_staff_callback( $atts, $shortcode_content = null ){
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
 
16
  'name' => __('[Phlox] Staff ', 'auxin-elements'),
17
  'auxin_output_callback' => 'auxin_widget_staff_callback',
18
  'base' => 'aux_staff',
19
+ 'description' => __('You can display your Staffs as a customized widget,', 'auxin-elements'),
20
  'class' => 'aux-widget-staff',
21
  'show_settings_on_create' => true,
22
  'weight' => 1,
26
  'is_vc' => true,
27
  'category' => THEME_NAME,
28
  'group' => '',
 
29
  'admin_enqueue_js' => '',
30
  'admin_enqueue_css' => '',
31
  'front_enqueue_js' => '',
32
  'front_enqueue_css' => '',
33
+ 'icon' => 'aux-element aux-element-staff',
34
  'custom_markup' => '',
35
  'js_view' => '',
36
  'html_template' => '',
69
  'group' => 'Staff Details' ,
70
  'edit_field_class' => ''
71
  ),
72
+ array(
73
+ 'heading' => __('Staff Page Link','auxin-elements'),
74
+ 'description' => __('leave it empty if you don`t need to add a page.', 'auxin-elements'),
75
+ 'param_name' => 'staff_link',
76
+ 'type' => 'textfield',
77
+ 'value' => '',
78
+ 'def_value' => '',
79
+ 'holder' => 'textfield',
80
+ 'class' => 'staff_link',
81
+ 'admin_label' => true,
82
+ 'dependency' => '',
83
+ 'weight' => '',
84
+ 'group' => 'Staff Details' ,
85
+ 'edit_field_class' => ''
86
+ ),
87
+ array(
88
+ 'heading' => __('Staff Image', 'auxin-elements'),
89
+ 'description' => '',
90
+ 'param_name' => 'staff_img',
91
+ 'type' => 'attach_image',
92
+ 'def_value' => '',
93
+ 'value' => '',
94
+ 'holder' => '',
95
+ 'class' => 'staff_img',
96
+ 'admin_label' => true,
97
+ 'dependency' => '',
98
+ 'weight' => '',
99
+ 'group' => 'Staff Details',
100
+ 'edit_field_class' => ''
101
+ ),
102
+ array(
103
+ 'heading' => __('Image Size','auxin-elements'),
104
+ 'description' => '',
105
+ 'param_name' => 'staff_img_size',
106
+ 'type' => 'dropdown',
107
+ 'def_value' => 'full',
108
+ 'value' => array (
109
+ 'full' => __( 'Orginal Size' , 'auxin-elements' ),
110
+ 'large' => __( 'Large' , 'auxin-elements' ),
111
+ 'medium' => __( 'Medium' , 'auxin-elements' ),
112
+ 'thumbnail' => __( 'Thumbnail' , 'auxin-elements' )
113
+ ),
114
+ 'holder' => 'dropdown',
115
+ 'class' => 'staff_img_size',
116
+ 'admin_label' => true,
117
+ 'weight' => '',
118
+ 'group' => 'Staff Details' ,
119
+ 'edit_field_class' => ''
120
+ ),
121
+ array(
122
+ 'heading' => __('Image shape','auxin-elements'),
123
+ 'description' => '',
124
+ 'param_name' => 'img_shape',
125
+ 'type' => 'aux_visual_select',
126
+ 'def_value' => '',
127
+ 'choices' => array(
128
+ 'circle' => array(
129
+ 'label' => __('Circle', 'auxin-elements'),
130
+ 'image' => AUXIN_URL . 'images/visual-select/icon-style-circle.svg'
131
+ ),
132
+ 'semi-circle' => array(
133
+ 'label' => __('Semi-circle', 'auxin-elements'),
134
+ 'image' => AUXIN_URL . 'images/visual-select/icon-style-semi-circle.svg'
135
+ ),
136
+ 'round-rect' => array(
137
+ 'label' => __('Round Rectangle', 'auxin-elements'),
138
+ 'image' => AUXIN_URL . 'images/visual-select/icon-style-round-rectangle.svg'
139
+ ),
140
+ 'rect' => array(
141
+ 'label' => __('Rectangle', 'auxin-elements'),
142
+ 'image' => AUXIN_URL . 'images/visual-select/icon-style-rectangle.svg'
143
+ ),
144
+ ),
145
+ 'holder' => 'dropdown',
146
+ 'class' => 'img_shape',
147
+ 'admin_label' => true,
148
+ 'weight' => '',
149
+ 'group' => 'Staff Details',
150
+ 'edit_field_class' => ''
151
+ ),
152
  array(
153
  'heading' => __('Wrapper style','auxin-elements'),
154
  'description' => '',
214
  'holder' => '',
215
  'class' => 'layout_border_color',
216
  'admin_label' => true,
217
+ 'dependency' => array(
218
+ 'element' => 'wrapper_style',
219
+ 'value' => array('simple','box'),
220
+ ),
221
  'weight' => '',
222
  'group' => '' ,
223
  'edit_field_class' => ''
269
  'group' => '' ,
270
  'edit_field_class' => ''
271
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
272
  array(
273
  'heading' => __('Enable Socials','auxin-elements' ),
274
  'description' => '',
275
  'param_name' => 'socials',
276
  'type' => 'checkbox',
277
+ 'value' => 1,
278
  'class' => '',
279
  'admin_label' => false,
280
  'dependency' => '',
292
  'admin_label' => false,
293
  'dependency' => array(
294
  'element' => 'socials',
295
+ 'value' => array('true', 1)
296
  ),
297
  'weight' => '',
298
  'group' => 'Socials',
308
  'admin_label' => false,
309
  'dependency' => array(
310
  'element' => 'socials',
311
+ 'value' => array('true', 1)
312
  ),
313
  'weight' => '',
314
  'group' => 'Socials',
324
  'admin_label' => false,
325
  'dependency' => array(
326
  'element' => 'socials',
327
+ 'value' => array('true', 1)
328
  ),
329
  'weight' => '',
330
  'group' => 'Socials',
340
  'admin_label' => false,
341
  'dependency' => array(
342
  'element' => 'socials',
343
+ 'value' => array('true', 1)
344
  ),
345
  'weight' => '',
346
  'group' => 'Socials',
356
  'admin_label' => false,
357
  'dependency' => array(
358
  'element' => 'socials',
359
+ 'value' => array('true', 1)
360
  ),
361
  'weight' => '',
362
  'group' => 'Socials',
372
  'admin_label' => false,
373
  'dependency' => array(
374
  'element' => 'socials',
375
+ 'value' => array('true', 1)
376
  ),
377
  'weight' => '',
378
  'group' => 'Socials',
388
  'admin_label' => false,
389
  'dependency' => array(
390
  'element' => 'socials',
391
+ 'value' => array('true', 1)
392
  ),
393
  'weight' => '',
394
  'group' => 'Socials',
404
  'admin_label' => false,
405
  'dependency' => array(
406
  'element' => 'socials',
407
+ 'value' => array('true', 1)
408
  ),
409
  'weight' => '',
410
  'group' => 'Socials',
427
  'admin_label' => true,
428
  'dependency' => array(
429
  'element' => 'socials',
430
+ 'value' => array('true', 1)
431
  ),
432
  'weight' => '',
433
  'group' => 'Socials',
448
  'admin_label' => true,
449
  'dependency' => array(
450
  'element' => 'socials',
451
+ 'value' => array('true', 1)
452
  ),
453
  'weight' => '',
454
  'group' => 'Socials',
587
  <?php $encoding_flag = defined('ENT_HTML401') ? ENT_HTML401 : ENT_QUOTES; ?>
588
  <?php echo do_shortcode( html_entity_decode( $content, $encoding_flag, 'UTF-8') ); ?>
589
  </div>
590
+ <?php } if ( auxin_is_true( $socials ) ) { ?>
591
  <div class="aux-staff-footer <?php echo esc_attr( $footer_classes ) ;?>">
592
  <ul class="aux-social-list">
593
 
includes/elements/tabs.php CHANGED
@@ -30,7 +30,7 @@ function auxin_get_tabs_master_array( $master_array ) {
30
  'admin_enqueue_css' => '',
31
  'front_enqueue_js' => '',
32
  'front_enqueue_css' => '',
33
- 'icon' => 'auxin-element auxin-tab',
34
  'custom_markup' => '',
35
  'js_view' => '',
36
  'html_template' => '',
30
  'admin_enqueue_css' => '',
31
  'front_enqueue_js' => '',
32
  'front_enqueue_css' => '',
33
+ 'icon' => 'aux-element aux-element-tab',
34
  'custom_markup' => '',
35
  'js_view' => '',
36
  'html_template' => '',
includes/elements/testomonial.php CHANGED
@@ -31,7 +31,7 @@ function auxin_get_testomonial_master_array( $master_array ) {
31
  'admin_enqueue_css' => '',
32
  'front_enqueue_js' => '',
33
  'front_enqueue_css' => '',
34
- 'icon' => 'auxin-element auxin-testomonial',
35
  'custom_markup' => '',
36
  'js_view' => '',
37
  'html_template' => '',
@@ -73,9 +73,9 @@ function auxin_get_testomonial_master_array( $master_array ) {
73
  'info-top' => array(
74
  'label' => __( 'Show Info on Top of Widget', 'auxin-elements' ),
75
  'image' => AUXIN_URL . 'images/visual-select/button-curved.svg'
76
- ),
77
  )
78
- ),
79
  array(
80
  'heading' => __('Customer Name','auxin-elements'),
81
  'description' => __('Customer Name, leave it empty if you don`t need title.', 'auxin-elements'),
@@ -189,7 +189,7 @@ function auxin_widget_testomonial_callback( $atts, $shortcode_content = null ){
189
  $result = auxin_get_widget_scafold( $atts, $default_atts );
190
 
191
  extract( $result['parsed_atts'] );
192
-
193
  $image = wp_get_attachment_image( $customer_img, 'thumbnail', "", array( "class" => "img-square" ) );
194
  $content = empty( $content ) ? $shortcode_content : $content ;
195
  $template = ' aux-testomonial-' . $template ;
31
  'admin_enqueue_css' => '',
32
  'front_enqueue_js' => '',
33
  'front_enqueue_css' => '',
34
+ 'icon' => 'aux-element aux-element-testomonial',
35
  'custom_markup' => '',
36
  'js_view' => '',
37
  'html_template' => '',
73
  'info-top' => array(
74
  'label' => __( 'Show Info on Top of Widget', 'auxin-elements' ),
75
  'image' => AUXIN_URL . 'images/visual-select/button-curved.svg'
76
+ ),
77
  )
78
+ ),
79
  array(
80
  'heading' => __('Customer Name','auxin-elements'),
81
  'description' => __('Customer Name, leave it empty if you don`t need title.', 'auxin-elements'),
189
  $result = auxin_get_widget_scafold( $atts, $default_atts );
190
 
191
  extract( $result['parsed_atts'] );
192
+
193
  $image = wp_get_attachment_image( $customer_img, 'thumbnail', "", array( "class" => "img-square" ) );
194
  $content = empty( $content ) ? $shortcode_content : $content ;
195
  $template = ' aux-testomonial-' . $template ;
includes/elements/text.php CHANGED
@@ -30,7 +30,7 @@ function auxin_get_text_master_array( $master_array ) {
30
  'admin_enqueue_css' => '',
31
  'front_enqueue_js' => '',
32
  'front_enqueue_css' => '',
33
- 'icon' => 'auxin-element auxin-text',
34
  'custom_markup' => '',
35
  'js_view' => '',
36
  'html_template' => '',
30
  'admin_enqueue_css' => '',
31
  'front_enqueue_js' => '',
32
  'front_enqueue_css' => '',
33
+ 'icon' => 'aux-element aux-element-text',
34
  'custom_markup' => '',
35
  'js_view' => '',
36
  'html_template' => '',
includes/elements/touch-slider.php CHANGED
@@ -30,7 +30,7 @@ function auxin_touch_slider_master_array( $master_array ) {
30
  'admin_enqueue_css' => '',
31
  'front_enqueue_js' => '',
32
  'front_enqueue_css' => '',
33
- 'icon' => 'auxin-element auxin-touch-slider',
34
  'custom_markup' => '',
35
  'js_view' => '',
36
  'html_template' => '',
30
  'admin_enqueue_css' => '',
31
  'front_enqueue_js' => '',
32
  'front_enqueue_css' => '',
33
+ 'icon' => 'aux-element aux-element-touch-slider',
34
  'custom_markup' => '',
35
  'js_view' => '',
36
  'html_template' => '',
includes/elements/video.php CHANGED
@@ -25,7 +25,7 @@ function auxin_get_video_master_array( $master_array ) {
25
  'admin_enqueue_css' => '',
26
  'front_enqueue_js' => '',
27
  'front_enqueue_css' => '',
28
- 'icon' => 'auxin-element auxin-video',
29
  'custom_markup' => '',
30
  'js_view' => '',
31
  'html_template' => '',
25
  'admin_enqueue_css' => '',
26
  'front_enqueue_js' => '',
27
  'front_enqueue_css' => '',
28
+ 'icon' => 'aux-element aux-element-video',
29
  'custom_markup' => '',
30
  'js_view' => '',
31
  'html_template' => '',
includes/general-hooks.php CHANGED
@@ -944,11 +944,6 @@ function auxin_ele_add_theme_options_to_js_file( $js ){
944
  $js['theme_options_google_analytics'] = auxin_get_option( 'auxin_user_google_analytics' );
945
  $js['theme_options_google_marketing'] = auxin_get_option( 'auxin_user_google_marketing' );
946
 
947
- // Will be deprecated in version 1.4
948
- unset( $js['option_panel_custom'] );
949
- unset( $js['option_panel_google_analytics'] );
950
- unset( $js['option_panel_google_marketing'] );
951
-
952
  return $js;
953
  }
954
  add_filter( 'auxin_custom_js_file_content', 'auxin_ele_add_theme_options_to_js_file' );
@@ -1093,7 +1088,7 @@ function auxin_custom_js_for_pages( $js, $post ){
1093
  if( $post && ! is_404() && is_singular() ) {
1094
  $js .= get_post_meta( $post->ID, 'aux_page_custom_js', true );
1095
  }
1096
-
1097
  }
1098
  add_filter( 'auxin_footer_inline_script', 'auxin_custom_js_for_pages', 15, 2 );
1099
 
@@ -1238,6 +1233,51 @@ function auxin_woocommerce_pagination() {
1238
  );
1239
  }
1240
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1241
 
1242
 
1243
 
@@ -1483,6 +1523,7 @@ function auxels_add_blog_archive_custom_template_layouts( $result, $template_typ
1483
  'excerpt_len' => esc_attr( auxin_get_option( 'blog_content_on_listing_length' ) ),
1484
  'show_info' => true,
1485
  'author_or_readmore' => 'readmore',
 
1486
  'desktop_cnum' => esc_attr( auxin_get_option( 'post_index_column_number' ) ),
1487
  'tablet_cnum' => esc_attr( auxin_get_option( 'post_index_column_number_tablet' ) ),
1488
  'phone_cnum' => esc_attr( auxin_get_option( 'post_index_column_number_mobile' ) ),
@@ -1513,7 +1554,7 @@ function auxels_add_blog_archive_custom_template_layouts( $result, $template_typ
1513
  'extra_classes' => '',
1514
  'custom_el_id' => '',
1515
  'reset_query' => false,
1516
- 'use_wp_query' => true
1517
  );
1518
 
1519
  $result = auxin_widget_recent_posts_tiles_callback( $args );
@@ -1538,7 +1579,7 @@ function auxels_add_blog_archive_custom_template_layouts( $result, $template_typ
1538
  'extra_classes' => '',
1539
  'custom_el_id' => '',
1540
  'reset_query' => false,
1541
- 'use_wp_query' => true
1542
  );
1543
 
1544
  $result = auxin_widget_recent_posts_land_style_callback( $args );
@@ -1562,7 +1603,7 @@ function auxels_add_blog_archive_custom_template_layouts( $result, $template_typ
1562
  'timeline_alignment' => esc_attr( auxin_get_option( 'post_index_timeline_alignment', 'center' ) ),
1563
  'tag' => '',
1564
  'reset_query' => false,
1565
- 'use_wp_query' => true
1566
  );
1567
 
1568
  $result = auxin_widget_recent_posts_timeline_callback( $args );
@@ -1593,7 +1634,7 @@ function auxels_add_blog_archive_custom_template_layouts( $result, $template_typ
1593
  'preview_mode' => 'grid',
1594
  'tag' => '',
1595
  'reset_query' => false,
1596
- 'use_wp_query' => true
1597
  );
1598
 
1599
  $result = auxin_widget_recent_posts_callback( $args );
944
  $js['theme_options_google_analytics'] = auxin_get_option( 'auxin_user_google_analytics' );
945
  $js['theme_options_google_marketing'] = auxin_get_option( 'auxin_user_google_marketing' );
946
 
 
 
 
 
 
947
  return $js;
948
  }
949
  add_filter( 'auxin_custom_js_file_content', 'auxin_ele_add_theme_options_to_js_file' );
1088
  if( $post && ! is_404() && is_singular() ) {
1089
  $js .= get_post_meta( $post->ID, 'aux_page_custom_js', true );
1090
  }
1091
+ return $js;
1092
  }
1093
  add_filter( 'auxin_footer_inline_script', 'auxin_custom_js_for_pages', 15, 2 );
1094
 
1233
  );
1234
  }
1235
 
1236
+ /*-----------------------------------------------------------------------------------*/
1237
+ /* the function runs when auxin framework loaded
1238
+ /*-----------------------------------------------------------------------------------*/
1239
+
1240
+ function auxin_on_auxin_fw_admin_loaded(){
1241
+
1242
+ // assign theme custom capabilities to roles on first run
1243
+ if( ! auxin_get_theme_mod( 'are_auxin_caps_assigned', 0 ) ){
1244
+ add_action( 'admin_init' , 'auxin_assign_default_caps_for_post_types' );
1245
+ set_theme_mod( 'are_auxin_caps_assigned', 1 );
1246
+ }
1247
+ }
1248
+
1249
+ add_action( 'auxin_admin_loaded', 'auxin_on_auxin_fw_admin_loaded' );
1250
+
1251
+
1252
+ /*-------------------------------------------------------------------------------*/
1253
+ /* assigns theme custom post types capabilities to main roles
1254
+ /*-------------------------------------------------------------------------------*/
1255
+
1256
+ function auxin_assign_default_caps_for_post_types() {
1257
+ $auxin_registered_post_types = auxin_registered_post_types(true);
1258
+
1259
+ // the roles to add capabilities of custom post types to
1260
+ $roles = array('administrator', 'editor');
1261
+
1262
+ foreach ( $roles as $role_name ) {
1263
+
1264
+ $role = get_role( $role_name );
1265
+
1266
+ // loop through custom post types and add custom capabilities to defined rules
1267
+ foreach ( $auxin_registered_post_types as $post_type ) {
1268
+
1269
+ $post_type_object = get_post_type_object( $post_type );
1270
+ // add post type capabilities to role
1271
+ foreach ( $post_type_object->cap as $cap_key => $cap ) {
1272
+ if( ! in_array( $cap_key, array( 'edit_post', 'delete_post', 'read_post' ) ) )
1273
+ $role->add_cap( $cap );
1274
+ }
1275
+ }
1276
+
1277
+ }
1278
+ }
1279
+
1280
+
1281
 
1282
 
1283
 
1523
  'excerpt_len' => esc_attr( auxin_get_option( 'blog_content_on_listing_length' ) ),
1524
  'show_info' => true,
1525
  'author_or_readmore' => 'readmore',
1526
+ 'content_layout' => esc_attr( auxin_get_option( 'post_index_column_content_layout', 'full' ) ),
1527
  'desktop_cnum' => esc_attr( auxin_get_option( 'post_index_column_number' ) ),
1528
  'tablet_cnum' => esc_attr( auxin_get_option( 'post_index_column_number_tablet' ) ),
1529
  'phone_cnum' => esc_attr( auxin_get_option( 'post_index_column_number_mobile' ) ),
1554
  'extra_classes' => '',
1555
  'custom_el_id' => '',
1556
  'reset_query' => false,
1557
+ 'use_wp_query' => false
1558
  );
1559
 
1560
  $result = auxin_widget_recent_posts_tiles_callback( $args );
1579
  'extra_classes' => '',
1580
  'custom_el_id' => '',
1581
  'reset_query' => false,
1582
+ 'use_wp_query' => false
1583
  );
1584
 
1585
  $result = auxin_widget_recent_posts_land_style_callback( $args );
1603
  'timeline_alignment' => esc_attr( auxin_get_option( 'post_index_timeline_alignment', 'center' ) ),
1604
  'tag' => '',
1605
  'reset_query' => false,
1606
+ 'use_wp_query' => false
1607
  );
1608
 
1609
  $result = auxin_widget_recent_posts_timeline_callback( $args );
1634
  'preview_mode' => 'grid',
1635
  'tag' => '',
1636
  'reset_query' => false,
1637
+ 'use_wp_query' => false
1638
  );
1639
 
1640
  $result = auxin_widget_recent_posts_callback( $args );
public/assets/js/wizard.js CHANGED
@@ -1,45 +1,3 @@
1
- /**
2
- * jQuery Line Progressbar
3
- */
4
- (function($){
5
- 'use strict';
6
-
7
- $.fn.Progressbar = function(custom){
8
-
9
- var options = $.extend({
10
- percentage : null,
11
- ShowProgressCount : true,
12
- duration : 1000,
13
- backgroundColor : '',
14
- processText : aux_setup_params.progress_text
15
- }, custom);
16
-
17
- return this.each(function(index, el) {
18
- // Markup
19
- $(el).html('<div class="proggress"></div><div class="percentCount"></div>');
20
-
21
- var progressFill = $(el).find('.proggress');
22
- var progressBar= $(el).find('.progressbar');
23
-
24
- // Progressing
25
- progressFill.animate(
26
- {
27
- width: options.percentage + "%"
28
- },
29
- {
30
- step: function(x) {
31
- if(options.ShowProgressCount){
32
- $(el).find(".percentCount").text( options.processText + ' ' + Math.round(x) + "%" );
33
- }
34
- },
35
- duration: options.duration
36
- }
37
- );
38
- });
39
- };
40
- })(jQuery);
41
-
42
-
43
  /**
44
  * AuxWizard functionality
45
  */
@@ -63,11 +21,11 @@
63
  if($(this).data('callback') && typeof callbacks[$(this).data('callback')] != 'undefined'){
64
  // we have to process a callback before continue with form submission
65
  callbacks[$(this).data('callback')](this);
66
- return false;
67
- }else{
68
- loading_content();
69
- return true;
70
  }
 
 
71
  });
72
 
73
  // init plugins border effect
@@ -128,7 +86,12 @@
128
 
129
  }
130
 
131
- function loading_content(){
 
 
 
 
 
132
  $('.aux-setup-content').block({
133
  message: null,
134
  overlayCSS: {
@@ -136,6 +99,10 @@
136
  opacity: 0.6
137
  }
138
  });
 
 
 
 
139
  }
140
 
141
  function pluginManager(){
@@ -232,7 +199,13 @@
232
  var oldButtonText = $(btn).text();
233
  selectedPlugins = $(parentElement).find('.aux-plugin input[name="plugin[]"]:checked').length;
234
  $(btn).text(aux_setup_params.btnworks_text).addClass('disabled');
 
 
 
 
235
  complete = function(){
 
 
236
  // Remove disable class from button
237
  $(btn).text(oldButtonText);
238
  if( $(parentElement).find('.aux-plugin').not('.aux-success').length === 0 ){
@@ -243,8 +216,7 @@
243
  $(parentElement).find('.first-step').addClass('hide');
244
  $(parentElement).find('.second-step').removeClass('hide');
245
  } else {
246
- loading_content();
247
- window.location.href=btn.href;
248
  }
249
  }
250
  };
@@ -260,12 +232,16 @@
260
  var demoID = $( btn ).data('import-id');
261
  var modalElement = $( btn ).closest('.aux-modal-item ');
262
  var parentElement = $( btn ).closest('.aux-setup-demo-actions');
263
- var progressBar = $( parentElement ).find('.progressbar');
264
  var nonceField = $( btn ).data('nonce');
265
  var demoOptions = $( '#aux-import-data-' + demoID ).serializeArray();
266
 
267
  $(parentElement).find('.aux-return-back').addClass('hide');
268
- $(progressBar).removeClass('hide').Progressbar({ percentage: 1 });
 
 
 
 
269
 
270
  $.ajax({
271
  url : aux_setup_params.ajaxurl,
@@ -277,10 +253,9 @@
277
  options: demoOptions
278
  }
279
  }).done(function(response) {
280
- $(progressBar).Progressbar({
281
- percentage: 100
282
- });
283
  setTimeout(function () {
 
 
284
  // Hide Progressbar
285
  $(progressBar).addClass('hide');
286
  // Display control buttons
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  /**
2
  * AuxWizard functionality
3
  */
21
  if($(this).data('callback') && typeof callbacks[$(this).data('callback')] != 'undefined'){
22
  // we have to process a callback before continue with form submission
23
  callbacks[$(this).data('callback')](this);
24
+ } else {
25
+ loading_content(this.href);
 
 
26
  }
27
+
28
+ return false;
29
  });
30
 
31
  // init plugins border effect
86
 
87
  }
88
 
89
+ function loading_content(pageUrl){
90
+ // Close thickbox popup when page is loading
91
+ if ( $('#TB_window').is(':visible') ) {
92
+ tb_remove();
93
+ }
94
+ // Display transparent loading block
95
  $('.aux-setup-content').block({
96
  message: null,
97
  overlayCSS: {
99
  opacity: 0.6
100
  }
101
  });
102
+ // Ajax page loading next/prev page load
103
+ $('body').load(pageUrl, function(){
104
+ window.history.pushState(undefined, '', pageUrl);
105
+ });
106
  }
107
 
108
  function pluginManager(){
199
  var oldButtonText = $(btn).text();
200
  selectedPlugins = $(parentElement).find('.aux-plugin input[name="plugin[]"]:checked').length;
201
  $(btn).text(aux_setup_params.btnworks_text).addClass('disabled');
202
+ // Prevent the refresh when the ajax is in progress
203
+ $(window).on('beforeunload', function (e){
204
+ return aux_setup_params.onbefore_text;
205
+ });
206
  complete = function(){
207
+ // Disable beforeunload
208
+ $(window).off('beforeunload');
209
  // Remove disable class from button
210
  $(btn).text(oldButtonText);
211
  if( $(parentElement).find('.aux-plugin').not('.aux-success').length === 0 ){
216
  $(parentElement).find('.first-step').addClass('hide');
217
  $(parentElement).find('.second-step').removeClass('hide');
218
  } else {
219
+ loading_content(btn.href);
 
220
  }
221
  }
222
  };
232
  var demoID = $( btn ).data('import-id');
233
  var modalElement = $( btn ).closest('.aux-modal-item ');
234
  var parentElement = $( btn ).closest('.aux-setup-demo-actions');
235
+ var progressBar = $( parentElement ).find('.aux-progress');
236
  var nonceField = $( btn ).data('nonce');
237
  var demoOptions = $( '#aux-import-data-' + demoID ).serializeArray();
238
 
239
  $(parentElement).find('.aux-return-back').addClass('hide');
240
+ $(progressBar).removeClass('hide');
241
+ // Prevent the refresh when the ajax is in progress
242
+ $(window).on('beforeunload', function (e){
243
+ return aux_setup_params.onbefore_text;
244
+ });
245
 
246
  $.ajax({
247
  url : aux_setup_params.ajaxurl,
253
  options: demoOptions
254
  }
255
  }).done(function(response) {
 
 
 
256
  setTimeout(function () {
257
+ // Disable beforeunload
258
+ $(window).off('beforeunload');
259
  // Hide Progressbar
260
  $(progressBar).addClass('hide');
261
  // Display control buttons