Shortcodes and extra features for Phlox theme - Version 1.3.14

Version Description

Download this release

Release Info

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

Code changes from version 1.3.10 to 1.3.14

Files changed (34) hide show
  1. README.txt +7 -3
  2. admin/includes/admin-hooks.php +47 -3
  3. admin/includes/admin-the-functions.php +8 -0
  4. admin/includes/compatibility/siteorigin/fields/colorpicker.class.php +22 -0
  5. admin/includes/index.php +6 -2
  6. admin/includes/metaboxes/metabox-fields-general-advanced.php +45 -0
  7. admin/includes/metaboxes/metabox-fields-post-audio.php +3 -3
  8. admin/includes/metaboxes/metabox-fields-post-video.php +3 -3
  9. auxin-elements.php +2 -2
  10. includes/classes/class-auxels-import-parser.php +2 -2
  11. includes/classes/class-auxin-dependency-sorting.php +83 -0
  12. includes/classes/class-auxin-plugin-requirements.php +40 -15
  13. includes/classes/class-auxin-siteorigin-widget.php +1 -7
  14. includes/classes/class-auxin-widget-shortcode-map.php +1 -1
  15. includes/classes/class-auxin-widget.php +0 -3
  16. includes/define.php +1 -1
  17. includes/elements/audio.php +2 -2
  18. includes/elements/button.php +6 -6
  19. includes/elements/contact-box.php +63 -35
  20. includes/elements/contact-form.php +1 -1
  21. includes/elements/divider.php +5 -5
  22. includes/elements/dropcap.php +6 -6
  23. includes/elements/gallery.php +12 -12
  24. includes/elements/gmap.php +23 -29
  25. includes/elements/quote.php +8 -8
  26. includes/elements/recent-posts-grid-carousel.php +6 -6
  27. includes/elements/recent-posts-masonry.php +1 -1
  28. includes/elements/recent-posts-tiles.php +2 -2
  29. includes/elements/recent-posts-timeline.php +3 -3
  30. includes/elements/text.php +551 -82
  31. includes/elements/video.php +3 -3
  32. includes/general-functions.php +2 -2
  33. includes/general-hooks.php +345 -13
  34. public/templates/vcomposer/vc_row.php +2 -2
README.txt CHANGED
@@ -6,7 +6,7 @@ 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
 
