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-elemen