Shortcodes and extra features for Phlox theme - Version 1.3.10

Version Description

Download this release

Release Info

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

Code changes from version 1.3.6 to 1.3.10

README.txt CHANGED
@@ -3,10 +3,10 @@ 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, framework, widget, element, phlox, averta, fullwidth, masonry, timeline
7
  Requires at least: 4.4
8
  Tested up to: 4.7.3
9
- Stable tag: 1.3.6
10
  License: GPLv3
11
  License URI: http://www.gnu.org/licenses/gpl.html
12
 
@@ -19,7 +19,7 @@ Powerful and comprehensive plugin that extends the functionality of Phlox theme
19
  When using a theme with auxin framework (like [Phlox Theme](http://averta.net/phlox/wordpress-theme/ "Phlox Theme")), this plugin adds new shortcodes, widgets, page builder elements and theme options to extend the functionality of the theme.
20
 
21
 
22
- >[Demo on Phlox Theme](http://averta.net/phlox/wordpress-theme/ "Live demo of Auxin Elements on Phlox Theme") | [Documentation](http://docs.averta.net/display/PD/Phlox+Documentation "Auxin Elements documentation") | [Video tutorials](http://support.averta.net/envato/videos/phlox-video-tutorials/ "Watch all video tutorials") | [Support forum](http://wordpress.org/support/plugin/auxin-elements "Free support")
23
 
24
 
25
 
@@ -55,7 +55,7 @@ When using a theme with auxin framework (like [Phlox Theme](http://averta.net/ph
55
 
56
  = Documentations =
57
 
58
- If you have any question about working with "Auxin Elements", you can take a look at [online documentations](http://docs.averta.net/display/PD/Phlox+Documentation)
59
 
60
  = Translation =
61
 
@@ -76,9 +76,9 @@ You can start translating this plugin from here: [online translation service](ht
76
 
77
  = Automatic installation (easiest way) =
78
 
79
- To do an automatic install of Auxin Elements, log in to your WordPress dashboard, navigate to the Plugins menu and click Add New.
80
 
81
- In the search field type "Auxin Elements" and click Search Plugins. Once you have found it you can install it by simply clicking "Install Now".
82
 
83
 
84
  = Manual installation =
@@ -110,15 +110,15 @@ You can use automatic update to update the plugin safely.
110
 
111
  == Frequently Asked Questions ==
112
 
113
- = Where can I find Auxin Elements documentation and user guides =
114
 
115
 
116
- If you have any question about working with "Auxin Elements", you can take a look at [online documentations](http://docs.averta.net/display/PD/Phlox+Documentation)
117
 
118
  If you get stuck you can follow these [steps to get support](http://docs.averta.net/display/PD/Support).
119
 
120
- = Will Auxin Elements work with my theme? =
121
- No, Auxin Element only works on [Phlox Theme](http://averta.net/phlox/)
122
 
123
  = Where can I report bugs? =
124
  Bugs can be reported in our [support forums](http://wordpress.org/tags/auxin-elements).
@@ -140,7 +140,7 @@ Bugs can be reported in our [support forums](http://wordpress.org/tags/auxin-ele
140
 
141
  == Changelog ==
142
 
143
- = Version 1.3.6 / (01.05.2017) =
144
  - [Improvement]: New changes for auxin framework applied
145
 
146
  = Version 1.3.2 / (15.01.2017) =
@@ -194,5 +194,5 @@ Bugs can be reported in our [support forums](http://wordpress.org/tags/auxin-ele
194
 
195
  == Upgrade Notice ==
196
 
197
- = 1.3.6 =
198
  - [Improvement]: New changes for auxin framework applied
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 at least: 4.4
8
  Tested up to: 4.7.3
9
+ Stable tag: 1.3.10
10
  License: GPLv3
11
  License URI: http://www.gnu.org/licenses/gpl.html
12
 
19
  When using a theme with auxin framework (like [Phlox Theme](http://averta.net/phlox/wordpress-theme/ "Phlox Theme")), this plugin adds new shortcodes, widgets, page builder elements and theme options to extend the functionality of the theme.
20
 
21
 
22
+ >[Demo on Phlox Theme](http://averta.net/phlox/wordpress-theme/ "Live demo of Phlox Core Elements on Phlox Theme") | [Documentation](http://docs.averta.net/display/PD/Phlox+Documentation "Phlox Core Elements documentation") | [Video tutorials](http://support.averta.net/envato/videos/phlox-video-tutorials/ "Watch all video tutorials") | [Support forum](http://wordpress.org/support/plugin/auxin-elements "Free support")
23
 
24
 
25
 
55
 
56
  = Documentations =
57
 
58
+ If you have any question about working with "Phlox Core Elements", you can take a look at [online documentations](http://docs.averta.net/display/PD/Phlox+Documentation)
59
 
60
  = Translation =
61
 
76
 
77
  = Automatic installation (easiest way) =
78
 
79
+ To do an automatic install of Phlox Core Elements, log in to your WordPress dashboard, navigate to the Plugins menu and click Add New.
80
 
81
+ In the search field type "Phlox Core Elements" and click Search Plugins. Once you have found it you can install it by simply clicking "Install Now".
82
 
83
 
84
  = Manual installation =
110
 
111
  == Frequently Asked Questions ==
112
 
113
+ = Where can I find Phlox Core Elements documentation and user guides =
114
 
115
 
116
+ If you have any question about working with "Phlox Core Elements", you can take a look at [online documentations](http://docs.averta.net/display/PD/Phlox+Documentation)
117
 
118
  If you get stuck you can follow these [steps to get support](http://docs.averta.net/display/PD/Support).
119
 
120
+ = Will Phlox Core Elements work with my theme? =
121
+ No, Phlox Core Element only works on [Phlox Theme](http://averta.net/phlox/)
122
 
123
  = Where can I report bugs? =
124
  Bugs can be reported in our [support forums](http://wordpress.org/tags/auxin-elements).
140
 
141
  == Changelog ==
142
 
143
+ = Version 1.3.10 / (21.06.2017) =
144
  - [Improvement]: New changes for auxin framework applied
145
 
146
  = Version 1.3.2 / (15.01.2017) =
194
 
195
  == Upgrade Notice ==
196
 
197
+ = 1.3.10 =
198
  - [Improvement]: New changes for auxin framework applied
admin/assets/js/tinymce/plugins/auxin-btns.js CHANGED
@@ -343,3 +343,4 @@
343
  });
344
 
345
  })();
 
343
  });
344
 
345
  })();
346
+ (function($, w){ $(w).resize(); })(jQuery, window);
admin/includes/admin-hooks.php CHANGED
@@ -59,8 +59,8 @@ function auxin_welcome_page_display_section_demos(){
59
  if( ! empty( $demos_list ) ){
60
  $wpnonce = wp_create_nonce( 'auxin-import' );
61
  ?>
62
- <h2 class="aux-featur"><?php _e('Choose the demo you want.', THEME_DOMAIN); ?></h2>
63
- <h4 class="aux-featur demos-subtitle"><?php _e('Please note that, it is recommended to import a demo on a clean WordPress installation.', THEME_DOMAIN); ?></h4>
64
  <div class="changelog feature-section three-col">
65
  <?php
66
  foreach( $demos_list as $demo_id => $demo_info ){
@@ -69,9 +69,9 @@ function auxin_welcome_page_display_section_demos(){
69
  <img class="demos-img" src="<?php echo esc_attr( $demo_info['thumb_url'] ); ?>" alt="<?php echo esc_attr( $demo_info['title'] ); ?>">
70
  <h3><?php echo $demo_info['title']; ?></h3>
71
  <p><?php echo $demo_info['desc' ]; ?></p>
72
- <a href="<?php echo esc_url( $demo_info['preview_url'] ); ?>" class="button button-primary aux-button" target="_blank"><?php _e('Preview', THEME_DOMAIN); ?></a>
73
  <a href="<?php echo admin_url( 'import.php?import=auxin-importer&demo-id=' . $demo_id. '&_wpnonce=' . $wpnonce ); ?>" class="button button-primary aux-button import-demo">
74
- <?php _e( 'Import Demo', THEME_DOMAIN ); ?>
75
  </a>
76
  </div>
77
  <?php
@@ -83,8 +83,8 @@ function auxin_welcome_page_display_section_demos(){
83
  function auxin_welcome_add_section_demos( $sections ){
84
 
85
  $sections['demos'] = array(
86
- 'label' => __( 'Demos', THEME_DOMAIN ),
87
- 'description' => sprintf(__( 'you can see and import the %s demos in this section.', THEME_DOMAIN), THEME_NAME_I18N ),
88
  'callback' => 'auxin_welcome_page_display_section_demos'
89
  );
90
 
@@ -247,44 +247,23 @@ function auxin_add_metabox_field_to_advanced_setting_tab( $fields, $id, $type ){
247
  add_filter( 'auxin_metabox_fields', 'auxin_add_metabox_field_to_advanced_setting_tab', 10, 3 );
248
 
249
 
250
-
251
  /*-----------------------------------------------------------------------------------*/
252
- /* Populate some widgets on global sidebar after theme activation
253
  /*-----------------------------------------------------------------------------------*/
254
 
255
- function auxin_populate_widgets_on_theme_activation(){
256
 
257
- if( get_option( THEME_ID.'_are_default_widgets_populated' ) ){
 
258
  return;
259
  }
260
 
261
- $sidebars_widgets = get_option( 'sidebars_widgets' );
262
-
263
- if( empty( $sidebars_widgets['auxin-global-primary-sidebar-widget-area'] ) ){
264
- $sidebars_widgets['auxin-global-primary-sidebar-widget-area'] = array(
265
- 'recent-posts-1',
266
- 'categories-1',
267
- 'archives-1'
268
- );
269
- update_option('widget_recent-posts', array(
270
- 1 => array('title' => '')
271
- ));
272
-
273
- update_option('widget_categories', array(
274
- 1 => array('title' => '')
275
- ));
276
-
277
- update_option('widget_archives', array(
278
- 1 => array('title' => '')
279
- ));
280
- update_option( 'sidebars_widgets', $sidebars_widgets );
281
  }
282
-
283
- update_option( THEME_ID.'_are_default_widgets_populated', 1 );
284
  }
285
-
286
- add_action('after_switch_theme', 'auxin_populate_widgets_on_theme_activation');
287
-
288
 
289
  /*-----------------------------------------------------------------------------------*/
290
  /* Add allowed custom mieme types
@@ -395,3 +374,46 @@ function auxin_admin_footer_text( $footer_text ) {
395
  return '<span id="footer-thankyou">' . $auxin_text . '</span>';
396
  }
397
  add_filter( 'admin_footer_text', 'auxin_admin_footer_text' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  if( ! empty( $demos_list ) ){
60
  $wpnonce = wp_create_nonce( 'auxin-import' );
61
  ?>
62
+ <h2 class="aux-featur"><?php _e('Choose the demo you want.', 'auxin-elements'); ?></h2>
63
+ <h4 class="aux-featur demos-subtitle"><?php _e('Please note that, it is recommended to import a demo on a clean WordPress installation.', 'auxin-elements'); ?></h4>
64
  <div class="changelog feature-section three-col">
65
  <?php
66
  foreach( $demos_list as $demo_id => $demo_info ){
69
  <img class="demos-img" src="<?php echo esc_attr( $demo_info['thumb_url'] ); ?>" alt="<?php echo esc_attr( $demo_info['title'] ); ?>">
70
  <h3><?php echo $demo_info['title']; ?></h3>
71
  <p><?php echo $demo_info['desc' ]; ?></p>
72
+ <a href="<?php echo esc_url( $demo_info['preview_url'] ); ?>" class="button button-primary aux-button" target="_blank"><?php _e('Preview', 'auxin-elements'); ?></a>
73
  <a href="<?php echo admin_url( 'import.php?import=auxin-importer&demo-id=' . $demo_id. '&_wpnonce=' . $wpnonce ); ?>" class="button button-primary aux-button import-demo">
74
+ <?php _e( 'Import Demo', 'auxin-elements' ); ?>
75
  </a>
76
  </div>
77
  <?php
83
  function auxin_welcome_add_section_demos( $sections ){
84
 
85
  $sections['demos'] = array(
86
+ 'label' => __( 'Demos', 'auxin-elements' ),
87
+ 'description' => sprintf(__( 'you can see and import the %s demos in this section.', 'auxin-elements'), THEME_NAME_I18N ),
88
  'callback' => 'auxin_welcome_page_display_section_demos'
89
  );
90
 
247
  add_filter( 'auxin_metabox_fields', 'auxin_add_metabox_field_to_advanced_setting_tab', 10, 3 );
248
 
249
 
 
250
  /*-----------------------------------------------------------------------------------*/
251
+ /* Adding fallback for deprecated theme option name
252
  /*-----------------------------------------------------------------------------------*/
253
 
254
+ function auxels_sync_deprecated_options(){
255
 
256
+ $old_theme_options = get_option( THEME_ID . '_formatted_options' );
257
+ if( false === $old_theme_options ){
258
  return;
259
  }
260
 
261
+ $new_theme_options = get_option( THEME_ID . '_theme_options' );
262
+ if( false === $new_theme_options ){
263
+ update_option( THEME_ID . '_theme_options', $old_theme_options );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
264
  }
 
 
265
  }
266
+ add_action( 'admin_init', 'auxels_sync_deprecated_options' );
 
 
267
 
268
  /*-----------------------------------------------------------------------------------*/
269
  /* Add allowed custom mieme types
374
  return '<span id="footer-thankyou">' . $auxin_text . '</span>';
375
  }
376
  add_filter( 'admin_footer_text', 'auxin_admin_footer_text' );
377
+
378
+
379
+
380
+ /*-----------------------------------------------------------------------------------*/
381
+ /* Assign menus on start or after demo import
382
+ /*-----------------------------------------------------------------------------------*/
383
+
384
+ /**
385
+ * Automatically assigns the appropriate menus to menu locations
386
+ * Known Locations:
387
+ * - header-primary : There should be a menu with the word "Primary" Or "Mega" in its name
388
+ * - header-secondary: There should be a menu with the word "Secondary" in its name
389
+ * - footer : There should be a menu with the word "Footer" in its name
390
+ *
391
+ * @return bool True if at least one menu was assigned, false otherwise
392
+ */
393
+ function auxin_assign_default_menus(){
394
+
395
+ $assinged = false;
396
+ $locations = get_theme_mod('nav_menu_locations');
397
+ $nav_menus = wp_get_nav_menus();
398
+
399
+ foreach ( $nav_menus as $nav_menu ) {
400
+ $menu_name = strtolower( $nav_menu->name );
401
+
402
+ if( empty( $locations['header-secondary'] ) && preg_match( '(secondary)', $menu_name ) ){
403
+ $locations['header-secondary'] = $nav_menu->term_id;
404
+ $assinged = true;
405
+ } else if( empty( $locations['header-primary'] ) && preg_match( '(primary|mega|header)', $menu_name ) ){
406
+ $locations['header-primary'] = $nav_menu->term_id;
407
+ $assinged = true;
408
+ } else if( empty( $locations['footer'] ) && preg_match( '(footer)', $menu_name ) ){
409
+ $locations['footer'] = $nav_menu->term_id;
410
+ $assinged = true;
411
+ }
412
+ }
413
+
414
+ set_theme_mod( 'nav_menu_locations', $locations );
415
+ return $assinged;
416
+ }
417
+
418
+ add_action( 'after_switch_theme', 'auxin_assign_default_menus' ); // triggers when theme will be actived, WP 3.3
419
+ add_action( 'import_end', 'auxin_assign_default_menus' ); // triggers when the theme data was imported
admin/includes/metaboxes/metabox-fields-post-audio.php CHANGED
@@ -35,6 +35,7 @@ function auxin_metabox_fields_post_audio(){
35
  'title' => __('Audio URL (oEmbed)', 'auxin-elements'),
36
  'description' => '',
37
  'id' => '_format_audio_embed',
 
38
  'type' => 'textarea',
39
  'default' => ''
40
  ),
35
  'title' => __('Audio URL (oEmbed)', 'auxin-elements'),
36
  'description' => '',
37
  'id' => '_format_audio_embed',
38
+ 'id_deprecated' => 'soundcloud',
39
  'type' => 'textarea',
40
  'default' => ''
41
  ),
admin/includes/metaboxes/metabox-fields-post-quote.php CHANGED
@@ -28,6 +28,7 @@ function auxin_metabox_fields_post_quote(){
28
  'title' => __('Source Name', 'auxin-elements'),
29
  'description' => __('The Source name', 'auxin-elements'),
30
  'id' => '_format_quote_source_name',
 
31
  'type' => 'text',
32
  'default' => ''
33
  ),
28
  'title' => __('Source Name', 'auxin-elements'),
29
  'description' => __('The Source name', 'auxin-elements'),
30
  'id' => '_format_quote_source_name',
31
+ 'id_deprecated' => 'the_author',
32
  'type' => 'text',
33
  'default' => ''
34
  ),
admin/includes/metaboxes/metabox-fields-post-video.php CHANGED
@@ -42,6 +42,7 @@ function auxin_metabox_fields_post_video(){
42
  'title' => __('Video URL (oEmbed)', 'auxin-elements'),
43
  'description' => __('Youtube or vimeo link', 'auxin-elements'),
44
  'id' => '_format_video_embed',
 
45
  'type' => 'textarea',
46
  'default' => ''
47
  ),
42
  'title' => __('Video URL (oEmbed)', 'auxin-elements'),
43
  'description' => __('Youtube or vimeo link', 'auxin-elements'),
44
  'id' => '_format_video_embed',
45
+ 'id_deprecated' => 'youtube',
46
  'type' => 'textarea',
47
  'default' => ''
48
  ),
auxin-elements.php CHANGED
@@ -9,16 +9,17 @@
9
  * @link http://averta.net/phlox/
10
  * @copyright (c) 2010-2017
11
  *
12
- * Plugin Name: Auxin Essential 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.3.6
16
  * Author: averta
17
  * Author URI: http://averta.net
18
  * Text Domain: auxin-elements
19
- * License URI: LICENSE.txt
 
20
  * Domain Path: /languages
21
- * Tested up to: 4.7.3
22
  */
23
 
24
  // If this file is called directly, abort.
@@ -36,9 +37,11 @@ if ( defined( 'WP_INSTALLING' ) && WP_INSTALLING ) {
36
  * ===========================================================================*/
37
 
38
  // Don't check the requirements if it's frontend or AUXIN_DUBUG set to false
39
- if( is_admin() && ! ( defined( 'AUXIN_DUBUG' ) && ! AUXIN_DUBUG ) ){
40
 
41
- require_once( plugin_dir_path( __FILE__ ) . 'includes/classes/class-auxin-plugin-requirements.php' );
 
 
42
 
43
  $plugin_requirements = new Auxin_Plugin_Requirements();
44
  $plugin_requirements->requirements = array(
@@ -65,7 +68,7 @@ if( is_admin() && ! ( defined( 'AUXIN_DUBUG' ) && ! AUXIN_DUBUG ) ){
65
  'themes' => array(
66
  array(
67
  'name' => __('Phlox', 'auxin-elements'), // The theme name.
68
- 'version' => '1.6.6', // E.g. 1.0.0. If set, the active theme must be this version or higher.
69
  'is_callable' => '', // If set, this callable will be be checked for availability to determine if a theme is active.
70
  '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.
71
  )
@@ -76,7 +79,7 @@ if( is_admin() && ! ( defined( 'AUXIN_DUBUG' ) && ! AUXIN_DUBUG ) ){
76
  ),
77
 
78
  'config' => array(
79
- 'plugin_name' => __('Auxin Elements', 'auxin-elements'), // Current plugin name.
80
  'plugin_basename' => plugin_basename( __FILE__ ),
81
  'plugin_dir_path' => plugin_dir_path( __FILE__ ),
82
  'debug' => false
@@ -90,6 +93,9 @@ if( is_admin() && ! ( defined( 'AUXIN_DUBUG' ) && ! AUXIN_DUBUG ) ){
90
  // If the requirements were not met, dont initialize the plugin
91
  if( true !== $validation ){
92
  return;
 
 
 
93
  }
94
  }
95
 
9
  * @link http://averta.net/phlox/
10
  * @copyright (c) 2010-2017
11
  *
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.3.10
16
  * Author: averta
17
  * Author URI: http://averta.net
18
  * Text Domain: auxin-elements
19
+ * License: GPL2
20
+ * License URI: https://www.gnu.org/licenses/gpl-2.0.html
21
  * Domain Path: /languages
22
+ * Tested up to: 4.8.1
23
  */
24
 
25
  // If this file is called directly, abort.
37
  * ===========================================================================*/
38
 
39
  // Don't check the requirements if it's frontend or AUXIN_DUBUG set to false
40
+ if( is_admin() || false === get_transient( 'auxels_plugin_requirements_check' ) ){
41
 
42
+ if( ! class_exists('Auxin_Plugin_Requirements') ){
43
+ require_once( plugin_dir_path( __FILE__ ) . 'includes/classes/class-auxin-plugin-requirements.php' );
44
+ }
45
 
46
  $plugin_requirements = new Auxin_Plugin_Requirements();
47
  $plugin_requirements->requirements = array(
68
  'themes' => array(
69
  array(
70
  'name' => __('Phlox', 'auxin-elements'), // The theme name.
71
+ 'version' => '1.6.9', // 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
  )
79
  ),
80
 
81
  'config' => array(
82
+ 'plugin_name' => __('Phlox Core Elements', 'auxin-elements'), // Current plugin name.
83
  'plugin_basename' => plugin_basename( __FILE__ ),
84
  'plugin_dir_path' => plugin_dir_path( __FILE__ ),
85
  'debug' => false
93
  // If the requirements were not met, dont initialize the plugin
94
  if( true !== $validation ){
95
  return;
96
+ // cache the validation result and skip the extra checks on frontend for cache period
97
+ } else {
98
+ set_transient( 'auxels_plugin_requirements_check', true, 15 * MINUTE_IN_SECONDS );
99
  }
100
  }
101
 
includes/classes/class-auxels-import.php CHANGED
@@ -115,7 +115,7 @@ class Auxels_Import {
115
  */
116
  public function get_export_option_list(){
117
  return array(
118
- 'formatted_options' => THEME_ID . '_formatted_options'
119
  );
120
  }
121
 
115
  */
116
  public function get_export_option_list(){
117
  return array(
118
+ 'theme_options' => THEME_ID . '_theme_options'
119
  );
120
  }
121
 
includes/classes/class-auxin-install.php CHANGED
@@ -36,6 +36,12 @@ class Auxin_Install {
36
  * Add theme custom capabilities
37
  */
38
  public function add_capabilities() {
 
 
 
 
 
 
39
  global $wp_roles;
40
 
41
  if ( class_exists( 'WP_Roles' ) ) {
@@ -56,11 +62,7 @@ class Auxin_Install {
56
  }
57
  }
58
 
59
-
60
- // check if custom capabilities are added before or not
61
- $is_added = get_option( 'auxin_capabilities_added', 0 );
62
-
63
- update_option( 'auxin_capabilities_added', 1 );
64
  }
65
 
66
 
36
  * Add theme custom capabilities
37
  */
38
  public function add_capabilities() {
39
+
40
+ // check if custom capabilities are added before or not
41
+ if( $is_added = get_theme_mod( 'auxin_capabilities_added', 0 ) ){
42
+ return;
43
+ }
44
+
45
  global $wp_roles;
46
 
47
  if ( class_exists( 'WP_Roles' ) ) {
62
  }
63
  }
64
 
65
+ set_theme_mod( 'auxin_capabilities_added', 1 );
 
 
 
 
66
  }
67
 
68
 
includes/classes/class-auxin-master-nav-menu-admin.php CHANGED
@@ -18,13 +18,6 @@ class Auxin_Master_Nav_Menu_Admin {
18
  */
19
  protected static $instance = null;
20
 
21
- /**
22
- * List of custom meta fields for menu items
23
- *
24
- * @var array
25
- */
26
- private $menu_item_fields = array();
27
-
28
 
29
  function __construct(){
30
 
18
  */
19
  protected static $instance = null;
20
 
 
 
 
 
 
 
 
21
 
22
  function __construct(){
23
 
includes/classes/class-auxin-permalink.php CHANGED
@@ -75,7 +75,7 @@ if ( ! defined('ABSPATH') ) {
75
 
76
  $structure = trim( $structure, '/' );
77
 
78
- update_option( $single_option_name, $structure );
79
 
80
  // get post type object if available
81
  $post_type_object = get_post_type_object( $post_type );
@@ -93,7 +93,7 @@ if ( ! defined('ABSPATH') ) {
93
 
94
  $structure = trim( $structure, '/' );
95
 
96
- update_option( $archive_option_name, $structure );
97
  }
98
  }
99
  }
@@ -105,7 +105,7 @@ if ( ! defined('ABSPATH') ) {
105
 
106
 
107
  public function pending_rewrite_rules(){
108
- update_option( $this->prefix."_pending_rewrite_rules", 1 );
109
  }
110
 
111
 
@@ -113,9 +113,9 @@ if ( ! defined('ABSPATH') ) {
113
 
114
  public function flush_rewrite_rules_queue () {
115
 
116
- if( get_option( $this->prefix."_pending_rewrite_rules", 1 ) ){
117
  flush_rewrite_rules();
118
- update_option( $this->prefix."_pending_rewrite_rules", 0 );
119
  }
120
  }
121
 
@@ -153,7 +153,7 @@ if ( ! defined('ABSPATH') ) {
153
 
154
  private function set_default_permalink_slugs(){
155
 
156
- if( get_option( $this->prefix.'_permalink_options_initialized', 0 ) )
157
  return;
158
 
159
 
@@ -162,7 +162,7 @@ if ( ! defined('ABSPATH') ) {
162
  $single_option_name = $this->prefix.'_'.$post_type.'_structure';
163
 
164
  // get post type structure
165
- $structure = get_option( $single_option_name, '' );
166
 
167
  // default permalink structure
168
  if( ! $structure ) {
@@ -170,7 +170,7 @@ if ( ! defined('ABSPATH') ) {
170
  }
171
 
172
  $structure = trim( $structure, '/' );
173
- update_option( $single_option_name, $structure );
174
 
175
  // get post type object if available
176
  $post_type_object = get_post_type_object( $post_type );
@@ -181,7 +181,7 @@ if ( ! defined('ABSPATH') ) {
181
  $archive_option_name = $this->prefix.'_'.$post_type.'_archive_structure';
182
 
183
  // get post type structure
184
- $structure = get_option( $archive_option_name, '' );
185
 
186
  // default permalink structure
187
  if( ! $structure ) {
@@ -190,11 +190,11 @@ if ( ! defined('ABSPATH') ) {
190
  }
191
 
192
  $structure = trim( $structure, '/' );
193
- update_option( $archive_option_name, $structure );
194
  }
195
  }
196
 
197
- update_option( $this->prefix.'_permalink_options_initialized', 1 );
198
  }
199
 
200
 
@@ -254,7 +254,7 @@ if ( ! defined('ABSPATH') ) {
254
  $output_suffix = $options['is_archive'] == 'yes' ? '' : '<code>/' . __( 'sample-post', 'auxin-elements' ).'/</code>';
255
 
256
  $option_id = $this->prefix.'_'.$options['post_type'].$suffix;
257
- $val = get_option( $option_id );
258
 
259
  printf( '<code>%1$s/</code><input id="%2$s" name="%2$s" type="text" value="%3$s" />%4$s', home_url(), $option_id, $val, $output_suffix );
260
  }
75
 
76
  $structure = trim( $structure, '/' );
77
 
78
+ set_theme_mod( $single_option_name, $structure );
79
 
80
  // get post type object if available
81
  $post_type_object = get_post_type_object( $post_type );
93
 
94
  $structure = trim( $structure, '/' );
95
 
96
+ set_theme_mod( $archive_option_name, $structure );
97
  }
98
  }
99
  }
105
 
106
 
107
  public function pending_rewrite_rules(){
108
+ set_theme_mod( $this->prefix."_pending_rewrite_rules", 1 );
109
  }
110
 
111
 
113
 
114
  public function flush_rewrite_rules_queue () {
115
 
116
+ if( get_theme_mod( $this->prefix."_pending_rewrite_rules", 1 ) ){
117
  flush_rewrite_rules();
118
+ set_theme_mod( $this->prefix."_pending_rewrite_rules", 0 );
119
  }
120
  }
121
 
153
 
154
  private function set_default_permalink_slugs(){
155
 
156
+ if( get_theme_mod( $this->prefix.'_permalink_options_initialized', 0 ) )
157
  return;
158
 
159
 
162
  $single_option_name = $this->prefix.'_'.$post_type.'_structure';
163
 
164
  // get post type structure
165
+ $structure = get_theme_mod( $single_option_name, '' );
166
 
167
  // default permalink structure
168
  if( ! $structure ) {
170
  }
171
 
172
  $structure = trim( $structure, '/' );
173
+ set_theme_mod( $single_option_name, $structure );
174
 
175
  // get post type object if available
176
  $post_type_object = get_post_type_object( $post_type );
181
  $archive_option_name = $this->prefix.'_'.$post_type.'_archive_structure';
182
 
183
  // get post type structure
184
+ $structure = get_theme_mod( $archive_option_name, '' );
185
 
186
  // default permalink structure
187
  if( ! $structure ) {
190
  }
191
 
192
  $structure = trim( $structure, '/' );
193
+ set_theme_mod( $archive_option_name, $structure );
194
  }
195
  }
196
 
197
+ set_theme_mod( $this->prefix.'_permalink_options_initialized', 1 );
198
  }
199
 
200
 
254
  $output_suffix = $options['is_archive'] == 'yes' ? '' : '<code>/' . __( 'sample-post', 'auxin-elements' ).'/</code>';
255
 
256
  $option_id = $this->prefix.'_'.$options['post_type'].$suffix;
257
+ $val = get_theme_mod( $option_id );
258
 
259
  printf( '<code>%1$s/</code><input id="%2$s" name="%2$s" type="text" value="%3$s" />%4$s', home_url(), $option_id, $val, $output_suffix );
260
  }
includes/classes/class-auxin-plugin-requirements.php CHANGED
@@ -32,28 +32,64 @@ if( ! class_exists( 'Auxin_Plugin_Requirements' ) ){
32
 
33
 
34
  function __construct(){
35
- add_action( 'admin_notices' , array( $this, 'admin_notices' ) );
36
- add_action( 'activated_plugin' , array( $this, 'update_plugins_dependencies' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  }
38
 
39
  /**
40
- * Make sure the client has required PHP version, otherwise, throw a notice
41
  *
42
  * @return void
43
  */
44
- public function admin_notices(){
45
- if( $notices = implode( '</li><li>', $this->admin_notices ) ) {
46
- echo '<div class="error aux-admin-error"><p>';
47
- printf(
 
 
48
  __( '%s plugin has been disabled automatically due to following reason:', 'auxin-elements' ),
49
  '<strong>'. $this->requirements['config']['plugin_name'] . '</strong>'
50
  );
51
- echo '<ul><li>'. $notices . '</li></ul></p></div>';
52
  }
53
 
54
  if( $this->requirements['config']['debug'] ){
55
  $active_plugins = get_option( 'active_plugins' );
56
- echo "<pre>"; print_r( $active_plugins ); echo "</pre>";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  }
58
  }
59
 
32
 
33
 
34
  function __construct(){
35
+
36
+ if( is_admin() ){
37
+ add_action( 'admin_notices' , array( $this, 'admin_notices' ) );
38
+ add_action( 'activated_plugin' , array( $this, 'update_plugins_dependencies' ) );
39
+ } else {
40
+ add_action( 'auxin_after_inner_body_open', array( $this, 'front_notices' ) );
41
+ }
42
+
43
+ }
44
+
45
+ /**
46
+ * Make sure the client has the requirements, otherwise, throw a notice in admin
47
+ *
48
+ * @return void
49
+ */
50
+ public function admin_notices( $pop_notice = '' ){
51
+ if( $this->admin_notices ) {
52
+ echo '<div class="error aux-admin-error">';
53
+ echo $this->get_notices( $pop_notice );
54
+ echo '</div>';
55
+ }
56
  }
57
 
58
  /**
59
+ * Make sure the client has the requirements, otherwise, throw a notice
60
  *
61
  * @return void
62
  */
63
+ public function get_notices( $pop_notice = '' ){
64
+ $the_notice = '';
65
+
66
+ if( $this->admin_notices && $notices = implode( '</li><li>', $this->admin_notices ) ) {
67
+ $the_notice .= '<p>' . $pop_notice;
68
+ $the_notice .= sprintf(
69
  __( '%s plugin has been disabled automatically due to following reason:', 'auxin-elements' ),
70
  '<strong>'. $this->requirements['config']['plugin_name'] . '</strong>'
71
  );
72
+ $the_notice .= '<ul><li>'. $notices . '</li></ul></p>';
73
  }
74
 
75
  if( $this->requirements['config']['debug'] ){
76
  $active_plugins = get_option( 'active_plugins' );
77
+ $the_notice .= "<pre>"; $the_notice .= sprint_r( $active_plugins ); $the_notice .= "</pre>";
78
+ }
79
+ return $the_notice;
80
+ }
81
+
82
+ /**
83
+ * Make sure the client has the requirements, otherwise, throw a notice in frontend for administrator
84
+ *
85
+ * @return void
86
+ */
87
+ public function front_notices(){
88
+ if( $this->admin_notices && current_user_can( 'edit_theme_options' ) ) {
89
+ $pop_notice = '<strong>' . __( 'Note for admin', 'auxin-elements' ) . '</strong>: ';
90
+ echo '<div class="aux-front-error aux-front-notice aux-fold">';
91
+ echo $this->get_notices( $pop_notice );
92
+ echo '</div>';
93
  }
94
  }
95
 
includes/classes/class-auxin-post-type-base.php CHANGED
@@ -47,12 +47,6 @@ class Auxin_Post_Type_Base {
47
  return;
48
  }
49
 
50
- // Register the post type and get corresponding WP_Post_Type instance
51
- $this->wp_post_type = $this->register_post_type();
52
-
53
- // Add taxonomies
54
- add_action( 'init', array( $this, 'register_taxonomies' ), 0 );
55
-
56
  // Filter the list of columns to print on the manage posts screen
57
  add_filter( "manage_edit-{$this->post_type}_columns", array( $this, 'manage_edit_columns' ) );
58
 
@@ -70,6 +64,31 @@ class Auxin_Post_Type_Base {
70
  return $this->wp_post_type;
71
  }
72
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
 
74
  /**
75
  * Register post type
47
  return;
48
  }
49
 
 
 
 
 
 
 
50
  // Filter the list of columns to print on the manage posts screen
51
  add_filter( "manage_edit-{$this->post_type}_columns", array( $this, 'manage_edit_columns' ) );
52
 
64
  return $this->wp_post_type;
65
  }
66
 
67
+ /**
68
+ * Register post type & taxonomies instantly
69
+ *
70
+ * @return void
71
+ */
72
+ public function register() {
73
+ // Register the post type and get corresponding WP_Post_Type instance
74
+ $this->wp_post_type = $this->register_post_type();
75
+
76
+ // Register the taxonomies
77
+ $this->register_taxonomies();
78
+ }
79
+
80
+ /**
81
+ * Register post type & taxonomies via init hook
82
+ *
83
+ * @return void
84
+ */
85
+ public function register_hooks() {
86
+ // Add post types
87
+ add_action( 'init', array( $this, 'register_post_type' ), 0 );
88
+
89
+ // Add taxonomies
90
+ add_action( 'init', array( $this, 'register_taxonomies' ), 0 );
91
+ }
92
 
93
  /**
94
  * Register post type
includes/classes/class-auxin-widget-shortcode-map.php CHANGED
@@ -104,7 +104,6 @@ class Auxin_Widget_Shortcode_Map {
104
  // Add a widget if it was allowed
105
  if( $element_info['is_widget'] ) {
106
  $widget_info = $this->generate_widget_array( $element_info );
107
- // print_r($widget_info);
108
  global $wp_widget_factory;
109
  $wp_widget_factory->widgets[ $element_info['base'] ] = new Auxin_Widget( $widget_info );
110
  }
104
  // Add a widget if it was allowed
105
  if( $element_info['is_widget'] ) {
106
  $widget_info = $this->generate_widget_array( $element_info );
 
107
  global $wp_widget_factory;
108
  $wp_widget_factory->widgets[ $element_info['base'] ] = new Auxin_Widget( $widget_info );
109
  }
includes/classes/class-auxin-widget.php CHANGED
@@ -95,12 +95,52 @@ class Auxin_Widget extends WP_Widget {
95
  $id = $field['id'];
96
  // make sure description is set
97
  $field["description"] = ! isset( $field["description"] ) ? '': $field["description"];
98
- // print_r($field);
99
 
100
  $this->watch_for_field_dependencies( $field );
101
 
102
  switch ( $field['type'] ) {
103
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
  case 'iconpicker':
105
  case 'aux_iconpicker':
106
  $font_icons = Auxin()->Font_Icons->get_icons_list('fontastic');
95
  $id = $field['id'];
96
  // make sure description is set
97
  $field["description"] = ! isset( $field["description"] ) ? '': $field["description"];
 
98
 
99
  $this->watch_for_field_dependencies( $field );
100
 
101
  switch ( $field['type'] ) {
102
 
103
+ case 'aux_taxonomy':
104
+
105
+ $categories = get_terms( array(
106
+ 'taxonomy' => $field['taxonomy'],
107
+ 'orderby' => 'count',
108
+ 'hide_empty' => true
109
+ ));
110
+
111
+ $categories_list = array( ' ' => __('All Categories', AUXPFO_DOMAIN ) ) ;
112
+ foreach ( $categories as $key => $value ) {
113
+ $categories_list[ $value->term_id ] = $value->name;
114
+ }
115
+
116
+ if( gettype( $instance[ $id ] ) === "string" ) {
117
+ $select = array( $instance[ $id ] );
118
+ } else {
119
+ $select = $instance[ $id ];
120
+ }
121
+
122
+ echo '<div class="aux-element-field aux-multiple-selector ">',
123
+ '<label for="'.$this->get_field_id($id).'" >'.$field["name"].'</label>',
124
+ '<select multiple="multiple" name="' . $this->get_field_name($id) . '" id="' . $this->get_field_name($id) . '" class="aux-orig-select2 aux-admin-select2 aux-select2-multiple">';
125
+ $output .= '<option value="">' . __('Choose ..', 'auxin-elements') . '</option>';
126
+
127
+ foreach ( $categories_list as $key => $value ) {
128
+ printf(
129
+ '<option value="%s" class="hot-topic" %s style="margin-bottom:3px;">%s</option>',
130
+ $key,
131
+ in_array( $key, $select) ? 'selected="selected"' : '',
132
+ $value
133
+ );
134
+ }
135
+
136
+ echo '</select>';
137
+ if ( $field["description"] ) {
138
+ echo '<p class="option-description">' . $field["description"] . '</p>';
139
+ }
140
+ echo '</div>';
141
+
142
+ break;
143
+
144
  case 'iconpicker':
145
  case 'aux_iconpicker':
146
  $font_icons = Auxin()->Font_Icons->get_icons_list('fontastic');
includes/define.php CHANGED
@@ -12,7 +12,7 @@ if( ! defined( 'THEME_NAME' ) ){
12
  }
13
 
14
 
15
- define( 'AUXELS_VERSION' , '1.3.6' );
16
 
17
  define( 'AUXELS_SLUG' , 'auxin-elements' );
18
 
12
  }
13
 
14
 
15
+ define( 'AUXELS_VERSION' , '1.3.10' );
16
 
17
  define( 'AUXELS_SLUG' , 'auxin-elements' );
18
 
includes/elements/accordion.php CHANGED
@@ -92,7 +92,7 @@ function auxin_get_new_accordion_master_array( $master_array ) {
92
  array(
93
  'heading' => __('Content', 'auxin-elements'),
94
  'description' => __('Enter your accordion item content.', 'auxin-elements'),
95
- 'repeater' => 'accordion',
96
  'repeater-label' => __('Accordion', 'auxin-elements'),
97
  'section-name' => __('Accordion Section', 'auxin-elements'),
98
  'param_name' => 'content',
@@ -162,8 +162,8 @@ function auxin_widget_accordion_callback( $atts, $shortcode_content = null ){
162
  // widget custom output -----------------------
163
  if (is_array($accordion) || is_object($accordion)) {
164
  foreach ( $accordion as $key => $value ) {
165
-
166
-
167
  $output .= '<section>';
168
  $section_title = $value['accordion_label'];
169
  $section_content = $value['content'];
92
  array(
93
  'heading' => __('Content', 'auxin-elements'),
94
  'description' => __('Enter your accordion item content.', 'auxin-elements'),
95
+ 'repeater' => 'accordion',
96
  'repeater-label' => __('Accordion', 'auxin-elements'),
97
  'section-name' => __('Accordion Section', 'auxin-elements'),
98
  'param_name' => 'content',
162
  // widget custom output -----------------------
163
  if (is_array($accordion) || is_object($accordion)) {
164
  foreach ( $accordion as $key => $value ) {
165
+
166
+
167
  $output .= '<section>';
168
  $section_title = $value['accordion_label'];
169
  $section_content = $value['content'];
includes/elements/facebook.php CHANGED
@@ -96,7 +96,7 @@ function auxin_get_facebook_master_array( $master_array ) {
96
  'me' => __('Only the page owner' , 'auxin-elements'),
97
  'others' => __('Page owner and other people', 'auxin-elements'),
98
  'onlyothers' => __('Only other people', 'auxin-elements')
99
- ),
100
  'def_value' => 'me',
101
  'holder' => 'dropdown',
102
  'class' => 'showpostsby',
@@ -220,28 +220,28 @@ function auxin_widget_facebook_callback( $atts, $shortcode_content = null ){
220
  }
221
 
222
  if( empty( $showauthor ) ){
223
- $showauthor = "false";
224
  } else {
225
- $showauthor = "ture";
226
  }
227
  $showauthor = 'showauthor="' . $showauthor .'"';
228
 
229
  if( empty( $showheader ) ){
230
- $showheader = "false";
231
  } else {
232
- $showheader = "ture";
233
  }
234
  $showheader = 'showheader="' . $showheader .'"';
235
-
236
  if( empty( $ajax ) ){
237
- $ajax = "false";
238
  } else {
239
- $ajax = "ture";
240
  }
241
  $ajax = 'ajax="' . $ajax .'"';
242
 
243
  $facebook_shortcode = '[custom-facebook-feed ' . $id . ' ' . $num . ' ' . $textlength . ' ' . $pagetype . ' ' . $showpostsby . ' ' . $showauthor . ' ' . $ajax . ' ' . $extra_classes . ' ' . $showheader .']';
244
-
245
  echo do_shortcode( $facebook_shortcode );
246
 
247
  return ob_get_clean();
96
  'me' => __('Only the page owner' , 'auxin-elements'),
97
  'others' => __('Page owner and other people', 'auxin-elements'),
98
  'onlyothers' => __('Only other people', 'auxin-elements')
99
+ ),
100
  'def_value' => 'me',
101
  'holder' => 'dropdown',
102
  'class' => 'showpostsby',
220
  }
221
 
222
  if( empty( $showauthor ) ){
223
+ $showauthor = "false";
224
  } else {
225
+ $showauthor = "ture";
226
  }
227
  $showauthor = 'showauthor="' . $showauthor .'"';
228
 
229
  if( empty( $showheader ) ){
230
+ $showheader = "false";
231
  } else {
232
+ $showheader = "ture";
233
  }
234
  $showheader = 'showheader="' . $showheader .'"';
235
+
236
  if( empty( $ajax ) ){
237
+ $ajax = "false";
238
  } else {
239
+ $ajax = "ture";
240
  }
241
  $ajax = 'ajax="' . $ajax .'"';
242
 
243
  $facebook_shortcode = '[custom-facebook-feed ' . $id . ' ' . $num . ' ' . $textlength . ' ' . $pagetype . ' ' . $showpostsby . ' ' . $showauthor . ' ' . $ajax . ' ' . $extra_classes . ' ' . $showheader .']';
244
+
245
  echo do_shortcode( $facebook_shortcode );
246
 
247
  return ob_get_clean();
includes/elements/flickr.php CHANGED
@@ -56,7 +56,7 @@ function auxin_get_flickr_master_array( $master_array ) {
56
  ),
57
  array(
58
  'heading' => __('Flickr image type', 'auxin-elements'),
59
- 'description' => '',
60
  'param_name' => 'flickr_type',
61
  'type' => 'dropdown',
62
  'value' => array(
@@ -131,7 +131,7 @@ function auxin_get_flickr_master_array( $master_array ) {
131
  ),
132
  array(
133
  'heading' => __('Tags', 'auxin-elements'),
134
- 'description' => __('Display photos that have some particular tags, Seprate words with , for example: cat, square, nikon', 'auxin-elements'),
135
  'param_name' => 'tags',
136
  'type' => 'textfield',
137
  'value' => '',
@@ -337,16 +337,16 @@ function auxin_widget_flickr_callback( $atts, $shortcode_content = null ){
337
  }
338
 
339
  if( empty( $fixed_height ) ){
340
- $fixed_height = 0;
341
  } else {
342
- $fixed_height = 1;
343
  }
344
  $fixed_height = 'fixed_height="' . $fixed_height .'"';
345
-
346
  if( empty( $randomize ) ){
347
- $randomize = 0;
348
  } else {
349
- $randomize = 1;
350
  }
351
  $randomize = 'randomize="' . $randomize .'"';
352
 
56
  ),
57
  array(
58
  'heading' => __('Flickr image type', 'auxin-elements'),
59
+ 'description' => '',
60
  'param_name' => 'flickr_type',
61
  'type' => 'dropdown',
62
  'value' => array(
131
  ),
132
  array(
133
  'heading' => __('Tags', 'auxin-elements'),
134
+ 'description' => __('Display photos that have some particular tags, Seprate words with , for example: cat, square, nikon', 'auxin-elements'),
135
  'param_name' => 'tags',
136
  'type' => 'textfield',
137
  'value' => '',
337
  }
338
 
339
  if( empty( $fixed_height ) ){
340
+ $fixed_height = 0;
341
  } else {
342
+ $fixed_height = 1;
343
  }
344
  $fixed_height = 'fixed_height="' . $fixed_height .'"';
345
+
346
  if( empty( $randomize ) ){
347
+ $randomize = 0;
348
  } else {
349
+ $randomize = 1;
350
  }
351
  $randomize = 'randomize="' . $randomize .'"';
352
 
includes/elements/gallery.php CHANGED
@@ -477,6 +477,8 @@ function auxin_widget_gallery_callback( $attr, $shortcode_content = null ){
477
  $isotope_item_classes = 'aux-iso-item aux-col';
478
  }
479
 
 
 
480
  echo "<div class='aux-gallery-container aux-isotope-animated $column_class aux-no-gutter aux-layout-$isotop_layout' $isotope_attrs >";
481
 
482
 
477
  $isotope_item_classes = 'aux-iso-item aux-col';
478
  }
479
 
480
+ $column_media_width = round( $column_media_width );
481
+
482
  echo "<div class='aux-gallery-container aux-isotope-animated $column_class aux-no-gutter aux-layout-$isotop_layout' $isotope_attrs >";
483
 
484
 
includes/elements/latest-posts-slider.php CHANGED
@@ -504,7 +504,7 @@ function auxin_latest_posts_slider_callback( $atts, $shortcode_content = null ){
504
  </div>
505
  <div class="aux-slide-info">
506
  <?php if ( $add_meta ) { ?>
507
- <time datetime="<?php the_time('Y-m-d')?>" title="<?php the_time('Y-m-d')?>" ><?php the_time('F j, Y'); ?></time>
508
  <span class="entry-tax">
509
  <?php // the_category(' '); we can use this template tag, but customizable way is needed! ?>
510
  <?php $tax_name = 'category';
504
  </div>
505
  <div class="aux-slide-info">
506
  <?php if ( $add_meta ) { ?>
507
+ <time datetime="<?php echo get_the_date( DATE_W3C ); ?>" title="<?php echo get_the_date( DATE_W3C ); ?>" ><?php the_date(); ?></time>
508
  <span class="entry-tax">
509
  <?php // the_category(' '); we can use this template tag, but customizable way is needed! ?>
510
  <?php $tax_name = 'category';
includes/elements/quote.php CHANGED
@@ -167,7 +167,7 @@ function auxin_get_quote_master_array( $master_array ) {
167
  'group' => '' ,
168
  'edit_field_class' => ''
169
  )
170
-
171
  )
172
  );
173
 
167
  'group' => '' ,
168
  'edit_field_class' => ''
169
  )
170
+
171
  )
172
  );
173
 
includes/elements/recent-posts-timeline.php CHANGED
@@ -570,7 +570,7 @@ function auxin_widget_recent_posts_timeline_callback( $atts, $shortcode_content
570
 
571
  // add month label on timeline main line
572
  if( $post_month != $previous_post_month ){
573
- ?><span class="aux-date-label"><?php the_time('M, Y'); ?></span><?php
574
  }
575
 
576
  include( locate_template( 'templates/theme-parts/entry/post-column.php' ) );
570
 
571
  // add month label on timeline main line
572
  if( $post_month != $previous_post_month ){
573
+ ?><span class="aux-date-label"><?php the_time(); ?></span><?php
574
  }
575
 
576
  include( locate_template( 'templates/theme-parts/entry/post-column.php' ) );
includes/elements/tabs.php CHANGED
@@ -91,7 +91,7 @@ function auxin_get_tabs_master_array( $master_array ) {
91
  array(
92
  'heading' => __('Content', 'auxin-elements'),
93
  'description' => __('Enter your tab item content.', 'auxin-elements'),
94
- 'repeater' => 'tabs',
95
  'section-name' => __('Tabs section', 'auxin-elements'),
96
  'repeater-label' => __('Tabs', 'auxin-elements'),
97
  'param_name' => 'content',
91
  array(
92
  'heading' => __('Content', 'auxin-elements'),
93
  'description' => __('Enter your tab item content.', 'auxin-elements'),
94
+ 'repeater' => 'tabs',
95
  'section-name' => __('Tabs section', 'auxin-elements'),
96
  'repeater-label' => __('Tabs', 'auxin-elements'),
97
  'param_name' => 'content',
includes/elements/text.php CHANGED
@@ -35,7 +35,7 @@ function auxin_get_text_master_array( $master_array ) {
35
  'js_view' => '',
36
  'html_template' => '',
37
  'deprecated' => '',
38
- 'content_element' => false,
39
  'as_parent' => '',
40
  'as_child' => '',
41
  'params' => array(
@@ -165,18 +165,41 @@ function auxin_get_text_master_array( $master_array ) {
165
  'edit_field_class' => ''
166
  ),
167
  array(
168
- 'heading' => __('Icon', 'auxin-elements' ),
169
  'description' => __('Please choose an icon from avaialable icons.', 'auxin-elements'),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
170
  'param_name' => 'icon',
171
- 'type' => 'iconpicker',
172
  'value' => '',
173
  'def_value' => '',
174
  'holder' => 'textfield',
175
- 'class' => 'iconpicker',
176
  'admin_label' => true,
177
- 'dependency' => '',
 
 
 
178
  'weight' => '',
179
- 'group' => '' ,
180
  'edit_field_class' => ''
181
  ),
182
  array(
@@ -189,9 +212,12 @@ function auxin_get_text_master_array( $master_array ) {
189
  'holder' => '',
190
  'class' => 'icon_color',
191
  'admin_label' => true,
192
- 'dependency' => '',
 
 
 
193
  'weight' => '',
194
- 'group' => '' ,
195
  'edit_field_class' => ''
196
  ),
197
  array(
@@ -209,9 +235,12 @@ function auxin_get_text_master_array( $master_array ) {
209
  'holder' => 'dropdown',
210
  'class' => 'icon_size',
211
  'admin_label' => true,
212
- 'dependency' => '',
 
 
 
213
  'weight' => '',
214
- 'group' => '' ,
215
  'edit_field_class' => ''
216
  ),
217
  array(
@@ -245,9 +274,12 @@ function auxin_get_text_master_array( $master_array ) {
245
  'holder' => 'dropdown',
246
  'class' => 'icon_shape',
247
  'admin_label' => true,
248
- 'dependency' => '',
 
 
 
249
  'weight' => '',
250
- 'group' => '' ,
251
  'edit_field_class' => ''
252
  ),
253
  array(
@@ -260,9 +292,12 @@ function auxin_get_text_master_array( $master_array ) {
260
  'holder' => '',
261
  'class' => 'icon_bg_color',
262
  'admin_label' => true,
263
- 'dependency' => '',
 
 
 
264
  'weight' => '',
265
- 'group' => '' ,
266
  'edit_field_class' => ''
267
  ),
268
  array(
@@ -275,9 +310,12 @@ function auxin_get_text_master_array( $master_array ) {
275
  'holder' => '',
276
  'class' => 'icon_border_color',
277
  'admin_label' => true,
278
- 'dependency' => '',
 
 
 
279
  'weight' => '',
280
- 'group' => '' ,
281
  'edit_field_class' => ''
282
  ),
283
  array(
@@ -290,9 +328,35 @@ function auxin_get_text_master_array( $master_array ) {
290
  'holder' => '',
291
  'class' => 'image',
292
  'admin_label' => true,
293
- 'dependency' => '',
 
 
 
294
  'weight' => '',
295
- 'group' => '' ,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
296
  'edit_field_class' => ''
297
  ),
298
  array(
@@ -320,7 +384,7 @@ function auxin_get_text_master_array( $master_array ) {
320
  'admin_label' => true,
321
  'dependency' => '',
322
  'weight' => '',
323
- 'group' => '' ,
324
  'edit_field_class' => ''
325
  ),
326
  array(
@@ -383,6 +447,7 @@ function auxin_widget_column_callback( $atts, $shortcode_content = null ){
383
  'icon_border_color' => '', // color or 'icon' (same color as icon)
384
 
385
  'image' => '', // image on column side
 
386
  'image_position' => 'top', // top,left,right
387
 
388
  'extra_classes' => '', // custom css class names for this element
@@ -426,7 +491,9 @@ function auxin_widget_column_callback( $atts, $shortcode_content = null ){
426
 
427
 
428
  if( ! empty( $image ) && is_numeric( $image ) ) {
429
- $image = auxin_get_the_resized_attachment( $image );
 
 
430
  }
431
 
432
  ob_start();
@@ -441,9 +508,11 @@ function auxin_widget_column_callback( $atts, $shortcode_content = null ){
441
  <span class="aux-ico <?php echo $icon_classes; ?>" <?php echo $icon_inline_style; ?> > </span>
442
  </div>
443
  <?php
444
- } elseif( !empty( $image ) ) {
445
- echo $image;
446
- } if( ! empty( $title ) && empty( $title_link ) ) {
 
 
447
  ?>
448
  <h4 class="col-title"><?php echo $title; ?></h4>
449
  <?php } elseif( ! empty( $title ) && ! empty( $title_link ) ) { ?>
35
  'js_view' => '',
36
  'html_template' => '',
37
  'deprecated' => '',
38
+ 'content_element' => '',
39
  'as_parent' => '',
40
  'as_child' => '',
41
  'params' => array(
165
  'edit_field_class' => ''
166
  ),
167
  array(
168
+ 'heading' => __('Icon or image', 'auxin-elements' ),
169
  'description' => __('Please choose an icon from avaialable icons.', 'auxin-elements'),
170
+ 'heading' => __('Display Icon or Image','auxin-elements'),
171
+ 'description' => '',
172
+ 'param_name' => 'icon_or_image',
173
+ 'type' => 'dropdown',
174
+ 'def_value' => 'icon',
175
+ 'value' => array (
176
+ 'icon' => __( 'Icon' , 'auxin-elements' ),
177
+ 'image' => __( 'Image' , 'auxin-elements' ),
178
+ ),
179
+ 'holder' => 'dropdown',
180
+ 'class' => 'icon_or_image',
181
+ 'admin_label' => true,
182
+ 'dependency' => '',
183
+ 'weight' => '',
184
+ 'group' => 'Icon & Image',
185
+ 'edit_field_class' => ''
186
+ ),
187
+ array(
188
+ 'heading' => __('Icon', 'auxin-elements' ),
189
+ 'description' => __('Please choose an icon from the list.', 'auxin-elements'),
190
  'param_name' => 'icon',
191
+ 'type' => 'aux_iconpicker',
192
  'value' => '',
193
  'def_value' => '',
194
  'holder' => 'textfield',
195
+ 'class' => 'aux_iconpicker',
196
  'admin_label' => true,
197
+ 'dependency' => array(
198
+ 'element' => 'icon_or_image',
199
+ 'value' => array('icon')
200
+ ),
201
  'weight' => '',
202
+ 'group' => 'Icon & Image',
203
  'edit_field_class' => ''
204
  ),
205
  array(
212
  'holder' => '',
213
  'class' => 'icon_color',
214
  'admin_label' => true,
215
+ 'dependency' => array(
216
+ 'element' => 'icon_or_image',
217
+ 'value' => array('icon')
218
+ ),
219
  'weight' => '',
220
+ 'group' => 'Icon & Image',
221
  'edit_field_class' => ''
222
  ),
223
  array(
235
  'holder' => 'dropdown',
236
  'class' => 'icon_size',
237
  'admin_label' => true,
238
+ 'dependency' => array(
239
+ 'element' => 'icon_or_image',
240
+ 'value' => array('icon')
241
+ ),
242
  'weight' => '',
243
+ 'group' => 'Icon & Image',
244
  'edit_field_class' => ''
245
  ),
246
  array(
274
  'holder' => 'dropdown',
275
  'class' => 'icon_shape',
276
  'admin_label' => true,
277
+ 'dependency' => array(
278
+ 'element' => 'icon_or_image',
279
+ 'value' => array('icon')
280
+ ),
281
  'weight' => '',
282
+ 'group' => 'Icon & Image',
283
  'edit_field_class' => ''
284
  ),
285
  array(
292
  'holder' => '',
293
  'class' => 'icon_bg_color',
294
  'admin_label' => true,
295
+ 'dependency' => array(
296
+ 'element' => 'icon_or_image',
297
+ 'value' => array('icon')
298
+ ),
299
  'weight' => '',
300
+ 'group' => 'Icon & Image',
301
  'edit_field_class' => ''
302
  ),
303
  array(
310
  'holder' => '',
311
  'class' => 'icon_border_color',
312
  'admin_label' => true,
313
+ 'dependency' => array(
314
+ 'element' => 'icon_or_image',
315
+ 'value' => array('icon')
316
+ ),
317
  'weight' => '',
318
+ 'group' => 'Icon & Image',
319
  'edit_field_class' => ''
320
  ),
321
  array(
328
  'holder' => '',
329
  'class' => 'image',
330
  'admin_label' => true,
331
+ 'dependency' => array(
332
+ 'element' => 'icon_or_image',
333
+ 'value' => array('image')
334
+ ),
335
  'weight' => '',
336
+ 'group' => 'Icon & Image',
337
+ 'edit_field_class' => ''
338
+ ),
339
+ array(
340
+ 'heading' => __('Image Size','auxin-elements'),
341
+ 'description' => '',
342
+ 'param_name' => 'image_size',
343
+ 'type' => 'dropdown',
344
+ 'def_value' => 'full',
345
+ 'value' => array (
346
+ 'full' => __( 'Orginal Size' , 'auxin-elements' ),
347
+ 'large' => __( 'Large' , 'auxin-elements' ),
348
+ 'medium' => __( 'Medium' , 'auxin-elements' ),
349
+ 'thumbnail' => __( 'Thumbnail' , 'auxin-elements' )
350
+ ),
351
+ 'holder' => 'dropdown',
352
+ 'class' => 'image_size',
353
+ 'admin_label' => true,
354
+ 'dependency' => array(
355
+ 'element' => 'icon_or_image',
356
+ 'value' => array('image')
357
+ ),
358
+ 'weight' => '',
359
+ 'group' => 'Icon & Image' ,
360
  'edit_field_class' => ''
361
  ),
362
  array(
384
  'admin_label' => true,
385
  'dependency' => '',
386
  'weight' => '',
387
+ 'group' => 'Icon & Image',
388
  'edit_field_class' => ''
389
  ),
390
  array(
447
  'icon_border_color' => '', // color or 'icon' (same color as icon)
448
 
449
  'image' => '', // image on column side
450
+ 'image_size' => 'full', // image on column side
451
  'image_position' => 'top', // top,left,right
452
 
453
  'extra_classes' => '', // custom css class names for this element
491
 
492
 
493
  if( ! empty( $image ) && is_numeric( $image ) ) {
494
+ // $image = auxin_get_the_resized_attachment( $image );
495
+ $image = wp_get_attachment_image( $image, $image_size );
496
+
497
  }
498
 
499
  ob_start();
508
  <span class="aux-ico <?php echo $icon_classes; ?>" <?php echo $icon_inline_style; ?> > </span>
509
  </div>
510
  <?php
511
+ } elseif( !empty( $image ) ) { ?>
512
+ <div class="aux-ico-box <?php echo $icon_box_classes; ?>" <?php echo $icon_box_inline_style; ?>>
513
+ <?php echo $image; ?>
514
+ </div>
515
+ <?php } if( ! empty( $title ) && empty( $title_link ) ) {
516
  ?>
517
  <h4 class="col-title"><?php echo $title; ?></h4>
518
  <?php } elseif( ! empty( $title ) && ! empty( $title_link ) ) { ?>
includes/general-functions.php CHANGED
@@ -121,7 +121,7 @@ function auxin_the_absolute_image_url( $url ){
121
  if( ! function_exists( 'auxin_get_all_sidebar_ids' ) ){
122
 
123
  function auxin_get_all_sidebar_ids(){
124
- $sidebars = get_option( THEME_ID.'_sidebars');
125
  $output = array();
126
 
127
  if( isset( $auxin_sidebars ) && ! empty( $auxin_sidebars ) ){
@@ -475,7 +475,7 @@ function auxin_put_contents( $content, $file_location = '', $chmode = 0644 ){
475
  */
476
  function auxin_save_custom_js(){
477
 
478
- $js_string = get_option( THEME_ID.'_custom_js_string' );
479
 
480
  ob_start();
481
  ?>
@@ -491,13 +491,13 @@ function auxin_save_custom_js(){
491
 
492
 
493
  if ( auxin_put_contents_dir( $js_string, 'custom.js' ) ) {
494
- update_option( THEME_ID.'_custom_js_ver', rand(10, 99)/10 ); // disable inline css output
495
- update_option( THEME_ID.'_inline_custom_js' , false ); // disable inline css output
496
 
497
  return true;
498
  } else {
499
  // if the directory is not writable, try inline css fallback
500
- update_option( THEME_ID.'_inline_custom_js' , true ); // save css rules as option to print as inline css
501
 
502
  return false;
503
  }
@@ -514,12 +514,12 @@ function auxin_save_custom_js(){
514
  function auxin_remove_custom_js( $ref_name = '' ){
515
 
516
  // retrieve the js array list
517
- $js_array = get_option( THEME_ID.'_custom_js_array', array() );
518
 
519
  if( isset( $js_array[ $ref_name ] ) ){
520
  unset( $js_array[ $ref_name ] );
521
 
522
- update_option( THEME_ID.'_custom_js_array' , $js_array );
523
  // update the file content too
524
  auxin_add_custom_js();
525
  }
@@ -535,7 +535,7 @@ function auxin_remove_custom_js( $ref_name = '' ){
535
  */
536
  function auxin_get_custom_js_array( $exclude_ref_names = array() ){
537
  // retrieve the css array list
538
- $js_array = get_option( THEME_ID.'_custom_js_array', array() );
539
 
540
  return array_diff_key( $js_array, array_flip( (array) $exclude_ref_names ) );
541
  }
@@ -552,7 +552,7 @@ function auxin_get_custom_js_array( $exclude_ref_names = array() ){
552
  */
553
  function auxin_save_custom_css(){
554
 
555
- $css_string = get_option( THEME_ID.'_custom_css_string' );
556
 
557
  ob_start();
558
  ?>
@@ -568,13 +568,13 @@ function auxin_save_custom_css(){
568
 
569
  if ( auxin_put_contents_dir( $css_string, 'custom.css' ) ) {
570
 
571
- update_option( THEME_ID.'_custom_css_ver', rand(10, 99)/10 );
572
- update_option( THEME_ID.'_inline_custom_css' , false ); // disable inline css output
573
 
574
  return true;
575
  // if the directory is not writable, try inline css fallback
576
  } else {
577
- update_option( THEME_ID.'_inline_custom_css' , true ); // save css rules as option to print as inline css
578
  return false;
579
  }
580
  }
@@ -590,12 +590,12 @@ function auxin_save_custom_css(){
590
  function auxin_remove_custom_css( $ref_name = '' ){
591
 
592
  // retrieve the css array list
593
- $css_array = get_option( THEME_ID.'_custom_css_array', array() );
594
 
595
  if( isset( $css_array[ $ref_name ] ) ){
596
  unset( $css_array[ $ref_name ] );
597
 
598
- update_option( THEME_ID.'_custom_css_array' , $css_array );
599
  // update the file content too
600
  auxin_add_custom_css();
601
  }
@@ -611,7 +611,7 @@ function auxin_remove_custom_css( $ref_name = '' ){
611
  */
612
  function auxin_get_custom_css_array( $exclude_ref_names = array() ){
613
  // retrieve the css array list
614
- $css_array = get_option( THEME_ID.'_custom_css_array', array() );
615
 
616
  return array_diff_key( $css_array, array_flip( (array) $exclude_ref_names ) );
617
  }
@@ -893,3 +893,57 @@ if ( ! function_exists( 'auxin_get_gmap_style' ) ) {
893
  }
894
  }
895
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
121
  if( ! function_exists( 'auxin_get_all_sidebar_ids' ) ){
122
 
123
  function auxin_get_all_sidebar_ids(){
124
+ $sidebars = get_theme_mod( 'auxin_sidebars');
125
  $output = array();
126
 
127
  if( isset( $auxin_sidebars ) && ! empty( $auxin_sidebars ) ){
475
  */
476
  function auxin_save_custom_js(){
477
 
478
+ $js_string = get_theme_mod( 'custom_js_string' );
479
 
480
  ob_start();
481
  ?>
491
 
492
 
493
  if ( auxin_put_contents_dir( $js_string, 'custom.js' ) ) {
494
+ set_theme_mod( 'custom_js_ver', rand(10, 99)/10 ); // disable inline css output
495
+ set_theme_mod( 'use_inline_custom_js' , false ); // disable inline css output
496
 
497
  return true;
498
  } else {
499
  // if the directory is not writable, try inline css fallback
500
+ set_theme_mod( 'use_inline_custom_js' , true ); // save css rules as option to print as inline css
501
 
502
  return false;
503
  }
514
  function auxin_remove_custom_js( $ref_name = '' ){
515
 
516
  // retrieve the js array list
517
+ $js_array = get_theme_mod( 'custom_js_array', array() );
518
 
519
  if( isset( $js_array[ $ref_name ] ) ){
520
  unset( $js_array[ $ref_name ] );
521
 
522
+ set_theme_mod( 'custom_js_array' , $js_array );
523
  // update the file content too
524
  auxin_add_custom_js();
525
  }
535
  */
536
  function auxin_get_custom_js_array( $exclude_ref_names = array() ){
537
  // retrieve the css array list
538
+ $js_array = get_theme_mod( 'custom_js_array', array() );
539
 
540
  return array_diff_key( $js_array, array_flip( (array) $exclude_ref_names ) );
541
  }
552
  */
553
  function auxin_save_custom_css(){
554
 
555
+ $css_string = get_theme_mod( 'custom_css_string' );
556
 
557
  ob_start();
558
  ?>
568
 
569
  if ( auxin_put_contents_dir( $css_string, 'custom.css' ) ) {
570
 
571
+ set_theme_mod( 'custom_css_ver', rand(10, 99)/10 );
572
+ set_theme_mod( 'use_inline_custom_css' , false ); // disable inline css output
573
 
574
  return true;
575
  // if the directory is not writable, try inline css fallback
576
  } else {
577
+ set_theme_mod( 'use_inline_custom_css' , true ); // save css rules as option to print as inline css
578
  return false;
579
  }
580
  }
590
  function auxin_remove_custom_css( $ref_name = '' ){
591
 
592
  // retrieve the css array list
593
+ $css_array = get_theme_mod( 'custom_css_array', array() );
594
 
595
  if( isset( $css_array[ $ref_name ] ) ){
596
  unset( $css_array[ $ref_name ] );
597
 
598
+ set_theme_mod( 'custom_css_array', $css_array );
599
  // update the file content too
600
  auxin_add_custom_css();
601
  }
611
  */
612
  function auxin_get_custom_css_array( $exclude_ref_names = array() ){
613
  // retrieve the css array list
614
+ $css_array = get_theme_mod( 'custom_css_array', array() );
615
 
616
  return array_diff_key( $css_array, array_flip( (array) $exclude_ref_names ) );
617
  }
893
  }
894
  }
895
 
896
+
897
+
898
+
899
+ /**
900
+ * Removes all generate images from uploads directory
901
+ *
902
+ * @return void
903
+ */
904
+ function auxin_remove_all_generate_images( $remove = true ){
905
+ if( is_multisite() ){
906
+ return;
907
+ }
908
+ $upload_dir = wp_get_upload_dir();
909
+
910
+ $all_images = auxin_find_all_files( $upload_dir['basedir'] );
911
+ $generated_images = array();
912
+
913
+ foreach( $all_images as $key => $file ) {
914
+ if( 1 == preg_match("#-(\d+)x(\d+).(png|jpg|bmp|gif)$#", $file) ) {
915
+ $generated_images[] = $file;
916
+ if( $remove ){
917
+ unlink( $file );
918
+ }
919
+ }
920
+ }
921
+ echo count( $all_images ) . " / " . count( $generated_images );
922
+ }
923
+
924
+ /**
925
+ * Find all files within a directory
926
+ *
927
+ * @param string $dir The directory which we intend to serach in
928
+ * @return array List of files
929
+ */
930
+ function auxin_find_all_files( $dir, $recursive = true ){
931
+ $root = scandir( $dir );
932
+ $result = array();
933
+
934
+ foreach( $root as $file ){
935
+ if( $file === '.' || $file === '..') {
936
+ continue;
937
+ }
938
+ if( is_file( "$dir/$file" ) ){
939
+ $result[] = "$dir/$file";
940
+ continue;
941
+ } elseif( $recursive && is_dir( "$dir/$file" ) ){
942
+ $sub_dir_files = auxin_find_all_files( "$dir/$file" );
943
+ $result = array_merge( $result, $sub_dir_files );
944
+ }
945
+ }
946
+ return $result;
947
+ }
948
+
949
+
includes/general-hooks.php CHANGED
@@ -46,7 +46,7 @@ function auxin_add_vc_field_types(){
46
  esc_attr( $settings['param_name'] ) . ' ' . $settings['type'] . '_field" >', esc_attr($settings['param_name']) );
47
  $output .= '<option value="">' . __('Choose ..', 'auxin-elements') . '</option>';
48
 
49
- if( is_array( $font_icons ) ){
50
  foreach ( $font_icons as $icon ) {
51
  $icon_id = trim( $icon->classname, '.' );
52
  // $output .= '<option value="'. $icon_id .'" '. selected( $instance[$id], $icon_id, false ) .' >'. $icon->name . '</option>';
@@ -64,27 +64,24 @@ function auxin_add_vc_field_types(){
64
  // aux_visual_select field type definition for VC
65
  vc_add_shortcode_param( 'aux_visual_select', 'auxin_aux_visual_select_settings_field', ADMIN_JS_URL . 'scripts.js' );
66
  function auxin_aux_visual_select_settings_field( $settings, $value ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
 
68
- $output = '<select name="' . esc_attr($settings['param_name']) .
69
- '" class="aux-element-field visual-select-wrapper wpb_vc_param_value wpb-select ' .
70
- esc_attr( $settings['param_name'] ) . ' ' . $settings['type'] . '_field" '.
71
- ' id="' . esc_attr($settings['param_name']) .
72
- '" data-option="' . esc_attr( $value ) . '" >';
73
- '" >';
74
- foreach ( $settings['choices'] as $id => $option_info ) {
75
- $active_attr = ( $id == esc_attr( $value ) ) ? 'selected' : '';
76
- $data_class = isset( $option_info['css_class'] ) && ! empty( $option_info['css_class'] ) ? 'data-class="'. $option_info['css_class'].'"' : '';
77
- $data_symbol = empty( $data_class ) && isset( $option_info['image'] ) && ! empty( $option_info['image'] ) ? 'data-symbol="'. $option_info['image'].'"' : '';
78
- $css_classs = 'class="'. ($id) .'"';
79
- $output .= sprintf( '<option value="%s" %s %s %s %s>%s</option>', $id,$css_classs, $active_attr, $data_symbol, $data_class, $option_info['label'] );
80
-
81
- }
82
- $output .= '</select>';
83
-
84
- return $output; // This is html markup that will be outputted in content elements edit form
85
  }
86
 
87
-
88
  // aux_select_audio field type definition for VC
89
  vc_add_shortcode_param( 'aux_select_audio', 'aux_select_audio_settings_field', ADMIN_JS_URL . 'scripts.js' );
90
  function aux_select_audio_settings_field( $settings, $value ) {
@@ -97,8 +94,6 @@ function auxin_add_vc_field_types(){
97
  printf( "<script>auxin.attachmedia = jQuery.extend( auxin.attachmedia, %s );</script>", json_encode( array_unique( $attach_ids_list ) ) );
98
  }
99
  }
100
-
101
-
102
  $output = '';
103
  $output .= '<div class="aux-element-field av3_container aux_select_image axi-attachmedia-wrapper">'.
104
  '<input type="text" class="wpb-multiselect wpb_vc_param_value ' . esc_sql($settings['param_name']) . ' ' . $settings['type'] . '_field" name="' . esc_attr($settings['param_name']) . '" ' . 'id="' . esc_attr($settings['param_name']) . '" '
@@ -108,7 +103,7 @@ function auxin_add_vc_field_types(){
108
  .'data-uploader-title="'.__('Select Audio', 'auxin-elements').'"> '
109
  .'</div>';
110
 
111
- return $output; // This is html markup that will be outputted in content elements edit form
112
  }
113
 
114
  // aux_select_video field type definition for VC
@@ -119,11 +114,10 @@ function auxin_add_vc_field_types(){
119
  if( !empty( $value) ) {
120
  $att_ids = explode( ',', $value );
121
  $attach_ids_list = auxin_get_the_resized_attachment_src( $att_ids, 80, 80, true );
122
- if(!empty($att_ids)) {
123
- printf( "<script>auxin.attachmedia = jQuery.extend( auxin.attachmedia, %s );</script>", json_encode( array_unique( $attach_ids_list ) ) );
124
- }
125
  }
126
-
127
  $output = '';
128
  $output .= '<div class="aux-element-field av3_container aux_select_image axi-attachmedia-wrapper">'.
129
  '<input type="text" class="wpb-multiselect wpb_vc_param_value ' . esc_sql($settings['param_name']) . ' ' . $settings['type'] . '_field" name="' . esc_attr($settings['param_name']) . '" ' . 'id="' . esc_attr($settings['param_name']) . '" '
@@ -136,28 +130,54 @@ function auxin_add_vc_field_types(){
136
  return $output; // This is html markup that will be outputted in content elements edit form
137
  }
138
 
139
- // aux_select2_multiple field type definition for VC
140
  vc_add_shortcode_param( 'aux_select2_multiple', 'aux_multiple_selector_settings_field', ADMIN_JS_URL . 'scripts.js' );
141
  function aux_multiple_selector_settings_field( $settings, $value ) {
142
 
143
- if( gettype( $value ) === "string" ) {
144
- $value = explode( ",", $value);
145
- }
 
 
 
 
 
 
 
 
146
 
147
- $select = $value;
 
148
 
149
- $output = '';
150
- $output .= '<select multiple="multiple" name="' . esc_sql($settings['param_name']) . '" style="width:100%" ' . ' class="wpb-multiselect wpb_vc_param_value aux-select2-multiple ' . esc_sql($settings['param_name']) . ' ' . $settings['type'] . '_field" '. '>';
151
- foreach ( $settings['value'] as $id => $option_info ) {
152
- $active_attr = in_array( $id, $select) ? 'selected="selected"' : '';
153
- $output .= sprintf( '<option value="%s" %s >%s</option>', $id, $active_attr, $option_info );
154
- }
155
- $output.= '</select>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
156
 
157
  return $output; // This is html markup that will be outputted in content elements edit form
158
  }
159
 
160
-
161
  vc_add_shortcode_param( 'aux_switch', 'auxin_aux_switch_settings_field', ADMIN_JS_URL . 'scripts.js' );
162
  function auxin_aux_switch_settings_field( $settings, $value ) {
163
  $active_attr = auxin_is_true( $value ) ? 'checked="checked"' : '';
@@ -428,8 +448,8 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
428
  // Sub section - Custom JS ------------------------------------
429
 
430
  $fields_sections_list['sections'][] = array(
431
- 'id' => 'general-setting-section-custom-js',
432
- 'parent' => 'general-setting-section', // section parent's id
433
  'title' => __( 'Custom JS Code', 'auxin-elements'),
434
  'description' => __( 'Your Custom Javascript', 'auxin-elements')
435
  );
@@ -439,7 +459,7 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
439
  'description' => sprintf( __('You can add your custom javascript code here.%s DO NOT use %s tag.', 'auxin-elements'), '<br />' , '<code>&lt;script&gt;</code>' )."<br />".
440
  __('In order to save your custom javascript code, you are expected to execute the code prior for saving.', 'auxin-elements'),
441
  'id' => 'auxin_user_custom_js_head',
442
- 'section' => 'general-setting-section-custom-js',
443
  'dependency' => array(),
444
  'default' => '',
445
  'transport' => 'postMessage',
@@ -453,7 +473,7 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
453
  'description' => sprintf( __('You can add your custom javascript code here.%s DO NOT use %s tag.', 'auxin-elements'), '<br />' , '<code>&lt;script&gt;</code>' )."<br />".
454
  __('In order to save your custom javascript code, you are expected to execute the code prior for saving.', 'auxin-elements'),
455
  'id' => 'auxin_user_custom_js',
456
- 'section' => 'general-setting-section-custom-js',
457
  'dependency' => array(),
458
  'default' => '',
459
  'transport' => 'postMessage',
@@ -466,8 +486,8 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
466
  // Sub section - SEO ----------------------------------
467
 
468
  $fields_sections_list['sections'][] = array(
469
- 'id' => 'general-setting-section-seo',
470
- 'parent' => 'general-setting-section', // section parent's id
471
  'title' => __( 'Google API Keys & SEO', 'auxin-elements'),
472
  'description' => __( 'Google API Keys & SEO', 'auxin-elements')
473
  );
@@ -478,7 +498,7 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
478
  'description' => __('In case of using SEO plugins like "WordPress SEO by Yoast" or "All in One SEO Pack" you can disable built-in SEO for maximum compatibility.',
479
  'auxin-elements'),
480
  'id' => 'enable_theme_seo',
481
- 'section' => 'general-setting-section-seo',
482
  'dependency' => array(),
483
  'default' => '1',
484
  'type' => 'switch'
@@ -488,7 +508,7 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
488
  'title' => __('Google analytics code', 'auxin-elements'),
489
  'description' => sprintf( __('You can add your Google analytics code here.%s DO NOT use %s tag.', 'auxin-elements'), '<br />' , '<code>&lt;script&gt;</code>' ),
490
  'id' => 'auxin_user_google_analytics',
491
- 'section' => 'general-setting-section-seo',
492
  'dependency' => array(),
493
  'default' => '',
494
  'transport' => 'postMessage',
@@ -505,7 +525,7 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
505
  '</a>'
506
  ),
507
  'id' => 'auxin_google_map_api_key',
508
- 'section' => 'general-setting-section-seo',
509
  'dependency' => array(),
510
  'default' => '',
511
  'transport' => 'postMessage',
@@ -517,7 +537,7 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
517
  'title' => __('Google marketing code', 'auxin-elements'),
518
  'description' => sprintf( __('You can add your Google marketing code here.%s DO NOT use %s tag.', 'auxin-elements'), '<br />' , '<code>&lt;script&gt;</code>' ),
519
  'id' => 'auxin_user_google_marketing',
520
- 'section' => 'general-setting-section-seo',
521
  'dependency' => array(),
522
  'default' => '',
523
  'transport' => 'postMessage',
@@ -532,7 +552,7 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
532
  'title' => __('Footer Brand Image', 'auxin-elements'),
533
  'description' => __('This image appears as site brand image on footer section.', 'auxin-elements'),
534
  'id' => 'site_secondary_logo_image',
535
- 'section' => 'footer-setting-section-footer',
536
  'dependency' => array(
537
  array(
538
  'id' => 'show_site_footer',
@@ -554,7 +574,7 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
554
  'title' => __('Footer Brand Height', 'auxin-elements'),
555
  'description' => __('Specifies maximum height of logo in footer.', 'auxin-elements'),
556
  'id' => 'site_secondary_logo_max_height',
557
- 'section' => 'footer-setting-section-footer',
558
  'dependency' => array(
559
  array(
560
  'id' => 'show_site_footer',
@@ -581,8 +601,8 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
581
  // Sub section - Login page customizer -------------------------------
582
 
583
  $fields_sections_list['sections'][] = array(
584
- 'id' => 'tools-setting-section-login',
585
- 'parent' => 'tools-setting-section', // section parent's id
586
  'title' => __( 'Login Page', 'auxin-elements'),
587
  'description' => __( 'Preview login page', 'auxin-elements') . ' '. sprintf(
588
  '<a href="%s" class="section-title-icon axicon-link-ext" target="_self" title="%s" ></a>',
@@ -596,7 +616,7 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
596
  'title' => __('Login Skin', 'auxin-elements'),
597
  'description' => __('Specifies a skin for login page of your website.', 'auxin-elements'),
598
  'id' => 'auxin_login_skin',
599
- 'section' => 'tools-setting-section-login',
600
  'dependency' => array(),
601
  'choices' => array(
602
  'default' => array(
@@ -625,7 +645,7 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
625
  'title' => __('Login message', 'auxin-elements'),
626
  'description' => __('Enter a text to display above of login form.', 'auxin-elements'),
627
  'id' => 'auxin_login_message',
628
- 'section' => 'tools-setting-section-login',
629
  'dependency' => array(),
630
  'transport' => 'refresh',
631
  'type' => 'textarea',
@@ -638,7 +658,7 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
638
  'title' => __('Login Page Logo', 'auxin-elements'),
639
  'description' => __('Specifies a logo to display on login page.(width of logo image could be up to 320px)', 'auxin-elements'),
640
  'id' => 'auxin_login_logo_image',
641
- 'section' => 'tools-setting-section-login',
642
  'dependency' => array(),
643
  'transport' => 'refresh',
644
  'default' => '',
@@ -650,7 +670,7 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
650
  'title' => __('Logo Width', 'auxin-elements'),
651
  'description' => __('Specifies width of logo image in pixel.', 'auxin-elements'),
652
  'id' => 'auxin_login_logo_width',
653
- 'section' => 'tools-setting-section-login',
654
  'dependency' => array(),
655
  'transport' => 'refresh',
656
  'default' => '84',
@@ -662,7 +682,7 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
662
  'title' => __('Logo Height', 'auxin-elements'),
663
  'description' => __('Specifies height of logo image in pixel.', 'auxin-elements'),
664
  'id' => 'auxin_login_logo_height',
665
- 'section' => 'tools-setting-section-login',
666
  'dependency' => array(),
667
  'transport' => 'refresh',
668
  'default' => '84',
@@ -675,7 +695,7 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
675
  'title' => __('Enable Background', 'auxin-elements'),
676
  'description' => __('Enable it to display custom background on login page.', 'auxin-elements'),
677
  'id' => 'auxin_login_bg_show',
678
- 'section' => 'tools-setting-section-login',
679
  'type' => 'switch',
680
  'transport' => 'refresh',
681
  'wrapper_class' => 'collapse-head',
@@ -687,7 +707,7 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
687
  'title' => __( 'Background Color', 'auxin-elements'),
688
  'description' => __( 'Specifies background color of website.', 'auxin-elements'),
689
  'id' => 'auxin_login_bg_color',
690
- 'section' => 'tools-setting-section-login',
691
  'type' => 'color',
692
  'dependency' => array(
693
  array(
@@ -703,7 +723,7 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
703
  'title' => __('Background Image', 'auxin-elements'),
704
  'description' => __('You can upload custom image for background of login page', 'auxin-elements'),
705
  'id' => 'auxin_login_bg_image',
706
- 'section' => 'tools-setting-section-login',
707
  'type' => 'image',
708
  'dependency' => array(
709
  array(
@@ -719,7 +739,7 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
719
  'title' => __('Background Size', 'auxin-elements'),
720
  'description' => __('Specifies background size on login page.', 'auxin-elements'),
721
  'id' => 'auxin_login_bg_size',
722
- 'section' => 'tools-setting-section-login',
723
  'type' => 'radio-image',
724
  'choices' => array(
725
  'auto' => array(
@@ -749,7 +769,7 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
749
  'title' => __('Background Pattern', 'auxin-elements'),
750
  'description' => sprintf(__('You can select one of these patterns as login background image. %s Some of these can be used as a pattern over your background image.', 'auxin-elements'), '<br>'),
751
  'id' => 'auxin_login_bg_pattern',
752
- 'section' => 'tools-setting-section-login',
753
  'choices' => auxin_get_background_patterns( array( 'none' => array( 'label' =>__('None', 'auxin-elements'), 'image' => AUX_URL . 'images/visual-select/none-pattern.svg' ) ), 'before' ),
754
  'type' => 'radio-image',
755
  'dependency' => array(
@@ -766,7 +786,7 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
766
  'title' => __( 'Background Repeat', 'auxin-elements'),
767
  'description' => __( 'Specifies how background image repeats.', 'auxin-elements'),
768
  'id' => 'auxin_login_bg_repeat',
769
- 'section' => 'tools-setting-section-login',
770
  'choices' => array(
771
  'no-repeat' => array(
772
  'label' => __('No repeat', 'auxin-elements'),
@@ -800,7 +820,7 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
800
  'title' => __( 'Background Position', 'auxin-elements'),
801
  'description' => __('Specifies background image position.', 'auxin-elements'),
802
  'id' => 'auxin_login_bg_position',
803
- 'section' => 'tools-setting-section-login',
804
  'choices' => array(
805
  'left top' => array(
806
  'label' => __('Left top', 'auxin-elements'),
@@ -856,7 +876,7 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
856
  'title' => __('Background Attachment', 'auxin-elements'),
857
  'description' => __('Specifies whether the background is fixed or scrollable as user scrolls the page.', 'auxin-elements'),
858
  'id' => 'auxin_login_bg_attach',
859
- 'section' => 'tools-setting-section-login',
860
  'type' => 'radio-image',
861
  'choices' => array(
862
  'scroll' => array(
@@ -885,7 +905,7 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
885
  'description' => __('In this field you can define custom CSS class name for login page.
886
  This class name will be added to body classes in login page and is useful for advance custom styling purposes.', 'auxin-elements'),
887
  'id' => 'auxin_login_body_class',
888
- 'section' => 'tools-setting-section-login',
889
  'dependency' => array(),
890
  'transport' => 'refresh',
891
  'default' => '',
@@ -1238,7 +1258,6 @@ function auxels_add_post_type_metafields(){
1238
 
1239
  switch( $post_type ) {
1240
 
1241
-
1242
  case 'page':
1243
 
1244
  $metabox_args['hub_id'] = 'axi_meta_hub_page';
@@ -1266,7 +1285,7 @@ function auxels_add_post_type_metafields(){
1266
 
1267
  }
1268
 
1269
- add_action( 'init', 'auxels_add_post_type_metafields' );
1270
 
1271
 
1272
 
@@ -1296,7 +1315,7 @@ if( ! defined( 'WPSEO_VERSION') ){
1296
 
1297
  // Add a page number if necessary
1298
  if ( $paged >= 2 || $page >= 2 )
1299
- $title .= " $sep " . sprintf( __( 'Page %s', THEME_DOMAIN), max( $paged, $page ) );
1300
 
1301
  return $title;
1302
  }
46
  esc_attr( $settings['param_name'] ) . ' ' . $settings['type'] . '_field" >', esc_attr($settings['param_name']) );
47
  $output .= '<option value="">' . __('Choose ..', 'auxin-elements') . '</option>';
48
 
49
+ if( is_array( $font_icons ) ) {
50
  foreach ( $font_icons as $icon ) {
51
  $icon_id = trim( $icon->classname, '.' );
52
  // $output .= '<option value="'. $icon_id .'" '. selected( $instance[$id], $icon_id, false ) .' >'. $icon->name . '</option>';
64
  // aux_visual_select field type definition for VC
65
  vc_add_shortcode_param( 'aux_visual_select', 'auxin_aux_visual_select_settings_field', ADMIN_JS_URL . 'scripts.js' );
66
  function auxin_aux_visual_select_settings_field( $settings, $value ) {
67
+
68
+ $output = '<select name="' . esc_attr($settings['param_name']) .
69
+ '" class="aux-element-field visual-select-wrapper wpb_vc_param_value wpb-select ' .
70
+ esc_attr( $settings['param_name'] ) . ' ' . $settings['type'] . '_field" '.
71
+ ' id="' . esc_attr($settings['param_name']) .
72
+ '" data-option="' . esc_attr( $value ) . '" >';
73
+ foreach ( $settings['choices'] as $id => $option_info ) {
74
+ $active_attr = ( $id == esc_attr( $value ) ) ? 'selected' : '';
75
+ $data_class = isset( $option_info['css_class'] ) && ! empty( $option_info['css_class'] ) ? 'data-class="'. $option_info['css_class'].'"' : '';
76
+ $data_symbol = empty( $data_class ) && isset( $option_info['image'] ) && ! empty( $option_info['image'] ) ? 'data-symbol="'. $option_info['image'].'"' : '';
77
+ $css_classs = 'class="'. ($id) .'"';
78
+ $output .= sprintf( '<option value="%s" %s %s %s %s>%s</option>', $id,$css_classs, $active_attr, $data_symbol, $data_class, $option_info['label'] );
79
+ }
80
+ $output .= '</select>';
81
 
82
+ return $output; // This is html markup that will be outputted in content elements edit form
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  }
84
 
 
85
  // aux_select_audio field type definition for VC
86
  vc_add_shortcode_param( 'aux_select_audio', 'aux_select_audio_settings_field', ADMIN_JS_URL . 'scripts.js' );
87
  function aux_select_audio_settings_field( $settings, $value ) {
94
  printf( "<script>auxin.attachmedia = jQuery.extend( auxin.attachmedia, %s );</script>", json_encode( array_unique( $attach_ids_list ) ) );
95
  }
96
  }
 
 
97
  $output = '';
98
  $output .= '<div class="aux-element-field av3_container aux_select_image axi-attachmedia-wrapper">'.
99
  '<input type="text" class="wpb-multiselect wpb_vc_param_value ' . esc_sql($settings['param_name']) . ' ' . $settings['type'] . '_field" name="' . esc_attr($settings['param_name']) . '" ' . 'id="' . esc_attr($settings['param_name']) . '" '
103
  .'data-uploader-title="'.__('Select Audio', 'auxin-elements').'"> '
104
  .'</div>';
105
 
106
+ return $output; // This is html markup that will be outputted in content elements edit form
107
  }
108
 
109
  // aux_select_video field type definition for VC
114
  if( !empty( $value) ) {
115
  $att_ids = explode( ',', $value );
116
  $attach_ids_list = auxin_get_the_resized_attachment_src( $att_ids, 80, 80, true );
117
+ if(!empty($att_ids)) {
118
+ printf( "<script>auxin.attachmedia = jQuery.extend( auxin.attachmedia, %s );</script>", json_encode( array_unique( $attach_ids_list ) ) );
119
+ }
120
  }
 
121
  $output = '';
122
  $output .= '<div class="aux-element-field av3_container aux_select_image axi-attachmedia-wrapper">'.
123
  '<input type="text" class="wpb-multiselect wpb_vc_param_value ' . esc_sql($settings['param_name']) . ' ' . $settings['type'] . '_field" name="' . esc_attr($settings['param_name']) . '" ' . 'id="' . esc_attr($settings['param_name']) . '" '
130
  return $output; // This is html markup that will be outputted in content elements edit form
131
  }
132
 
133
+ // aux_select2_multiple field type definition for VC
134
  vc_add_shortcode_param( 'aux_select2_multiple', 'aux_multiple_selector_settings_field', ADMIN_JS_URL . 'scripts.js' );
135
  function aux_multiple_selector_settings_field( $settings, $value ) {
136
 
137
+ if( gettype( $value ) === "string" ) {
138
+ $value = explode( ",", $value);
139
+ }
140
+ $select = $value;
141
+ $output = '';
142
+ $output .= '<select multiple="multiple" name="' . esc_sql($settings['param_name']) . '" style="width:100%" ' . ' class="wpb-multiselect wpb_vc_param_value aux-select2-multiple ' . esc_sql($settings['param_name']) . ' ' . $settings['type'] . '_field" '. '>';
143
+ foreach ( $settings['value'] as $id => $option_info ) {
144
+ $active_attr = in_array( $id, $select) ? 'selected="selected"' : '';
145
+ $output .= sprintf( '<option value="%s" %s >%s</option>', $id, $active_attr, $option_info );
146
+ }
147
+ $output.= '</select>';
148
 
149
+ return $output; // This is html markup that will be outputted in content elements edit form
150
+ }
151
 
152
+ // aux_taxonomy field type definition for VC
153
+ vc_add_shortcode_param( 'aux_taxonomy', 'aux_taxonomy_selector_settings_field', ADMIN_JS_URL . 'scripts.js' );
154
+ function aux_taxonomy_selector_settings_field( $settings, $value ) {
155
+
156
+ $categories = get_terms(
157
+ array( 'taxonomy' => $settings['taxonomy'],
158
+ 'orderby' => 'count',
159
+ 'hide_empty' => true
160
+ ));
161
+
162
+ $categories_list = array( ' ' => __('All Categories', AUXPFO_DOMAIN ) );
163
+ foreach ( $categories as $key => $value_id ) {
164
+ $categories_list[$value_id->term_id] = $value_id->name;
165
+ }
166
+ if( gettype( $value ) === "string" ) {
167
+ $value = explode( ",", $value);
168
+ }
169
+ $selected = $value;
170
+ $output = '';
171
+ $output .= '<select multiple="multiple" name="' . $settings['param_name'] . '" style="width:100%" ' . ' class="wpb-multiselect wpb_vc_param_value aux-select2-multiple ' . esc_sql($settings['param_name']) . ' ' . 'aux-admin-select2 ' . $settings['type'] . '_field" '. '>';
172
+ foreach ( $categories_list as $id => $options_info ) {
173
+ $active_attr = in_array( $id, $selected) ? 'selected="selected"' : '';
174
+ $output .= sprintf( '<option value="%s" %s >%s</option>', $id, $active_attr, $options_info );
175
+ }
176
+ $output.= '</select>';
177
 
178
  return $output; // This is html markup that will be outputted in content elements edit form
179
  }
180
 
 
181
  vc_add_shortcode_param( 'aux_switch', 'auxin_aux_switch_settings_field', ADMIN_JS_URL . 'scripts.js' );
182
  function auxin_aux_switch_settings_field( $settings, $value ) {
183
  $active_attr = auxin_is_true( $value ) ? 'checked="checked"' : '';
448
  // Sub section - Custom JS ------------------------------------
449
 
450
  $fields_sections_list['sections'][] = array(
451
+ 'id' => 'general-section-custom-js',
452
+ 'parent' => 'general-section', // section parent's id
453
  'title' => __( 'Custom JS Code', 'auxin-elements'),
454
  'description' => __( 'Your Custom Javascript', 'auxin-elements')
455
  );
459
  'description' => sprintf( __('You can add your custom javascript code here.%s DO NOT use %s tag.', 'auxin-elements'), '<br />' , '<code>&lt;script&gt;</code>' )."<br />".
460
  __('In order to save your custom javascript code, you are expected to execute the code prior for saving.', 'auxin-elements'),
461
  'id' => 'auxin_user_custom_js_head',
462
+ 'section' => 'general-section-custom-js',
463
  'dependency' => array(),
464
  'default' => '',
465
  'transport' => 'postMessage',
473
  'description' => sprintf( __('You can add your custom javascript code here.%s DO NOT use %s tag.', 'auxin-elements'), '<br />' , '<code>&lt;script&gt;</code>' )."<br />".
474
  __('In order to save your custom javascript code, you are expected to execute the code prior for saving.', 'auxin-elements'),
475
  'id' => 'auxin_user_custom_js',
476
+ 'section' => 'general-section-custom-js',
477
  'dependency' => array(),
478
  'default' => '',
479
  'transport' => 'postMessage',
486
  // Sub section - SEO ----------------------------------
487
 
488
  $fields_sections_list['sections'][] = array(
489
+ 'id' => 'general-section-seo',
490
+ 'parent' => 'general-section', // section parent's id
491
  'title' => __( 'Google API Keys & SEO', 'auxin-elements'),
492
  'description' => __( 'Google API Keys & SEO', 'auxin-elements')
493
  );
498
  'description' => __('In case of using SEO plugins like "WordPress SEO by Yoast" or "All in One SEO Pack" you can disable built-in SEO for maximum compatibility.',
499
  'auxin-elements'),
500
  'id' => 'enable_theme_seo',
501
+ 'section' => 'general-section-seo',
502
  'dependency' => array(),
503
  'default' => '1',
504
  'type' => 'switch'
508
  'title' => __('Google analytics code', 'auxin-elements'),
509
  'description' => sprintf( __('You can add your Google analytics code here.%s DO NOT use %s tag.', 'auxin-elements'), '<br />' , '<code>&lt;script&gt;</code>' ),
510
  'id' => 'auxin_user_google_analytics',
511
+ 'section' => 'general-section-seo',
512
  'dependency' => array(),
513
  'default' => '',
514
  'transport' => 'postMessage',
525
  '</a>'
526
  ),
527
  'id' => 'auxin_google_map_api_key',
528
+ 'section' => 'general-section-seo',
529
  'dependency' => array(),
530
  'default' => '',
531
  'transport' => 'postMessage',
537
  'title' => __('Google marketing code', 'auxin-elements'),
538
  'description' => sprintf( __('You can add your Google marketing code here.%s DO NOT use %s tag.', 'auxin-elements'), '<br />' , '<code>&lt;script&gt;</code>' ),
539
  'id' => 'auxin_user_google_marketing',
540
+ 'section' => 'general-section-seo',
541
  'dependency' => array(),
542
  'default' => '',
543
  'transport' => 'postMessage',
552
  'title' => __('Footer Brand Image', 'auxin-elements'),
553
  'description' => __('This image appears as site brand image on footer section.', 'auxin-elements'),
554
  'id' => 'site_secondary_logo_image',
555
+ 'section' => 'footer-section-footer',
556
  'dependency' => array(
557
  array(
558
  'id' => 'show_site_footer',
574
  'title' => __('Footer Brand Height', 'auxin-elements'),
575
  'description' => __('Specifies maximum height of logo in footer.', 'auxin-elements'),
576
  'id' => 'site_secondary_logo_max_height',
577
+ 'section' => 'footer-section-footer',
578
  'dependency' => array(
579
  array(
580
  'id' => 'show_site_footer',
601
  // Sub section - Login page customizer -------------------------------
602
 
603
  $fields_sections_list['sections'][] = array(
604
+ 'id' => 'tools-section-login',
605
+ 'parent' => 'tools-section', // section parent's id
606
  'title' => __( 'Login Page', 'auxin-elements'),
607
  'description' => __( 'Preview login page', 'auxin-elements') . ' '. sprintf(
608
  '<a href="%s" class="section-title-icon axicon-link-ext" target="_self" title="%s" ></a>',
616
  'title' => __('Login Skin', 'auxin-elements'),
617
  'description' => __('Specifies a skin for login page of your website.', 'auxin-elements'),
618
  'id' => 'auxin_login_skin',
619
+ 'section' => 'tools-section-login',
620
  'dependency' => array(),
621
  'choices' => array(
622
  'default' => array(
645
  'title' => __('Login message', 'auxin-elements'),
646
  'description' => __('Enter a text to display above of login form.', 'auxin-elements'),
647
  'id' => 'auxin_login_message',
648
+ 'section' => 'tools-section-login',
649
  'dependency' => array(),
650
  'transport' => 'refresh',
651
  'type' => 'textarea',
658
  'title' => __('Login Page Logo', 'auxin-elements'),
659
  'description' => __('Specifies a logo to display on login page.(width of logo image could be up to 320px)', 'auxin-elements'),
660
  'id' => 'auxin_login_logo_image',
661
+ 'section' => 'tools-section-login',
662
  'dependency' => array(),
663
  'transport' => 'refresh',
664
  'default' => '',
670
  'title' => __('Logo Width', 'auxin-elements'),
671
  'description' => __('Specifies width of logo image in pixel.', 'auxin-elements'),
672
  'id' => 'auxin_login_logo_width',
673
+ 'section' => 'tools-section-login',
674
  'dependency' => array(),
675
  'transport' => 'refresh',
676
  'default' => '84',
682
  'title' => __('Logo Height', 'auxin-elements'),
683
  'description' => __('Specifies height of logo image in pixel.', 'auxin-elements'),
684
  'id' => 'auxin_login_logo_height',
685
+ 'section' => 'tools-section-login',
686
  'dependency' => array(),
687
  'transport' => 'refresh',
688
  'default' => '84',
695
  'title' => __('Enable Background', 'auxin-elements'),
696
  'description' => __('Enable it to display custom background on login page.', 'auxin-elements'),
697
  'id' => 'auxin_login_bg_show',
698
+ 'section' => 'tools-section-login',
699
  'type' => 'switch',
700
  'transport' => 'refresh',
701
  'wrapper_class' => 'collapse-head',
707
  'title' => __( 'Background Color', 'auxin-elements'),
708
  'description' => __( 'Specifies background color of website.', 'auxin-elements'),
709
  'id' => 'auxin_login_bg_color',
710
+ 'section' => 'tools-section-login',
711
  'type' => 'color',
712
  'dependency' => array(
713
  array(
723
  'title' => __('Background Image', 'auxin-elements'),
724
  'description' => __('You can upload custom image for background of login page', 'auxin-elements'),
725
  'id' => 'auxin_login_bg_image',
726
+ 'section' => 'tools-section-login',
727
  'type' => 'image',
728
  'dependency' => array(
729
  array(
739
  'title' => __('Background Size', 'auxin-elements'),
740
  'description' => __('Specifies background size on login page.', 'auxin-elements'),
741
  'id' => 'auxin_login_bg_size',
742
+ 'section' => 'tools-section-login',
743
  'type' => 'radio-image',
744
  'choices' => array(
745
  'auto' => array(
769
  'title' => __('Background Pattern', 'auxin-elements'),
770
  'description' => sprintf(__('You can select one of these patterns as login background image. %s Some of these can be used as a pattern over your background image.', 'auxin-elements'), '<br>'),
771
  'id' => 'auxin_login_bg_pattern',
772
+ 'section' => 'tools-section-login',
773
  'choices' => auxin_get_background_patterns( array( 'none' => array( 'label' =>__('None', 'auxin-elements'), 'image' => AUX_URL . 'images/visual-select/none-pattern.svg' ) ), 'before' ),
774
  'type' => 'radio-image',
775
  'dependency' => array(
786
  'title' => __( 'Background Repeat', 'auxin-elements'),
787
  'description' => __( 'Specifies how background image repeats.', 'auxin-elements'),
788
  'id' => 'auxin_login_bg_repeat',
789
+ 'section' => 'tools-section-login',
790
  'choices' => array(
791
  'no-repeat' => array(
792
  'label' => __('No repeat', 'auxin-elements'),
820
  'title' => __( 'Background Position', 'auxin-elements'),
821
  'description' => __('Specifies background image position.', 'auxin-elements'),
822
  'id' => 'auxin_login_bg_position',
823
+ 'section' => 'tools-section-login',
824
  'choices' => array(
825
  'left top' => array(
826
  'label' => __('Left top', 'auxin-elements'),
876
  'title' => __('Background Attachment', 'auxin-elements'),
877
  'description' => __('Specifies whether the background is fixed or scrollable as user scrolls the page.', 'auxin-elements'),
878
  'id' => 'auxin_login_bg_attach',
879
+ 'section' => 'tools-section-login',
880
  'type' => 'radio-image',
881
  'choices' => array(
882
  'scroll' => array(
905
  'description' => __('In this field you can define custom CSS class name for login page.
906
  This class name will be added to body classes in login page and is useful for advance custom styling purposes.', 'auxin-elements'),
907
  'id' => 'auxin_login_body_class',
908
+ 'section' => 'tools-section-login',
909
  'dependency' => array(),
910
  'transport' => 'refresh',
911
  'default' => '',
1258
 
1259
  switch( $post_type ) {
1260
 
 
1261
  case 'page':
1262
 
1263
  $metabox_args['hub_id'] = 'axi_meta_hub_page';
1285
 
1286
  }
1287
 
1288
+ //add_action( 'init', 'auxels_add_post_type_metafields' );
1289
 
1290
 
1291
 
1315
 
1316
  // Add a page number if necessary
1317
  if ( $paged >= 2 || $page >= 2 )
1318
+ $title .= " $sep " . sprintf( __( 'Page %s', 'auxin-elements'), max( $paged, $page ) );
1319
 
1320
  return $title;
1321
  }
includes/general-shortcodes.php CHANGED
@@ -31,7 +31,7 @@ function auxin_shortcode_timeline( $atts, $content = null ) {
31
 
32
  // sanitize sql order and orderby
33
  $orderby = $orderby ? sanitize_sql_orderby( $orderby ) : 'date';
34
- $order = $order ? sanitize_sql_order( $order ) : 'DESC';
35
 
36
  // validate number fetched items
37
  $num = is_numeric( $num ) ? $num : -1;
@@ -322,7 +322,7 @@ function auxin_shortcode_timeline( $atts, $content = null ) {
322
  <?php if($date_type == "big") { ?>
323
  <div class="cell-date">
324
  <em> </em><em> </em>
325
- <time datetime="<?php the_time('Y-m-d')?>" title="<?php the_time('Y-m-d')?>" >
326
  <strong><?php the_time('d')?></strong>
327
  <span><?php the_time('M')?></span>
328
  </time>
@@ -333,7 +333,7 @@ function auxin_shortcode_timeline( $atts, $content = null ) {
333
 
334
  <div class="entry-content">
335
  <?php if($date_type == "inline" && $post_format != "quote") { ?>
336
- <time datetime="<?php the_time('Y-m-d')?>" title="<?php the_time('Y-m-d')?>" ><?php the_time('F j, Y'); ?></time>
337
  <?php } ?>
338
 
339
  <?php if($post_format == "quote") {
31
 
32
  // sanitize sql order and orderby
33
  $orderby = $orderby ? sanitize_sql_orderby( $orderby ) : 'date';
34
+ $order = $order ? auxin_sanitize_sql_order( $order ) : 'DESC';
35
 
36
  // validate number fetched items
37
  $num = is_numeric( $num ) ? $num : -1;
322
  <?php if($date_type == "big") { ?>
323
  <div class="cell-date">
324
  <em> </em><em> </em>
325
+ <time datetime="<?php echo get_the_date( DATE_W3C ); ?>" title="<?php echo get_the_date( DATE_W3C ); ?>" >
326
  <strong><?php the_time('d')?></strong>
327
  <span><?php the_time('M')?></span>
328
  </time>
333
 
334
  <div class="entry-content">
335
  <?php if($date_type == "inline" && $post_format != "quote") { ?>
336
+ <time datetime="<?php echo get_the_date( DATE_W3C ); ?>" title="<?php echo get_the_date( DATE_W3C ); ?>" ><?php the_date(); ?></time>
337
  <?php } ?>
338
 
339
  <?php if($post_format == "quote") {
includes/index.php CHANGED
@@ -24,13 +24,13 @@ include_once( 'elements/recent-posts-land-style.php' );
24
  if( auxin_is_plugin_active( 'so-widgets-bundle/so-widgets-bundle.php' ) ) {
25
  include_once( 'elements/accordion.php' );
26
  include_once( 'elements/tabs.php' );
27
- include_once( 'elements/text.php' );
28
  }
29
  // if visual composer plugin is active
30
  if( defined( 'WPB_VC_VERSION' ) || auxin_is_plugin_active( 'js_composer/js_composer.php' ) ){
31
 
32
  }
33
 
 
34
  include_once( 'elements/recent-posts-tiles.php' );
35
  include_once( 'elements/attachment-url.php' );
36
  include_once( 'elements/audio.php' );
24
  if( auxin_is_plugin_active( 'so-widgets-bundle/so-widgets-bundle.php' ) ) {
25
  include_once( 'elements/accordion.php' );
26
  include_once( 'elements/tabs.php' );
 
27
  }
28
  // if visual composer plugin is active
29
  if( defined( 'WPB_VC_VERSION' ) || auxin_is_plugin_active( 'js_composer/js_composer.php' ) ){
30
 
31
  }
32
 
33
+ include_once( 'elements/text.php' );
34
  include_once( 'elements/recent-posts-tiles.php' );
35
  include_once( 'elements/attachment-url.php' );
36
  include_once( 'elements/audio.php' );
public/class-auxels.php CHANGED
@@ -247,10 +247,7 @@ class AUXELS {
247
  * @since 1.0.0
248
  */
249
  private static function single_activate() {
250
-
251
- // try to regenerate the asset files on plugin activation
252
- auxin_add_custom_js();
253
- auxin_add_custom_css();
254
 
255
  do_action( 'auxels_activated', get_current_blog_id() );
256
  }
@@ -308,6 +305,16 @@ class AUXELS {
308
 
309
  }
310
 
 
 
 
 
 
 
 
 
 
 
311
 
312
  /**
313
  * Load the plugin text domain for translation.
247
  * @since 1.0.0
248
  */
249
  private static function single_activate() {
250
+ add_action( 'after_setup_theme', array( 'AUXELS', 'flush' ) );
 
 
 
251
 
252
  do_action( 'auxels_activated', get_current_blog_id() );
253
  }
305
 
306
  }
307
 
308
+ /**
309
+ * Flush and perform some tasks on theme setup
310
+ *
311
+ * @since 1.0.0
312
+ */
313
+ public static function flush() {
314
+ // try to regenerate the asset files on plugin activation
315
+ auxin_add_custom_js();
316
+ auxin_add_custom_css();
317
+ }
318
 
319
  /**
320
  * Load the plugin text domain for translation.
public/templates/vcomposer/auxin_vc_extendes.php CHANGED
@@ -1,11 +1,11 @@
1
  <?php
2
 
3
  vc_add_param( 'vc_row', array(
4
- 'type' => 'textfield',
5
- 'class' => '',
6
- 'heading' => 'Anchor ID',
7
- 'param_name'=> 'anchor_id',
8
- 'value' => ''
9
  ));
10
 
11
 
1
  <?php
2
 
3
  vc_add_param( 'vc_row', array(
4
+ 'type' => 'textfield',
5
+ 'class' => '',
6
+ 'heading' => 'Anchor ID',
7
+ 'param_name'=> 'anchor_id',
8
+ 'value' => ''
9
  ));
10
 
11