@@ -140,6 +140,9 @@ Bugs can be reported in our [support forums](http://wordpress.org/tags/auxin-ele
140
 
141
  == Changelog ==
142
 
 
 
 
143
  = Version 1.3.10 / (21.06.2017) =
144
  - [Improvement]: New changes for auxin framework applied
145
 
@@ -194,5 +197,6 @@ Bugs can be reported in our [support forums](http://wordpress.org/tags/auxin-ele
194
 
195
  == Upgrade Notice ==
196
 
197
- = 1.3.10 =
198
- - [Improvement]: New changes for auxin framework applied
 
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.14
10
  License: GPLv3
11
  License URI: http://www.gnu.org/licenses/gpl.html
12
 
140
 
141
  == Changelog ==
142
 
143
+ = Version 1.3.14 / (01.08.2017) =
144
+ - [Improvement]: Applying some changes based on latest changes in auxin framework
145
+
146
  = Version 1.3.10 / (21.06.2017) =
147
  - [Improvement]: New changes for auxin framework applied
148
 
197
 
198
  == Upgrade Notice ==
199
 
200
+ = 1.3.14 =
201
+ - [Improvement]: Applying some changes based on latest changes in auxin framework
202
+
admin/includes/admin-hooks.php CHANGED
@@ -158,7 +158,7 @@ function auxin_welcome_page_display_section_feedback(){
158
  <input type="submit" class="button button-primary aux-button" value="Submit feedback" />
159
 
160
  <div class="aux-sending-status">
161
- <img class="ajax-progress aux-hide" src="<?php echo AUX_URL; ?>/css/images/elements/saving.gif" />
162
  <span class="ajax-response aux-hide" ><?php _e( 'Submitting your feedback ..', 'auxin-elements' ); ?></span>
163
  </div>
164
 
@@ -276,6 +276,7 @@ function auxin_mime_types( $mimes ) {
276
 
277
  add_filter('upload_mimes', 'auxin_mime_types');
278
 
 
279
  /*======================================================================*/
280
 
281
  function auxin_elements_add_post_metabox_models( $models ){
@@ -306,6 +307,11 @@ function auxin_elements_add_post_metabox_models( $models ){
306
  'priority' => 26
307
  );
308
 
 
 
 
 
 
309
  return $models;
310
  }
311
 
@@ -402,10 +408,10 @@ function auxin_assign_default_menus(){
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
  }
@@ -417,3 +423,41 @@ function auxin_assign_default_menus(){
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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
158
  <input type="submit" class="button button-primary aux-button" value="Submit feedback" />
159
 
160
  <div class="aux-sending-status">
161
+ <img class="ajax-progress aux-hide" src="<?php echo AUXIN_URL; ?>/css/images/elements/saving.gif" />
162
  <span class="ajax-response aux-hide" ><?php _e( 'Submitting your feedback ..', 'auxin-elements' ); ?></span>
163
  </div>
164
 
276
 
277
  add_filter('upload_mimes', 'auxin_mime_types');
278
 
279
+
280
  /*======================================================================*/
281
 
282
  function auxin_elements_add_post_metabox_models( $models ){
307
  'priority' => 26
308
  );
309
 
310
+ $models[] = array(
311
+ 'model' => auxin_metabox_fields_general_advanced(),
312
+ 'priority' => 36
313
+ );
314
+
315
  return $models;
316
  }
317
 
408
  if( empty( $locations['header-secondary'] ) && preg_match( '(secondary)', $menu_name ) ){
409
  $locations['header-secondary'] = $nav_menu->term_id;
410
  $assinged = true;
411
+ } elseif( empty( $locations['header-primary'] ) && preg_match( '(primary|mega|header)', $menu_name ) ){
412
  $locations['header-primary'] = $nav_menu->term_id;
413
  $assinged = true;
414
+ } elseif( empty( $locations['footer'] ) && preg_match( '(footer)', $menu_name ) ){
415
  $locations['footer'] = $nav_menu->term_id;
416
  $assinged = true;
417
  }
423
 
424
  add_action( 'after_switch_theme', 'auxin_assign_default_menus' ); // triggers when theme will be actived, WP 3.3
425
  add_action( 'import_end', 'auxin_assign_default_menus' ); // triggers when the theme data was imported
426
+
427
+ /*-----------------------------------------------------------------------------------*/
428
+ /* Remove any script tag fromt custom js (if user used them in the script content)
429
+ /*-----------------------------------------------------------------------------------*/
430
+
431
+ /**
432
+ * Strip <script> tags
433
+ *
434
+ * @param string $js_string The custom js string
435
+ * @return string The sanitized custom js code
436
+ */
437
+ function auxels_strip_script_tags_from_custom_js( $js_string ){
438
+ if ( false !== stripos( $js_string, '</script>' ) ) {
439
+ $js_string = str_replace( array( "<script>", "</script>" ), array('', ''), $js_string );
440
+ }
441
+ return $js_string;
442
+ }
443
+ add_filter( 'auxin_custom_js_string', 'auxels_strip_script_tags_from_custom_js' );
444
+
445
+ /*-----------------------------------------------------------------------------------*/
446
+ /* Remove any style tag fromt custom css (if user used them in the style content)
447
+ /*-----------------------------------------------------------------------------------*/
448
+
449
+ /**
450
+ * Strip <style> tags
451
+ *
452
+ * @param string $css_string The custom css string
453
+ * @return string The sanitized custom css code
454
+ */
455
+ function auxels_strip_style_tags_from_custom_css( $css_string ){
456
+ if ( false !== stripos( $css_string, '</style>' ) ) {
457
+ $css_string = str_replace( array( "<style>", "</style>" ), array('', ''), $css_string );
458
+ }
459
+ return $css_string;
460
+ }
461
+ add_filter( 'auxin_custom_css_string', 'auxels_strip_style_tags_from_custom_css' );
462
+
463
+ /*-----------------------------------------------------------------------------------*/
admin/includes/admin-the-functions.php CHANGED
@@ -1,7 +1,15 @@
1
  <?php
2
  // admin related functions
3
 
 
 
4
 
 
 
 
 
 
 
5
  function auxin_get_about_system_status(){
6
  ?>
7
  <div class="aux-status-wrapper">
1
  <?php
2
  // admin related functions
3
 
4
+ // Include advanced metabox tab
5
+ require_once( 'metaboxes/metabox-fields-general-advanced.php' );
6
 
7
+
8
+ /**
9
+ * Content for status tab in welcome-about page in admin panel
10
+ *
11
+ * @return void
12
+ */
13
  function auxin_get_about_system_status(){
14
  ?>
15
  <div class="aux-status-wrapper">
admin/includes/compatibility/siteorigin/fields/colorpicker.class.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class Auxin_SiteOrigin_Field_Colorpicker
5
+ */
6
+ class Auxin_SiteOrigin_Field_Colorpicker extends SiteOrigin_Widget_Field_Base {
7
+
8
+ protected function render_field( $value, $instance ) {
9
+
10
+ $output = '<div class="aux-so-colorpicker aux-element-colorpicker mini-color-wrapper">';
11
+
12
+ $output .= sprintf( '<input type="text" class="aux-colorpicker-field" name="%s" id="%s" value="%2$s" />', $this->element_name, $this->element_id, $field['value'] ).
13
+
14
+ $output .= '</div>';
15
+
16
+ echo $output;
17
+ }
18
+
19
+ protected function sanitize_field_input( $value, $instance ) {
20
+ return $value;
21
+ }
22
+ }
admin/includes/index.php CHANGED
@@ -12,9 +12,13 @@ include_once( 'admin-hooks.php' );
12
  // init the class for extending the menu nav in back-end
13
  Auxin_Master_Nav_Menu_Admin::get_instance();
14
 
 
15
  // custom permalink setting fields for custom post types
16
- //$axi_permalink = new Auxin_Permalink();
17
- //$axi_permalink->setup();
 
 
 
18
 
19
  // init Auxin_Install
20
  // init Auxin_Admin_Dashboard
12
  // init the class for extending the menu nav in back-end
13
  Auxin_Master_Nav_Menu_Admin::get_instance();
14
 
15
+
16
  // custom permalink setting fields for custom post types
17
+ function auxin_init_permalinks( ){
18
+ $aux_permalink = new Auxin_Permalink();
19
+ $aux_permalink->setup();
20
+ }
21
+ add_action( 'auxin_ready', 'auxin_init_permalinks' );
22
 
23
  // init Auxin_Install
24
  // init Auxin_Admin_Dashboard
admin/includes/metaboxes/metabox-fields-general-advanced.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Add custom code meta box Model
4
+ *
5
+ *
6
+ * @package Auxin
7
+ * @license LICENSE.txt
8
+ * @author
9
+ * @link http://averta.net/phlox/
10
+ * @copyright (c) 2010-2017
11
+ */
12
+
13
+ // no direct access allowed
14
+ if ( ! defined('ABSPATH') ) exit;
15
+
16
+
17
+ function auxin_metabox_fields_general_advanced(){
18
+
19
+ $model = new Auxin_Metabox_Model();
20
+ $model->id = 'general-advanced';
21
+ $model->title = __('Advanced Setting', 'auxin-elements');
22
+ $model->fields = array(
23
+
24
+ array(
25
+ 'title' => __('Custom CSS class name for body', 'auxin-elements'),
26
+ 'description' => __('You can define custom CSS class name for this page. It helpful for targeting this page by custom CSS code.', 'auxin-elements'),
27
+ 'id' => 'aux_custom_body_class',
28
+ 'type' => 'textbox',
29
+ 'default' => '' // default value
30
+ ),
31
+
32
+ array(
33
+ 'title' => __('Custom CSS Code', 'auxin-elements'),
34
+ 'description' => __('Attention: The following custom CSS code will be applied ONLY to this page.', 'auxin-elements').'<br />'.
35
+ __('For defining global CSS roles, please use custom CSS field on option panel.', 'auxin-elements'),
36
+ 'id' => 'aux_page_custom_css',
37
+ 'type' => 'code',
38
+ 'mode' => 'css',
39
+ 'default' => ''
40
+ )
41
+
42
+ );
43
+
44
+ return $model;
45
+ }
admin/includes/metaboxes/metabox-fields-post-audio.php CHANGED
@@ -48,15 +48,15 @@ function auxin_metabox_fields_post_audio(){
48
  'choices' => array(
49
  'default' => array(
50
  'label' => __('Default (set in theme options)', 'auxin-elements'),
51
- 'image' => AUX_URL . 'images/visual-select/default2.svg'
52
  ),
53
  'light' => array(
54
  'label' => __('Light', 'auxin-elements'),
55
- 'image' => AUX_URL . 'images/visual-select/audio-player-light.svg'
56
  ),
57
  'dark' => array(
58
  'label' => __('Dark', 'auxin-elements'),
59
- 'image' => AUX_URL . 'images/visual-select/audio-player-dark.svg'
60
  )
61
  )
62
  )
48
  'choices' => array(
49
  'default' => array(
50
  'label' => __('Default (set in theme options)', 'auxin-elements'),
51
+ 'image' => AUXIN_URL . 'images/visual-select/default2.svg'
52
  ),
53
  'light' => array(
54
  'label' => __('Light', 'auxin-elements'),
55
+ 'image' => AUXIN_URL . 'images/visual-select/audio-player-light.svg'
56
  ),
57
  'dark' => array(
58
  'label' => __('Dark', 'auxin-elements'),
59
+ 'image' => AUXIN_URL . 'images/visual-select/audio-player-dark.svg'
60
  )
61
  )
62
  )
admin/includes/metaboxes/metabox-fields-post-video.php CHANGED
@@ -55,15 +55,15 @@ function auxin_metabox_fields_post_video(){
55
  'choices' => array(
56
  'default' => array(
57
  'label' => __('Default (set in theme options)', 'auxin-elements'),
58
- 'image' => AUX_URL . 'images/visual-select/default2.svg'
59
  ),
60
  'light' => array(
61
  'label' => __('Light', 'auxin-elements'),
62
- 'image' => AUX_URL . 'images/visual-select/audio-player-light.svg'
63
  ),
64
  'dark' => array(
65
  'label' => __('Dark', 'auxin-elements'),
66
- 'image' => AUX_URL . 'images/visual-select/audio-player-dark.svg'
67
  )
68
  )
69
  )
55
  'choices' => array(
56
  'default' => array(
57
  'label' => __('Default (set in theme options)', 'auxin-elements'),
58
+ 'image' => AUXIN_URL . 'images/visual-select/default2.svg'
59
  ),
60
  'light' => array(
61
  'label' => __('Light', 'auxin-elements'),
62
+ 'image' => AUXIN_URL . 'images/visual-select/audio-player-light.svg'
63
  ),
64
  'dark' => array(
65
  'label' => __('Dark', 'auxin-elements'),
66
+ 'image' => AUXIN_URL . 'images/visual-select/audio-player-dark.svg'
67
  )
68
  )
69
  )
auxin-elements.php CHANGED
@@ -12,7 +12,7 @@
12
  * Plugin Name: Phlox Core Elements
13
  * Plugin URI: https://wordpress.org/plugins/auxin-elements/
14
  * Description: Powerful and comprehensive plugin that extends the functionality of Phlox theme by adding new shortcodes, widgets and options
15
- * Version: 1.3.10
16
  * Author: averta
17
  * Author URI: http://averta.net
18
  * Text Domain: auxin-elements
@@ -68,7 +68,7 @@ if( is_admin() || false === get_transient( 'auxels_plugin_requirements_check' )
68
  'themes' => array(
69
  array(
70
  'name' => __('Phlox', 'auxin-elements'), // The theme name.
71
- 'version' => '1.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
  )
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.14
16
  * Author: averta
17
  * Author URI: http://averta.net
18
  * Text Domain: auxin-elements
68
  'themes' => array(
69
  array(
70
  'name' => __('Phlox', 'auxin-elements'), // The theme name.
71
+ 'version' => '1.6.18', // E.g. 1.0.0. If set, the active theme must be this version or higher.
72
  'is_callable' => '', // If set, this callable will be be checked for availability to determine if a theme is active.
73
  'file_exists' => get_template_directory() . '/auxin/auxin-include/auxin.php' // If set, this file will be checked for availability to determine if a theme is active.
74
  )
includes/classes/class-auxels-import-parser.php CHANGED
@@ -19,7 +19,7 @@ class Auxels_Import_Parser {
19
  // If SimpleXML succeeds or this is an invalid WXR file then return the results
20
  if ( ! is_wp_error( $result ) || 'SimpleXML_parse_error' != $result->get_error_code() )
21
  return $result;
22
- } else if ( extension_loaded( 'xml' ) ) {
23
  $parser = new AUXELS_WXR_Parser_XML;
24
  $result = $parser->parse( $file );
25
 
@@ -34,7 +34,7 @@ class Auxels_Import_Parser {
34
  if ( 'SimpleXML_parse_error' == $result->get_error_code() ) {
35
  foreach ( $result->get_error_data() as $error )
36
  echo $error->line . ':' . $error->column . ' ' . esc_html( $error->message ) . "\n";
37
- } else if ( 'XML_parse_error' == $result->get_error_code() ) {
38
  $error = $result->get_error_data();
39
  echo $error[0] . ':' . $error[1] . ' ' . esc_html( $error[2] );
40
  }
19
  // If SimpleXML succeeds or this is an invalid WXR file then return the results
20
  if ( ! is_wp_error( $result ) || 'SimpleXML_parse_error' != $result->get_error_code() )
21
  return $result;
22
+ } elseif ( extension_loaded( 'xml' ) ) {
23
  $parser = new AUXELS_WXR_Parser_XML;
24
  $result = $parser->parse( $file );
25
 
34
  if ( 'SimpleXML_parse_error' == $result->get_error_code() ) {
35
  foreach ( $result->get_error_data() as $error )
36
  echo $error->line . ':' . $error->column . ' ' . esc_html( $error->message ) . "\n";
37
+ } elseif ( 'XML_parse_error' == $result->get_error_code() ) {
38
  $error = $result->get_error_data();
39
  echo $error[0] . ':' . $error[1] . ' ' . esc_html( $error[2] );
40
  }
includes/classes/class-auxin-dependency-sorting.php ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Dependency sorting/resolution algorithm for PHP
5
+ *
6
+ */
7
+ class Auxin_Dependency_Sorting {
8
+
9
+ /**
10
+ * The sorted list of dependency graph items
11
+ *
12
+ * @var array
13
+ */
14
+ public $sorted = array();
15
+
16
+ /**
17
+ * Stores the list of checked nodes in dependency graph
18
+ *
19
+ * @var array
20
+ */
21
+ protected $checked = array();
22
+
23
+ /**
24
+ * Stores the input dependency graph
25
+ *
26
+ * @var array
27
+ */
28
+ protected $graph = array();
29
+
30
+
31
+ function __construct(){}
32
+
33
+ /**
34
+ * Check and sort dependencies for each node
35
+ *
36
+ * @param string $name The node name
37
+ * @param array $ancestors The nodes that are already collected
38
+ * @return void
39
+ */
40
+ private function node_check( $name, $ancestors = array() ){
41
+ $ancestors = (array) $ancestors;
42
+
43
+ $ancestors[] = $name;
44
+ $this->checked[ $name ] = true;
45
+
46
+ // sometimes a dependency is not in main nodes list
47
+ if( isset( $this->graph[ $name ] ) ){
48
+
49
+ foreach ( $this->graph[ $name ] as $dependency ) {
50
+ if( in_array( $dependency, $ancestors) ){
51
+ throw new Exception( "Circular dependency for following node detected: " . $name );
52
+ }
53
+ if( isset( $this->checked[ $dependency ] ) ){
54
+ continue;
55
+ }
56
+ $this->node_check( $dependency, $ancestors );
57
+ }
58
+
59
+ }
60
+
61
+ if( ! in_array( $name, $this->sorted ) ){
62
+ $this->sorted[] = $name;
63
+ }
64
+ }
65
+
66
+ /**
67
+ * Sorts and retrieves the list of sorted items based on defined dependencies
68
+ *
69
+ * @param array $graph The list of items and their dependencies
70
+ * @return array The sorted list of items based on defined dependencies
71
+ */
72
+ public function resolve( $graph ) {
73
+ $this->graph = $graph;
74
+
75
+ foreach ( $this->graph as $main_node => $ancestors) {
76
+ $this->node_check( $main_node );
77
+ }
78
+
79
+ return $this->sorted;
80
+ }
81
+
82
+ }
83
+
includes/classes/class-auxin-plugin-requirements.php CHANGED
@@ -32,6 +32,11 @@ if( ! class_exists( 'Auxin_Plugin_Requirements' ) ){
32
 
33
 
34
  function __construct(){
 
 
 
 
 
35
 
36
  if( is_admin() ){
37
  add_action( 'admin_notices' , array( $this, 'admin_notices' ) );
@@ -74,7 +79,7 @@ if( ! class_exists( 'Auxin_Plugin_Requirements' ) ){
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
  }
@@ -135,33 +140,53 @@ if( ! class_exists( 'Auxin_Plugin_Requirements' ) ){
135
 
136
  if( $plugin_requirements = $this->requirements['plugins'] ){
137
 
138
- // Walk through the plugins
 
 
 
 
 
 
 
 
 
139
  foreach ( $plugin_requirements as $plugin_requirement ) {
140
 
141
  // Make sure if the plugin is expected to be loaded prior to our main plugin
142
  if( ! empty( $plugin_requirement['dependency'] ) && true == $plugin_requirement['dependency'] && $this->is_plugin_active( $plugin_requirement['basename'] ) ){
143
- // Get all activated plugins
144
- $active_plugins = get_option( 'active_plugins' );
145
-
146
- // Get the load orders
147
- $this_plugin_load_order = array_search( $this->requirements['config']['plugin_basename'], $active_plugins );
148
- $dependency_plugin_load_order = array_search( $plugin_requirement['basename'], $active_plugins );
149
-
150
- // Replace the orders and update the order list
151
- if( $dependency_plugin_load_order > $this_plugin_load_order ){
152
- $sliced_basename = array_splice( $active_plugins, $this_plugin_load_order , 1 );
153
- array_splice( $active_plugins, $dependency_plugin_load_order , 0, $sliced_basename );
154
- update_option( 'active_plugins', $active_plugins );
155
- }
156
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
157
  }
158
 
 
159
  }
160
 
161
  }
162
 
163
  }
164
 
 
165
  /**
166
  * Check plugin requirements
167
  *
32
 
33
 
34
  function __construct(){
35
+ global $auxin_plugins_dependency_map;
36
+
37
+ if( empty( $auxin_plugins_dependency_map ) ){
38
+ $auxin_plugins_dependency_map = array();
39
+ }
40
 
41
  if( is_admin() ){
42
  add_action( 'admin_notices' , array( $this, 'admin_notices' ) );
79
 
80
  if( $this->requirements['config']['debug'] ){
81
  $active_plugins = get_option( 'active_plugins' );
82
+ $the_notice .= "<pre>"; $the_notice .= print_r( $active_plugins, true ); $the_notice .= "</pre>";
83
  }
84
  return $the_notice;
85
  }
140
 
141
  if( $plugin_requirements = $this->requirements['plugins'] ){
142
 
143
+ global $auxin_plugins_dependency_map;
144
+
145
+ if( ! class_exists( 'Auxin_Dependency_Sorting' ) ){
146
+ require_once( 'class-auxin-dependency-sorting.php' );
147
+ }
148
+
149
+ // Whether new dependency to dependency graph added or not
150
+ $has_new_dependency = false;
151
+
152
+ // Walk through the plugins and collect the dependencies
153
  foreach ( $plugin_requirements as $plugin_requirement ) {
154
 
155
  // Make sure if the plugin is expected to be loaded prior to our main plugin
156
  if( ! empty( $plugin_requirement['dependency'] ) && true == $plugin_requirement['dependency'] && $this->is_plugin_active( $plugin_requirement['basename'] ) ){
157
+ // Add current plugin dependencies to main plugins dependency graph
158
+ $auxin_plugins_dependency_map[ $this->requirements['config']['plugin_basename'] ][] = $plugin_requirement['basename'];
159
+ // If at least one plugin with required dependency detected
160
+ $has_new_dependency = true;
161
+ }
 
 
 
 
 
 
 
 
162
 
163
+ }
164
+
165
+ if( $has_new_dependency ){
166
+
167
+ // Sort the plugins based on the dependencies
168
+ $dependency_resolver = new Auxin_Dependency_Sorting();
169
+ $resolved_plugins_load_order = $dependency_resolver->resolve( $auxin_plugins_dependency_map );
170
+
171
+ // Get all activated plugins
172
+ $active_plugins = get_option( 'active_plugins' );
173
+
174
+ // Change the plugins load order
175
+ foreach ( $resolved_plugins_load_order as $plugin_basename ) {
176
+ if( ( $key = array_search( $plugin_basename, $active_plugins ) ) !== false ) {
177
+ unset( $active_plugins[ $key ] );
178
+ }
179
+ $active_plugins[] = $plugin_basename;
180
  }
181
 
182
+ update_option( 'active_plugins', $active_plugins );
183
  }
184
 
185
  }
186
 
187
  }
188
 
189
+
190
  /**
191
  * Check plugin requirements
192
  *
includes/classes/class-auxin-siteorigin-widget.php CHANGED
@@ -55,13 +55,6 @@ class Auxin_SiteOrigin_Widget extends SiteOrigin_Widget {
55
 
56
  //The $form_options array, which describes the form fields used to configure SiteOrigin widgets. We'll explain these in more detail later.
57
  false,
58
- // array(
59
- // 'text' => array(
60
- // 'type' => 'text',
61
- // 'label' => __('Hello world! goes here.', 'siteorigin-widgets'),
62
- // 'default' => 'Hello world!'
63
- // ),
64
- // ),
65
 
66
  //The $base_folder path string.
67
  plugin_dir_path(__FILE__)
@@ -184,6 +177,7 @@ class Auxin_SiteOrigin_Widget extends SiteOrigin_Widget {
184
  }
185
 
186
  $so_fields[ $repeater_name ]['fields'][ $field['param_name'] ] = $so_field;
 
187
  } elseif ( ! empty( $field['group'] ) ) {
188
  $section_name = $this->sanitize_field_name( $field['group'] );
189
 
55
 
56
  //The $form_options array, which describes the form fields used to configure SiteOrigin widgets. We'll explain these in more detail later.
57
  false,
 
 
 
 
 
 
 
58
 
59
  //The $base_folder path string.
60
  plugin_dir_path(__FILE__)
177
  }
178
 
179
  $so_fields[ $repeater_name ]['fields'][ $field['param_name'] ] = $so_field;
180
+
181
  } elseif ( ! empty( $field['group'] ) ) {
182
  $section_name = $this->sanitize_field_name( $field['group'] );
183
 
includes/classes/class-auxin-widget-shortcode-map.php CHANGED
@@ -130,7 +130,7 @@ class Auxin_Widget_Shortcode_Map {
130
  foreach( $array as $key => $node ) {
131
  if( is_array( $node ) ){
132
  $cleared_array[ $key ] = $this->remove_empty_nodes_recuresively( $node );
133
- } else if ( ! empty( $node ) || $node === false ){
134
  $cleared_array[ $key ] = $array[ $key ];
135
  }
136
  }
130
  foreach( $array as $key => $node ) {
131
  if( is_array( $node ) ){
132
  $cleared_array[ $key ] = $this->remove_empty_nodes_recuresively( $node );
133
+ } elseif ( ! empty( $node ) || $node === false ){
134
  $cleared_array[ $key ] = $array[ $key ];
135
  }
136
  }
includes/classes/class-auxin-widget.php CHANGED
@@ -477,9 +477,6 @@ class Auxin_Widget extends WP_Widget {
477
  json_encode( $this->dependency_list ),
478
  $this->defaults[ '__uid' ]
479
  );
480
- ?>
481
-
482
- <?php
483
  }
484
 
485
 
477
  json_encode( $this->dependency_list ),
478
  $this->defaults[ '__uid' ]
479
  );
 
 
 
480
  }
481
 
482
 
includes/define.php CHANGED
@@ -12,7 +12,7 @@ if( ! defined( 'THEME_NAME' ) ){
12
  }
13
 
14
 
15
- define( 'AUXELS_VERSION' , '1.3.10' );
16
 
17
  define( 'AUXELS_SLUG' , 'auxin-elements' );
18
 
12
  }
13
 
14
 
15
+ define( 'AUXELS_VERSION' , '1.3.14' );
16
 
17
  define( 'AUXELS_SLUG' , 'auxin-elements' );
18
 
includes/elements/audio.php CHANGED
@@ -102,11 +102,11 @@ function auxin_get_audio_master_array( $master_array ) {
102
  'choices' => array(
103
  'dark' => array(
104
  'label' => __('Dark', 'auxin-elements'),
105
- 'image' => AUX_URL . 'images/visual-select/audio-player-dark.svg'
106
  ),
107
  'light' => array(
108
  'label' => __('Light', 'auxin-elements'),
109
- 'image' => AUX_URL . 'images/visual-select/audio-player-light.svg'
110
  )
111
  ),
112
  'holder' => '',
102
  'choices' => array(
103
  'dark' => array(
104
  'label' => __('Dark', 'auxin-elements'),
105
+ 'image' => AUXIN_URL . 'images/visual-select/audio-player-dark.svg'
106
  ),
107
  'light' => array(
108
  'label' => __('Light', 'auxin-elements'),
109
+ 'image' => AUXIN_URL . 'images/visual-select/audio-player-light.svg'
110
  )
111
  ),
112
  'holder' => '',
includes/elements/button.php CHANGED
@@ -89,15 +89,15 @@ function auxin_get_button_master_array( $master_array ) {
89
  'choices' => array(
90
  '' => array(
91
  'label' => __('Box', 'auxin-elements' ),
92
- 'image' => AUX_URL . 'images/visual-select/button-normal.svg'
93
  ),
94
  'round' => array(
95
  'label' => __('Round', 'auxin-elements' ),
96
- 'image' => AUX_URL . 'images/visual-select/button-curved.svg'
97
  ),
98
  'curve' => array(
99
  'label' => __('Curve', 'auxin-elements' ),
100
- 'image' => AUX_URL . 'images/visual-select/button-rounded.svg'
101
  )
102
  )
103
  ),
@@ -116,15 +116,15 @@ function auxin_get_button_master_array( $master_array ) {
116
  'choices' => array(
117
  '' => array(
118
  'label' => __('Normal', 'auxin-elements' ),
119
- 'image' => AUX_URL . 'images/visual-select/button-normal.svg'
120
  ),
121
  '3d' => array(
122
  'label' => __('3D', 'auxin-elements' ),
123
- 'image' => AUX_URL . 'images/visual-select/button-3d.svg'
124
  ),
125
  'outline' => array(
126
  'label' => __('Outline', 'auxin-elements' ),
127
- 'image' => AUX_URL . 'images/visual-select/button-outline.svg'
128
  )
129
  )
130
  ),
89
  'choices' => array(
90
  '' => array(
91
  'label' => __('Box', 'auxin-elements' ),
92
+ 'image' => AUXIN_URL . 'images/visual-select/button-normal.svg'
93
  ),
94
  'round' => array(
95
  'label' => __('Round', 'auxin-elements' ),
96
+ 'image' => AUXIN_URL . 'images/visual-select/button-curved.svg'
97
  ),
98
  'curve' => array(
99
  'label' => __('Curve', 'auxin-elements' ),
100
+ 'image' => AUXIN_URL . 'images/visual-select/button-rounded.svg'
101
  )
102
  )
103
  ),
116
  'choices' => array(
117
  '' => array(
118
  'label' => __('Normal', 'auxin-elements' ),
119
+ 'image' => AUXIN_URL . 'images/visual-select/button-normal.svg'
120
  ),
121
  '3d' => array(
122
  'label' => __('3D', 'auxin-elements' ),
123
+ 'image' => AUXIN_URL . 'images/visual-select/button-3d.svg'
124
  ),
125
  'outline' => array(
126
  'label' => __('Outline', 'auxin-elements' ),
127
+ 'image' => AUXIN_URL . 'images/visual-select/button-outline.svg'
128
  )
129
  )
130
  ),
includes/elements/contact-box.php CHANGED
@@ -119,6 +119,27 @@ function get_auxin_contact_box( $master_array ) {
119
  'group' => '' ,
120
  'edit_field_class' => ''
121
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
122
  array(
123
  'heading' => __('Map height','auxin-elements'),
124
  'description' => __('Height of the map in pixels.', 'auxin-elements'),
@@ -323,6 +344,7 @@ function auxin_widget_contact_box( $atts, $shortcode_content = null ){
323
  'title' => '', // header title
324
  'style' => '',
325
  'show_map' => '1',
 
326
  'show_socials' => '1',
327
  'email' => '',
328
  'telephone' => '',
@@ -349,12 +371,30 @@ function auxin_widget_contact_box( $atts, $shortcode_content = null ){
349
  // widget header ------------------------------
350
  echo $result['widget_header'];
351
  echo $result['widget_title'];
352
- ?>
353
- <!--- The output for element here -->
354
- <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
355
 
356
  if( auxin_is_true( $show_map ) ) {
357
- $mapid = uniqid("axi_map");
358
  $marker_title = '';
359
 
360
  if ( empty( $style ) ) {
@@ -365,9 +405,8 @@ function auxin_widget_contact_box( $atts, $shortcode_content = null ){
365
  $style = rawurldecode( base64_decode( strip_tags( $style ) ) );
366
  }
367
 
368
- ?>
369
-
370
- <div id="<?php echo $mapid; ?>" class="aux_map_wrapper <?php echo $extra_classes; ?>" style="height:<?php echo $height; ?>px" ></div>
371
 
372
  <script>
373
  jQuery( function($) {
@@ -376,21 +415,22 @@ function auxin_widget_contact_box( $atts, $shortcode_content = null ){
376
  return;
377
  }
378
  var map = new GMaps({
379
- el: "#<?php echo $mapid; ?>",
380
- lat: <?php echo $latitude; ?>,
381
- lng: <?php echo $longitude; ?>,
382
- zoom: <?php echo $zoom; ?>,
383
- scrollwheel: <?php echo $zoom_wheel; ?>,
384
- <?php if($type == "SATELLITE"){ ?>
385
  mapTypeId: google.maps.MapTypeId.SATELLITE,
386
- <?php } else { ?> mapTypeId: google.maps.MapTypeId.ROADMAP,
 
387
  <?php } if ( $show_mapcontrols == false ) { ?>
388
  disableDefaultUI: true,
389
  <?php } ?>
390
  panControl : true
391
  });
392
 
393
- <?php if($type == "ROADMAP"){ ?>
394
  map.addStyle({
395
  styledMapName:"Auxin custom style map",
396
  styles: <?php echo $style; ?>,
@@ -401,33 +441,21 @@ function auxin_widget_contact_box( $atts, $shortcode_content = null ){
401
  <?php } ?>
402
  map.addMarker({
403
  <?php if ( ! empty( $marker_info ) ) { ?>
404
- infoWindow: { content: "<?php echo $marker_info; ?>" },
405
  <?php } ?>
406
- lat: <?php echo $latitude; ?>,
407
- lng: <?php echo $longitude; ?>
408
  });
409
  });
410
 
411
  </script>
412
- <?php } ?>
413
-
414
- <ul>
415
- <?php if( ! empty( $telephone ) ){ ?>
416
- <li class="phone"><i class="auxicon-phone-classic-on"></i><span class="info-text"><?php echo $telephone; ?></span></li>
417
- <?php } if( ! empty( $email ) ){ ?>
418
- <li class="email"><i class="auxicon-mail-3"></i><span class="info-text"><?php echo $email; ?></span></li>
419
- <?php } if( ! empty( $address ) ){ ?>
420
- <li class="address"><i class="auxicon-map-pin-streamline"></i><span class="info-text"><?php echo $address; ?></span></li>
421
- <?php } ?>
422
- </ul>
423
 
424
- <?php
425
- if( $show_socials ) {
426
- echo auxin_the_socials();
427
- }
428
- ?>
429
 
430
- <?php
431
  // widget footer ------------------------------
432
  echo $result['widget_footer'];
433
 
119
  'group' => '' ,
120
  'edit_field_class' => ''
121
  ),
122
+ array(
123
+ 'heading' => __('Map position','auxin-elements'),
124
+ 'description' => __('Whether to show map above the contact details or below them.', 'auxin-elements'),
125
+ 'param_name' => 'map_position',
126
+ 'type' => 'dropdown',
127
+ 'value' => array(
128
+ 'down' => __('Below the contact details.', 'auxin-elements' ),
129
+ 'up' => __('Above the contact details.', 'auxin-elements' )
130
+ ),
131
+ 'def_value' => 'down',
132
+ 'holder' => '',
133
+ 'class' => 'map_position',
134
+ 'admin_label' => false,
135
+ 'dependency' => array(
136
+ 'element' => 'show_map',
137
+ 'value' => '1'
138
+ ),
139
+ 'weight' => '',
140
+ 'group' => 'Map Options',
141
+ 'edit_field_class' => ''
142
+ ),
143
  array(
144
  'heading' => __('Map height','auxin-elements'),
145
  'description' => __('Height of the map in pixels.', 'auxin-elements'),
344
  'title' => '', // header title
345
  'style' => '',
346
  'show_map' => '1',
347
+ 'map_position' => 'down',
348
  'show_socials' => '1',
349
  'email' => '',
350
  'telephone' => '',
371
  // widget header ------------------------------
372
  echo $result['widget_header'];
373
  echo $result['widget_title'];
374
+
375
+ $contact_info = '<div class="aux-contact-details"><ul>';
376
+ if( ! empty( $telephone ) ){
377
+ $contact_info .= '<li class="phone"><i class="auxicon-phone-classic-on"></i><span class="info-text">'. esc_html( $telephone ) .'</span></li>';
378
+ }
379
+ if( ! empty( $email ) ){
380
+ $contact_info .= '<li class="email"><i class="auxicon-mail-3"></i><span class="info-text">'. antispambot( $email ) .'</span></li>';
381
+ }
382
+ if( ! empty( $address ) ){
383
+ $contact_info .= '<li class="address"><i class="auxicon-map-pin-streamline"></i><span class="info-text">'. esc_html( $address ) .'</span></li>';
384
+ }
385
+ $contact_info .= '</ul>';
386
+ if( $show_socials ) {
387
+ $contact_info .= auxin_get_the_socials();
388
+ }
389
+ $contact_info .= '</div>';
390
+
391
+ // Print the contact info above the map if the position option is set to 'up'
392
+ if( 'down' !== $map_position ){
393
+ echo $contact_info;
394
+ }
395
 
396
  if( auxin_is_true( $show_map ) ) {
397
+ $mapid = uniqid("aux-map");
398
  $marker_title = '';
399
 
400
  if ( empty( $style ) ) {
405
  $style = rawurldecode( base64_decode( strip_tags( $style ) ) );
406
  }
407
 
408
+ ?>
409
+ <div id="<?php echo esc_attr( $mapid ); ?>" class="aux-map-wrapper <?php echo esc_attr( $extra_classes ); ?>" style="height:<?php echo esc_attr( $height ); ?>px" ></div>
 
410
 
411
  <script>
412
  jQuery( function($) {
415
  return;
416
  }
417
  var map = new GMaps({
418
+ el: "#<?php echo esc_attr( $mapid ); ?>",
419
+ lat: <?php echo esc_attr( $latitude ); ?>,
420
+ lng: <?php echo esc_attr( $longitude ); ?>,
421
+ zoom: <?php echo esc_attr( $zoom ); ?>,
422
+ scrollwheel: <?php echo esc_attr( $zoom_wheel ); ?>,
423
+ <?php if( $type == "SATELLITE" ){ ?>
424
  mapTypeId: google.maps.MapTypeId.SATELLITE,
425
+ <?php } else { ?>
426
+ mapTypeId: google.maps.MapTypeId.ROADMAP,
427
  <?php } if ( $show_mapcontrols == false ) { ?>
428
  disableDefaultUI: true,
429
  <?php } ?>
430
  panControl : true
431
  });
432
 
433
+ <?php if( $type == "ROADMAP" ){ ?>
434
  map.addStyle({
435
  styledMapName:"Auxin custom style map",
436
  styles: <?php echo $style; ?>,
441
  <?php } ?>
442
  map.addMarker({
443
  <?php if ( ! empty( $marker_info ) ) { ?>
444
+ infoWindow: { content: "<?php echo esc_html( $marker_info ); ?>" },
445
  <?php } ?>
446
+ lat: <?php echo esc_attr( $latitude ); ?>,
447
+ lng: <?php echo esc_attr( $longitude ); ?>
448
  });
449
  });
450
 
451
  </script>
452
+ <?php
453
+ }
 
 
 
 
 
 
 
 
 
454
 
455
+ if( 'down' === $map_position ){
456
+ echo $contact_info;
457
+ }
 
 
458
 
 
459
  // widget footer ------------------------------
460
  echo $result['widget_footer'];
461
 
includes/elements/contact-form.php CHANGED
@@ -161,7 +161,7 @@ function auxin_widget_contact_form_callback( $atts, $shortcode_content = null ){
161
  if( trim($_POST['cEmail']) === '' ) {
162
  $emailError = __('Please enter your email address.', 'auxin-elements' );
163
  $hasError = true;
164
- } else if (!preg_match("/^[[:alnum:]][a-z0-9_.-]*@[a-z0-9.-]+\.[a-z]{2,4}$/i", trim($_POST['cEmail']))) {
165
  $emailError = __('You entered an invalid email address.', 'auxin-elements' );
166
  $hasError = true;
167
  } else {
161
  if( trim($_POST['cEmail']) === '' ) {
162
  $emailError = __('Please enter your email address.', 'auxin-elements' );
163
  $hasError = true;
164
+ } elseif (!preg_match("/^[[:alnum:]][a-z0-9_.-]*@[a-z0-9.-]+\.[a-z]{2,4}$/i", trim($_POST['cEmail']))) {
165
  $emailError = __('You entered an invalid email address.', 'auxin-elements' );
166
  $hasError = true;
167
  } else {
includes/elements/divider.php CHANGED
@@ -55,23 +55,23 @@ function auxin_get_divider_master_array( $master_array ) {
55
  'choices' => array(
56
  'white-space' => array(
57
  'label' => __('White Space', 'auxin-elements'),
58
- 'image' => AUX_URL . 'images/visual-select/divider-white-space.svg'
59
  ),
60
  'solid' => array(
61
  'label' => __('Solid', 'auxin-elements'),
62
- 'image' => AUX_URL . 'images/visual-select/divider-solid.svg'
63
  ),
64
  'dashed' => array(
65
  'label' => __('Dashed', 'auxin-elements'),
66
- 'image' => AUX_URL . 'images/visual-select/divider-dashed.svg'
67
  ),
68
  'circle-symbol' => array(
69
  'label' => __('Circle', 'auxin-elements'),
70
- 'image' => AUX_URL . 'images/visual-select/divider-circle.svg'
71
  ),
72
  'diamond-symbol' => array(
73
  'label' => __('Diamond', 'auxin-elements'),
74
- 'image' => AUX_URL . 'images/visual-select/divider-diamond.svg'
75
  )
76
  )
77
  ),
55
  'choices' => array(
56
  'white-space' => array(
57
  'label' => __('White Space', 'auxin-elements'),
58
+ 'image' => AUXIN_URL . 'images/visual-select/divider-white-space.svg'
59
  ),
60
  'solid' => array(
61
  'label' => __('Solid', 'auxin-elements'),
62
+ 'image' => AUXIN_URL . 'images/visual-select/divider-solid.svg'
63
  ),
64
  'dashed' => array(
65
  'label' => __('Dashed', 'auxin-elements'),
66
+ 'image' => AUXIN_URL . 'images/visual-select/divider-dashed.svg'
67
  ),
68
  'circle-symbol' => array(
69
  'label' => __('Circle', 'auxin-elements'),
70
+ 'image' => AUXIN_URL . 'images/visual-select/divider-circle.svg'
71
  ),
72
  'diamond-symbol' => array(
73
  'label' => __('Diamond', 'auxin-elements'),
74
+ 'image' => AUXIN_URL . 'images/visual-select/divider-diamond.svg'
75
  )
76
  )
77
  ),
includes/elements/dropcap.php CHANGED
@@ -54,27 +54,27 @@ function auxin_get_dropcap_master_array( $master_array ) {
54
  'choices' => array(
55
  'classic' => array(
56
  'label' => __('Classic', 'auxin-elements' ),
57
- 'image' => AUX_URL . 'images/visual-select/dropcap-classic.svg'
58
  ),
59
  'square' => array(
60
  'label' => __('Square', 'auxin-elements' ),
61
- 'image' => AUX_URL . 'images/visual-select/dropcap-square.svg'
62
  ),
63
  'square-outline' => array(
64
  'label' => __('Outline Square', 'auxin-elements' ),
65
- 'image' => AUX_URL . 'images/visual-select/dropcap-square-outline.svg'
66
  ),
67
  'square-round' => array(
68
  'label' => __('Round Square', 'auxin-elements' ),
69
- 'image' => AUX_URL . 'images/visual-select/dropcap-square-round.svg'
70
  ),
71
  'circle' => array(
72
  'label' => __('Circle', 'auxin-elements' ),
73
- 'image' => AUX_URL . 'images/visual-select/dropcap-circle.svg'
74
  ),
75
  'circle-outline' => array(
76
  'label' => __('Outline Circle', 'auxin-elements' ),
77
- 'image' => AUX_URL . 'images/visual-select/dropcap-circle-outline.svg'
78
  )
79
  )
80
  ),
54
  'choices' => array(
55
  'classic' => array(
56
  'label' => __('Classic', 'auxin-elements' ),
57
+ 'image' => AUXIN_URL . 'images/visual-select/dropcap-classic.svg'
58
  ),
59
  'square' => array(
60
  'label' => __('Square', 'auxin-elements' ),
61
+ 'image' => AUXIN_URL . 'images/visual-select/dropcap-square.svg'
62
  ),
63
  'square-outline' => array(
64
  'label' => __('Outline Square', 'auxin-elements' ),
65
+ 'image' => AUXIN_URL . 'images/visual-select/dropcap-square-outline.svg'
66
  ),
67
  'square-round' => array(
68
  'label' => __('Round Square', 'auxin-elements' ),
69
+ 'image' => AUXIN_URL . 'images/visual-select/dropcap-square-round.svg'
70
  ),
71
  'circle' => array(
72
  'label' => __('Circle', 'auxin-elements' ),
73
+ 'image' => AUXIN_URL . 'images/visual-select/dropcap-circle.svg'
74
  ),
75
  'circle-outline' => array(
76
  'label' => __('Outline Circle', 'auxin-elements' ),
77
+ 'image' => AUXIN_URL . 'images/visual-select/dropcap-circle-outline.svg'
78
  )
79
  )
80
  ),
includes/elements/gallery.php CHANGED
@@ -76,19 +76,19 @@ function auxin_get_gallery_master_array( $master_array ) {
76
  'choices' => array(
77
  'grid' => array(
78
  'label' => __('Grid', 'auxin-elements'),
79
- 'image' => AUX_URL . 'images/visual-select/gallery-grid.svg'
80
  ),
81
  'masonry' => array(
82
  'label' => __('Masonry', 'auxin-elements'),
83
- 'image' => AUX_URL . 'images/visual-select/gallery-masonry.svg'
84
  ),
85
  'tiles' => array(
86
  'label' => __('Tiles', 'auxin-elements'),
87
- 'image' => AUX_URL . 'images/visual-select/gallery-tile.svg'
88
  ),
89
  // 'justify-rows' => array(
90
  // 'label' => __('Justify rows', 'auxin-elements'),
91
- // 'image' => AUX_URL . 'images/visual-select/divider-diamond.svg'
92
  // )
93
  ),
94
  'holder' => '',
@@ -455,11 +455,11 @@ function auxin_widget_gallery_callback( $attr, $shortcode_content = null ){
455
  echo "<div id='$selector' class='aux-gallery galleryid-{$id} gallery-columns-{$columns} " . ( $add_lightbox ? 'aux-lightbox-gallery' : '' ) . "'>";
456
 
457
  // isotope attributes
458
- $isotope_attrs = ' data-pagination="' . $pagination . '"'.
459
  ' data-lazyload="' . ( $lazyload ? 'true' : 'false' ) . '"'.
460
- ' data-perpage="' . $perpage . '"'.
461
- ' data-layout="' . $isotop_layout . '"'.
462
- ' data-space="' . $space . '"';
463
 
464
  if ( 'tiles' == $layout ) {
465
  $column_class = 'aux-tiles-layout';
@@ -479,7 +479,7 @@ function auxin_widget_gallery_callback( $attr, $shortcode_content = null ){
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
 
485
  if ( $lazyload ) {
@@ -500,8 +500,8 @@ function auxin_widget_gallery_callback( $attr, $shortcode_content = null ){
500
  }
501
 
502
  if ( $add_lightbox ) {
503
- $lightbox_attrs = 'data-original-width="' . $attachment_meta['width'] . '" data-original-height="' . $attachment_meta['height'] . '" ' .
504
- 'data-caption="' . esc_attr( auxin_attachment_caption( $id ) ) . '"';
505
  }
506
 
507
  if ( 'tiles' == $layout ) {
@@ -555,7 +555,7 @@ function auxin_widget_gallery_callback( $attr, $shortcode_content = null ){
555
  }
556
 
557
  if ( 'tiles' == $layout ) {
558
- $item_classes .= ' aux-image-box '. $item_pattern_info['classname'];
559
  }
560
 
561
  include( locate_template( 'templates/theme-parts/entry/gallery-image.php' ) );
76
  'choices' => array(
77
  'grid' => array(
78
  'label' => __('Grid', 'auxin-elements'),
79
+ 'image' => AUXIN_URL . 'images/visual-select/gallery-grid.svg'
80
  ),
81
  'masonry' => array(
82
  'label' => __('Masonry', 'auxin-elements'),
83
+ 'image' => AUXIN_URL . 'images/visual-select/gallery-masonry.svg'
84
  ),
85
  'tiles' => array(
86
  'label' => __('Tiles', 'auxin-elements'),
87
+ 'image' => AUXIN_URL . 'images/visual-select/gallery-tile.svg'
88
  ),
89
  // 'justify-rows' => array(
90
  // 'label' => __('Justify rows', 'auxin-elements'),
91
+ // 'image' => AUXIN_URL . 'images/visual-select/divider-diamond.svg'
92
  // )
93
  ),
94
  'holder' => '',
455
  echo "<div id='$selector' class='aux-gallery galleryid-{$id} gallery-columns-{$columns} " . ( $add_lightbox ? 'aux-lightbox-gallery' : '' ) . "'>";
456
 
457
  // isotope attributes
458
+ $isotope_attrs = ' data-pagination="' . esc_attr( $pagination ) . '"'.
459
  ' data-lazyload="' . ( $lazyload ? 'true' : 'false' ) . '"'.
460
+ ' data-perpage="' . esc_attr( $perpage) . '"'.
461
+ ' data-layout="' . esc_attr( $isotop_layout ) . '"'.
462
+ ' data-space="' . esc_attr( $space ) . '"';
463
 
464
  if ( 'tiles' == $layout ) {
465
  $column_class = 'aux-tiles-layout';
479
 
480
  $column_media_width = round( $column_media_width );
481
 
482
+ printf( '<div class="aux-gallery-container aux-isotope-animated %s aux-no-gutter aux-layout-%s" %s >', esc_attr( $column_class ), esc_attr( $isotop_layout ), $isotope_attrs );
483
 
484
 
485
  if ( $lazyload ) {
500
  }
501
 
502
  if ( $add_lightbox ) {
503
+ $lightbox_attrs = 'data-original-width="' . esc_attr( $attachment_meta['width'] ) . '" data-original-height="' . esc_attr( $attachment_meta['height'] ) . '" ' .
504
+ 'data-caption="' . esc_attr( strip_tags( auxin_attachment_caption( $id ) ) ) . '"';
505
  }
506
 
507
  if ( 'tiles' == $layout ) {
555
  }
556
 
557
  if ( 'tiles' == $layout ) {
558
+ $item_classes .= ' aux-image-box '. esc_attr( $item_pattern_info['classname'] );
559
  }
560
 
561
  include( locate_template( 'templates/theme-parts/entry/gallery-image.php' ) );
includes/elements/gmap.php CHANGED
@@ -237,49 +237,45 @@ function auxin_widget_gmaps_callback( $atts, $shortcode_content = null ){
237
  echo $result['widget_header'];
238
  echo $result['widget_title'];
239
 
240
- $mapid = uniqid("axi_map");
241
 
242
  if ( empty( $style ) ) {
243
  $style = auxin_get_gmap_style();
244
  } elseif ( base64_decode( $style, true ) === false) {
245
- } else {
246
  $style = rawurldecode( base64_decode( strip_tags( $style ) ) );
247
  }
248
 
249
  ob_start();
250
  ?>
251
 
252
-
253
  <div class="aux-col-wrapper aux-no-gutter">
254
- <div id="<?php echo $mapid; ?>" class="aux_map_wrapper <?php echo $extra_classes; ?>" style="height:<?php echo $height; ?>px" ></div>
255
 
256
  <script>
257
- (function($, window, document, undefined){
258
- "use strict";
259
-
260
- $(function(){
261
  if(typeof GMaps != "function" || typeof google === "undefined"){
262
  console.info( "Please add google map API key in theme options. https://developers.google.com/maps/documentation/javascript/" );
263
  return;
264
  }
265
  var map = new GMaps({
266
- el: "#<?php echo $mapid; ?>",
267
- lat: <?php echo $latitude; ?>,
268
- lng: <?php echo $longitude; ?>,
269
- zoom: <?php echo $zoom; ?>,
270
- scrollwheel: <?php echo $zoom_wheel; ?>,
271
- <?php if($type == "SATELLITE"){ ?>
272
  mapTypeId: google.maps.MapTypeId.SATELLITE,
273
- <?php } else { ?> mapTypeId: google.maps.MapTypeId.ROADMAP,
274
- <?php }
275
- if ( $show_mapcontrols == false ) { ?>
276
  disableDefaultUI: true,
277
- <?php }?>
278
  panControl : true
279
  });
280
 
281
- <?php if($type == "ROADMAP"){ ?>
282
- map.addStyle({
283
  styledMapName:"Auxin custom style map",
284
  styles: <?php echo $style; ?>,
285
  mapTypeId: "aux_map_style"
@@ -288,17 +284,15 @@ function auxin_widget_gmaps_callback( $atts, $shortcode_content = null ){
288
  map.setStyle("aux_map_style");
289
  <?php } ?>
290
  map.addMarker({
291
- <?php if ( !empty( $marker_info ) ) { ?>
292
- infoWindow: { content: "<?php echo $marker_info; ?>" },
293
- <?php }?>
294
- lat: <?php echo $latitude; ?>,
295
- lng: <?php echo $longitude; ?>
296
  });
297
- });
298
-
299
- })(jQuery, window, document);
300
 
301
- </script>
302
 
303
  </div><!-- aux-col-wrapper -->
304
 
237
  echo $result['widget_header'];
238
  echo $result['widget_title'];
239
 
240
+ $mapid = uniqid("aux-map");
241
 
242
  if ( empty( $style ) ) {
243
  $style = auxin_get_gmap_style();
244
  } elseif ( base64_decode( $style, true ) === false) {
245
+ } else {
246
  $style = rawurldecode( base64_decode( strip_tags( $style ) ) );
247
  }
248
 
249
  ob_start();
250
  ?>
251
 
 
252
  <div class="aux-col-wrapper aux-no-gutter">
253
+ <div id="<?php echo esc_attr( $mapid ); ?>" class="aux-map-wrapper <?php echo esc_attr( $extra_classes ); ?>" style="height:<?php echo esc_attr( $height ); ?>px" ></div>
254
 
255
  <script>
256
+ jQuery( function($) {
 
 
 
257
  if(typeof GMaps != "function" || typeof google === "undefined"){
258
  console.info( "Please add google map API key in theme options. https://developers.google.com/maps/documentation/javascript/" );
259
  return;
260
  }
261
  var map = new GMaps({
262
+ el: "#<?php echo esc_attr( $mapid ); ?>",
263
+ lat: <?php echo esc_attr( $latitude ); ?>,
264
+ lng: <?php echo esc_attr( $longitude ); ?>,
265
+ zoom: <?php echo esc_attr( $zoom ); ?>,
266
+ scrollwheel: <?php echo esc_attr( $zoom_wheel ); ?>,
267
+ <?php if( $type == "SATELLITE" ){ ?>
268
  mapTypeId: google.maps.MapTypeId.SATELLITE,
269
+ <?php } else { ?>
270
+ mapTypeId: google.maps.MapTypeId.ROADMAP,
271
+ <?php } if ( $show_mapcontrols == false ) { ?>
272
  disableDefaultUI: true,
273
+ <?php } ?>
274
  panControl : true
275
  });
276
 
277
+ <?php if( $type == "ROADMAP" ){ ?>
278
+ map.addStyle({
279
  styledMapName:"Auxin custom style map",
280
  styles: <?php echo $style; ?>,
281
  mapTypeId: "aux_map_style"
284
  map.setStyle("aux_map_style");
285
  <?php } ?>
286
  map.addMarker({
287
+ <?php if ( ! empty( $marker_info ) ) { ?>
288
+ infoWindow: { content: "<?php echo esc_html( $marker_info ); ?>" },
289
+ <?php } ?>
290
+ lat: <?php echo esc_attr( $latitude ); ?>,
291
+ lng: <?php echo esc_attr( $longitude ); ?>
292
  });
293
+ });
 
 
294
 
295
+ </script>
296
 
297
  </div><!-- aux-col-wrapper -->
298
 
includes/elements/quote.php CHANGED
@@ -60,35 +60,35 @@ function auxin_get_quote_master_array( $master_array ) {
60
  'choices' => array(
61
  'quote-normal' => array(
62
  'label' => __('Quote Normal', 'auxin-elements'),
63
- 'image' => AUX_URL . 'images/visual-select/blockquote-normal-1.svg'
64
  ),
65
  'blockquote-normal' => array(
66
  'label' => __('Blockquote Normal', 'auxin-elements'),
67
- 'image' => AUX_URL . 'images/visual-select/blockquote-normal.svg'
68
  ),
69
  'blockquote-bordered' => array(
70
  'label' => __('Blockquote Bordered', 'auxin-elements'),
71
- 'image' => AUX_URL . 'images/visual-select/blockquote-bordered.svg'
72
  ),
73
  'intro-normal' => array(
74
  'label' => __('Intro', 'auxin-elements'),
75
- 'image' => AUX_URL . 'images/visual-select/quote-intro-normal.svg'
76
  ),
77
  'intro-hero' => array(
78
  'label' => __('Intro Hero', 'auxin-elements'),
79
- 'image' => AUX_URL . 'images/visual-select/quote-intro-hero.svg'
80
  ),
81
  'intro-splitter' => array(
82
  'label' => __('Intro with Splitter', 'auxin-elements'),
83
- 'image' => AUX_URL . 'images/visual-select/quote-intro-splitter.svg'
84
  ),
85
  'pullquote-normal' => array(
86
  'label' => __('Pullquote Normal', 'auxin-elements'),
87
- 'image' => AUX_URL . 'images/visual-select/pullquote-normal.svg'
88
  ),
89
  'pullquote-colorized' => array(
90
  'label' => __('Pullquote Colorized', 'auxin-elements'),
91
- 'image' => AUX_URL . 'images/visual-select/pullquote-colorized.svg'
92
  )
93
  ),
94
  'holder' => '',
60
  'choices' => array(
61
  'quote-normal' => array(
62
  'label' => __('Quote Normal', 'auxin-elements'),
63
+ 'image' => AUXIN_URL . 'images/visual-select/blockquote-normal-1.svg'
64
  ),
65
  'blockquote-normal' => array(
66
  'label' => __('Blockquote Normal', 'auxin-elements'),
67
+ 'image' => AUXIN_URL . 'images/visual-select/blockquote-normal.svg'
68
  ),
69
  'blockquote-bordered' => array(
70
  'label' => __('Blockquote Bordered', 'auxin-elements'),
71
+ 'image' => AUXIN_URL . 'images/visual-select/blockquote-bordered.svg'
72
  ),
73
  'intro-normal' => array(
74
  'label' => __('Intro', 'auxin-elements'),
75
+ 'image' => AUXIN_URL . 'images/visual-select/quote-intro-normal.svg'
76
  ),
77
  'intro-hero' => array(
78
  'label' => __('Intro Hero', 'auxin-elements'),
79
+ 'image' => AUXIN_URL . 'images/visual-select/quote-intro-hero.svg'
80
  ),
81
  'intro-splitter' => array(
82
  'label' => __('Intro with Splitter', 'auxin-elements'),
83
+ 'image' => AUXIN_URL . 'images/visual-select/quote-intro-splitter.svg'
84
  ),
85
  'pullquote-normal' => array(
86
  'label' => __('Pullquote Normal', 'auxin-elements'),
87
+ 'image' => AUXIN_URL . 'images/visual-select/pullquote-normal.svg'
88
  ),
89
  'pullquote-colorized' => array(
90
  'label' => __('Pullquote Colorized', 'auxin-elements'),
91
+ 'image' => AUXIN_URL . 'images/visual-select/pullquote-colorized.svg'
92
  )
93
  ),
94
  'holder' => '',
includes/elements/recent-posts-grid-carousel.php CHANGED
@@ -712,7 +712,7 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
712
  if( $author_or_readmore == 'readmore') {
713
  $show_readmore = true;
714
  $show_author_footer = false;
715
- } else if( $author_or_readmore == 'author') {
716
  $show_readmore = false;
717
  $show_author_footer = true;
718
  } else {
@@ -741,7 +741,7 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
741
  if( $custom_wp_query ){
742
  $wp_query = $custom_wp_query;
743
 
744
- } else if( ! $use_wp_query ){
745
 
746
  // create wp_query to get latest items ---------------------------------
747
  $args = array(
@@ -900,14 +900,14 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
900
  $columns_custom_styles .= $featured_color ? "\n.$base_class .aux-grid-table-layout > .post-{$post->ID}:hover { background-color:$featured_color; }" : '';
901
 
902
  // if grid table hover effect was only bgimage
903
- } else if( 'bgimage' == $grid_table_hover ){
904
  $columns_custom_styles .= $featured_image ? "\n.$base_class .aux-grid-table-layout > .post-{$post->ID}:hover { background-image:linear-gradient( rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4) ), url( $featured_image ); }" : '';
905
 
906
  // if grid table hover effect was bgimage with bgcolor fallback
907
- } else if( 'bgimage-bgcolor' == $grid_table_hover ){
908
  if( $featured_image ){
909
  $columns_custom_styles .= "\n.$base_class .aux-grid-table-layout > .post-{$post->ID}:hover { background-image:linear-gradient( rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4) ), url( $featured_image ); }" ;
910
- } else if( $featured_color ){
911
  $columns_custom_styles .= "\n.$base_class .aux-grid-table-layout > .post-{$post->ID}:hover { background-color:$featured_color; }";
912
  }
913
  }
@@ -989,7 +989,7 @@ function auxin_widget_recent_posts_grid_ajax_callback(){
989
 
990
  if( empty( $_POST['action'] ) ){
991
  wp_send_json_error( __( 'Action handler not found.', 'auxin-elements' ) );
992
- } else if( ! wp_verify_nonce( $_POST['nonce'], 'post-recent-grid-nonce' ) ){
993
  wp_send_json_error( __( 'Authorization failed.', 'auxin-elements' ) );
994
  }
995
 
712
  if( $author_or_readmore == 'readmore') {
713
  $show_readmore = true;
714
  $show_author_footer = false;
715
+ } elseif( $author_or_readmore == 'author') {
716
  $show_readmore = false;
717
  $show_author_footer = true;
718
  } else {
741
  if( $custom_wp_query ){
742
  $wp_query = $custom_wp_query;
743
 
744
+ } elseif( ! $use_wp_query ){
745
 
746
  // create wp_query to get latest items ---------------------------------
747
  $args = array(
900
  $columns_custom_styles .= $featured_color ? "\n.$base_class .aux-grid-table-layout > .post-{$post->ID}:hover { background-color:$featured_color; }" : '';
901
 
902
  // if grid table hover effect was only bgimage
903
+ } elseif( 'bgimage' == $grid_table_hover ){
904
  $columns_custom_styles .= $featured_image ? "\n.$base_class .aux-grid-table-layout > .post-{$post->ID}:hover { background-image:linear-gradient( rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4) ), url( $featured_image ); }" : '';
905
 
906
  // if grid table hover effect was bgimage with bgcolor fallback
907
+ } elseif( 'bgimage-bgcolor' == $grid_table_hover ){
908
  if( $featured_image ){
909
  $columns_custom_styles .= "\n.$base_class .aux-grid-table-layout > .post-{$post->ID}:hover { background-image:linear-gradient( rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4) ), url( $featured_image ); }" ;
910
+ } elseif( $featured_color ){
911
  $columns_custom_styles .= "\n.$base_class .aux-grid-table-layout > .post-{$post->ID}:hover { background-color:$featured_color; }";
912
  }
913
  }
989
 
990
  if( empty( $_POST['action'] ) ){
991
  wp_send_json_error( __( 'Action handler not found.', 'auxin-elements' ) );
992
+ } elseif( ! wp_verify_nonce( $_POST['nonce'], 'post-recent-grid-nonce' ) ){
993
  wp_send_json_error( __( 'Authorization failed.', 'auxin-elements' ) );
994
  }
995
 
includes/elements/recent-posts-masonry.php CHANGED
@@ -641,7 +641,7 @@ function auxin_widget_recent_posts_masonry_callback( $atts, $shortcode_content =
641
 
642
  // if( empty( $_POST['action'] ) ){
643
  // wp_send_json_error( __( 'Action handler not found.', 'auxin-elements' ) );
644
- // } else if( ! wp_verify_nonce( $_POST['nonce'], 'post-recent-grid-nonce' ) ){
645
  // wp_send_json_error( __( 'Authorization failed.', 'auxin-elements' ) );
646
  // }
647
 
641
 
642
  // if( empty( $_POST['action'] ) ){
643
  // wp_send_json_error( __( 'Action handler not found.', 'auxin-elements' ) );
644
+ // } elseif( ! wp_verify_nonce( $_POST['nonce'], 'post-recent-grid-nonce' ) ){
645
  // wp_send_json_error( __( 'Authorization failed.', 'auxin-elements' ) );
646
  // }
647
 
includes/elements/recent-posts-tiles.php CHANGED
@@ -295,11 +295,11 @@ function auxin_get_recent_posts_tiles_master_array( $master_array ) {
295
  'choices' => array(
296
  '' => array(
297
  'label' => __('Standard', 'auxin-elements' ),
298
- 'image' => AUX_URL . 'images/visual-select/button-normal.svg'
299
  ),
300
  'aux-overlay' => array(
301
  'label' => __('Dark', 'auxin-elements' ),
302
- 'image' => AUX_URL . 'images/visual-select/button-curved.svg'
303
  )
304
  )
305
  ),
295
  'choices' => array(
296
  '' => array(
297
  'label' => __('Standard', 'auxin-elements' ),
298
+ 'image' => AUXIN_URL . 'images/visual-select/button-normal.svg'
299
  ),
300
  'aux-overlay' => array(
301
  'label' => __('Dark', 'auxin-elements' ),
302
+ 'image' => AUXIN_URL . 'images/visual-select/button-curved.svg'
303
  )
304
  )
305
  ),
includes/elements/recent-posts-timeline.php CHANGED
@@ -69,15 +69,15 @@ function auxin_get_recent_posts_timeline_master_array( $master_array ) {
69
  'choices' => array(
70
  'center' => array(
71
  'label' => __('Center', 'auxin-elements'),
72
- 'image' => AUX_URL . 'images/visual-select/blog-layout-8.svg'
73
  ),
74
  'left' => array(
75
  'label' => __('Left', 'auxin-elements'),
76
- 'image' => AUX_URL . 'images/visual-select/blog-layout-8-left.svg'
77
  ),
78
  'right' => array(
79
  'label' => __('Right', 'auxin-elements'),
80
- 'image' => AUX_URL . 'images/visual-select/blog-layout-8-right.svg'
81
  )
82
  ),
83
  'value' => 'center',
69
  'choices' => array(
70
  'center' => array(
71
  'label' => __('Center', 'auxin-elements'),
72
+ 'image' => AUXIN_URL . 'images/visual-select/blog-layout-8.svg'
73
  ),
74
  'left' => array(
75
  'label' => __('Left', 'auxin-elements'),
76
+ 'image' => AUXIN_URL . 'images/visual-select/blog-layout-8-left.svg'
77
  ),
78
  'right' => array(
79
  'label' => __('Right', 'auxin-elements'),
80
+ 'image' => AUXIN_URL . 'images/visual-select/blog-layout-8-right.svg'
81
  )
82
  ),
83
  'value' => 'center',
includes/elements/text.php CHANGED
@@ -55,6 +55,22 @@ function auxin_get_text_master_array( $master_array ) {
55
  'group' => '' ,
56
  'edit_field_class' => ''
57
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
  array(
59
  'heading' => __('Title link','auxin-elements'),
60
  'description' => '',
@@ -130,15 +146,15 @@ function auxin_get_text_master_array( $master_array ) {
130
  'choices' => array(
131
  'simple' => array(
132
  'label' => __('Simple', 'auxin-elements'),
133
- 'image' => AUX_URL . 'images/visual-select/text-normal.svg'
134
  ),
135
  'outline' => array(
136
  'label' => __('Outlined', 'auxin-elements'),
137
- 'image' => AUX_URL . 'images/visual-select/text-outline.svg'
138
  ),
139
  'box' => array(
140
  'label' => __('Boxed', 'auxin-elements'),
141
- 'image' => AUX_URL . 'images/visual-select/text-boxed.svg'
142
  )
143
  ),
144
  'holder' => 'dropdown',
@@ -150,8 +166,8 @@ function auxin_get_text_master_array( $master_array ) {
150
  'edit_field_class' => ''
151
  ),
152
  array(
153
- 'heading' => __('Block background color','auxin-elements'),
154
- 'description' => __('Choose a background color for this block.','auxin-elements'),
155
  'param_name' => 'wrapper_bg_color',
156
  'type' => 'colorpicker',
157
  'def_value' => '',
@@ -164,10 +180,77 @@ function auxin_get_text_master_array( $master_array ) {
164
  'group' => '' ,
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',
@@ -181,7 +264,7 @@ function auxin_get_text_master_array( $master_array ) {
181
  'admin_label' => true,
182
  'dependency' => '',
183
  'weight' => '',
184
- 'group' => 'Icon & Image',
185
  'edit_field_class' => ''
186
  ),
187
  array(
@@ -199,7 +282,7 @@ function auxin_get_text_master_array( $master_array ) {
199
  'value' => array('icon')
200
  ),
201
  'weight' => '',
202
- 'group' => 'Icon & Image',
203
  'edit_field_class' => ''
204
  ),
205
  array(
@@ -217,7 +300,7 @@ function auxin_get_text_master_array( $master_array ) {
217
  'value' => array('icon')
218
  ),
219
  'weight' => '',
220
- 'group' => 'Icon & Image',
221
  'edit_field_class' => ''
222
  ),
223
  array(
@@ -240,7 +323,7 @@ function auxin_get_text_master_array( $master_array ) {
240
  'value' => array('icon')
241
  ),
242
  'weight' => '',
243
- 'group' => 'Icon & Image',
244
  'edit_field_class' => ''
245
  ),
246
  array(
@@ -252,24 +335,28 @@ function auxin_get_text_master_array( $master_array ) {
252
  'choices' => array(
253
  'circle' => array(
254
  'label' => __('Circle', 'auxin-elements'),
255
- 'image' => AUX_URL . 'images/visual-select/icon-style-circle.svg'
256
  ),
257
  'semi-circle' => array(
258
  'label' => __('Semi-circle', 'auxin-elements'),
259
- 'image' => AUX_URL . 'images/visual-select/icon-style-semi-circle.svg'
260
  ),
261
  'round-rect' => array(
262
  'label' => __('Round Rectangle', 'auxin-elements'),
263
- 'image' => AUX_URL . 'images/visual-select/icon-style-round-rectangle.svg'
264
  ),
265
  'cross-rect' => array(
266
  'label' => __('Cross Rectangle', 'auxin-elements'),
267
- 'image' => AUX_URL . 'images/visual-select/icon-style-cross-rectangle.svg'
268
  ),
269
  'rect' => array(
270
  'label' => __('Rectangle', 'auxin-elements'),
271
- 'image' => AUX_URL . 'images/visual-select/icon-style-rectangle.svg'
272
- )
 
 
 
 
273
  ),
274
  'holder' => 'dropdown',
275
  'class' => 'icon_shape',
@@ -279,9 +366,26 @@ function auxin_get_text_master_array( $master_array ) {
279
  'value' => array('icon')
280
  ),
281
  'weight' => '',
282
- 'group' => 'Icon & Image',
283
  'edit_field_class' => ''
284
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
285
  array(
286
  'heading' => __('Icon background color','auxin-elements'),
287
  'description' => __('Choose a color for background of icon.','auxin-elements'),
@@ -297,7 +401,7 @@ function auxin_get_text_master_array( $master_array ) {
297
  'value' => array('icon')
298
  ),
299
  'weight' => '',
300
- 'group' => 'Icon & Image',
301
  'edit_field_class' => ''
302
  ),
303
  array(
@@ -315,7 +419,7 @@ function auxin_get_text_master_array( $master_array ) {
315
  'value' => array('icon')
316
  ),
317
  'weight' => '',
318
- 'group' => 'Icon & Image',
319
  'edit_field_class' => ''
320
  ),
321
  array(
@@ -333,7 +437,7 @@ function auxin_get_text_master_array( $master_array ) {
333
  'value' => array('image')
334
  ),
335
  'weight' => '',
336
- 'group' => 'Icon & Image',
337
  'edit_field_class' => ''
338
  ),
339
  array(
@@ -356,7 +460,7 @@ function auxin_get_text_master_array( $master_array ) {
356
  'value' => array('image')
357
  ),
358
  'weight' => '',
359
- 'group' => 'Icon & Image' ,
360
  'edit_field_class' => ''
361
  ),
362
  array(
@@ -368,15 +472,15 @@ function auxin_get_text_master_array( $master_array ) {
368
  'choices' => array(
369
  'top' => array(
370
  'label' => __('Top', 'auxin-elements'),
371
- 'image' => AUX_URL . 'images/visual-select/column-icon-top.svg'
372
  ),
373
  'left' => array(
374
  'label' => __('Left', 'auxin-elements'),
375
- 'image' => AUX_URL . 'images/visual-select/column-icon-left.svg'
376
  ),
377
  'right' => array(
378
  'label' => __('Right', 'auxin-elements'),
379
- 'image' => AUX_URL . 'images/visual-select/column-icon-right.svg'
380
  )
381
  ),
382
  'holder' => 'dropdown',
@@ -384,7 +488,251 @@ function auxin_get_text_master_array( $master_array ) {
384
  'admin_label' => true,
385
  'dependency' => '',
386
  'weight' => '',
387
- 'group' => 'Icon & Image',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
388
  'edit_field_class' => ''
389
  ),
390
  array(
@@ -402,6 +750,46 @@ function auxin_get_text_master_array( $master_array ) {
402
  'group' => '' ,
403
  'edit_field_class' => ''
404
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
405
  array(
406
  'heading' => __('Extra class name','auxin-elements'),
407
  'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'auxin-elements'),
@@ -430,100 +818,181 @@ function auxin_widget_column_callback( $atts, $shortcode_content = null ){
430
 
431
  // Defining default attributes
432
  $default_atts = array(
433
- 'title' => '', // section title
434
- 'title_link' => '', // the link on title
435
- 'content' => '', // the link on title
436
- 'text_align' => '', // left, right, center
437
- 'text_color_mode' => 'inherit', // inherit, dark, light
438
-
439
- 'wrapper_style' => '', // box, outline,
440
- 'wrapper_bg_color' => '', // box, outline,
441
-
442
- 'icon' => '', // icon on column side
443
- 'icon_color' => '#888',
444
- 'icon_size' => 'large', // small, medium, large, x-large
445
- 'icon_shape' => 'circle', // circle, semi-circle, round-rect, rect, hexa,
446
- 'icon_bg_color' => '', // empty mean inherit,
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
454
- 'custom_el_id' => '', // custom id attribute for this element
455
- 'base_class' => 'aux-widget-text' // base class name for container
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
456
  );
457
 
 
458
  if( ! empty( $atts['wrapper_style'] ) ){
459
  $atts['extra_classes'] .= ' aux-wrap-style-' . esc_attr( $atts['wrapper_style'] );
460
- } else if( ! empty( $default_atts['wrapper_style'] ) ){
461
  $atts['extra_classes'] .= ' aux-wrap-style-' . esc_attr( $default_atts['wrapper_style'] );
462
  }
463
- //axpp( $default_atts['extra_classes'] );
464
  $result = auxin_get_widget_scafold( $atts, $default_atts );
 
465
  extract( $result['parsed_atts'] );
466
 
467
- $icon_border_color = 'icon' == $icon_border_color ? $icon_color : $icon_border_color;
468
- $content = empty( $content ) ? $shortcode_content : $content;
 
 
 
 
 
469
 
470
- $main_inline_style = empty( $wrapper_bg_color ) ? '' : 'background-color:'.$wrapper_bg_color.' !important;';
471
- $main_inline_style .= empty( $main_inline_style ) ? '' : ' style="'.$main_inline_style.'";';
472
- $main_classes = 'aux-text-inner aux-ico-pos-'. ( $image_position ? esc_attr( $image_position ) : 'top' );
473
  $main_classes .= empty( $text_align ) ? '' : ' aux-text-align-' . esc_attr( $text_align );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
474
  $main_classes .= empty( $text_color_mode ) || 'inherit' == $text_color_mode ? '' : ' aux-text-color-'. esc_attr( $text_color_mode );
475
 
476
- $icon_box_inline_style = empty( $icon_bg_color ) ? '' : 'background-color:'.$icon_bg_color.' !important;';
477
- $icon_box_inline_style .= empty( $icon_border_color ) ? '' : 'border-color:'.$icon_border_color.';';
478
- $icon_box_inline_style .= empty( $icon_box_inline_style ) ? '' : ' style="'.$icon_box_inline_style.'";';
479
- $icon_box_classes = 'aux-ico-' . esc_attr( $icon_size );
 
 
 
 
 
 
480
  $icon_box_classes .= ' aux-ico-shape-' . esc_attr( $icon_shape );
481
 
482
- $icon_classes = empty( $icon ) || $icon == 'none' ? '' : esc_attr( $icon );
483
- $icon_inline_style = empty( $icon_color ) ? '' : 'style="color:'.$icon_color.' !important;"';
 
484
 
485
  $icon_border_style_tag = '';
486
  if( ! empty( $icon_border_color ) && 'cross-rect' == $icon_shape ){
487
  $icon_uid = uniqid( 'auxt' );
488
  $icon_box_inline_style .= ' id="'. $icon_uid .'"';
489
- $icon_border_style_tag = "<style>#$icon_uid:before,#$icon_uid:after{border-color:$icon_border_color;}</style>";
490
  }
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();
500
 
501
  // widget header ------------------------------
502
  echo $result['widget_header'];
503
  ?>
504
  <div class="<?php echo $main_classes; ?>" <?php echo $main_inline_style; ?>>
505
- <?php if( ! empty( $icon ) && empty( $image ) ) { ?>
506
- <div class="aux-ico-box <?php echo $icon_box_classes; ?>" <?php echo $icon_box_inline_style; ?>>
507
- <?php echo $icon_border_style_tag; ?>
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 ) ) { ?>
519
- <h4 class="col-title"><a href="<?php echo $title_link; ?>"><?php echo $title; ?></a></h4>
520
- <?php } if( ! empty( $content ) ) { ?>
521
- <div class="entry-content">
522
- <?php $encoding_flag = defined('ENT_HTML401') ? ENT_HTML401 : ENT_QUOTES; ?>
523
- <p><?php echo do_shortcode( html_entity_decode( $content, $encoding_flag, 'UTF-8') ); ?></p>
 
 
 
 
 
 
 
 
524
  </div>
525
- <?php } ?>
526
  </div>
 
 
 
 
 
527
 
528
  <?php
529
  // widget footer ------------------------------
55
  'group' => '' ,
56
  'edit_field_class' => ''