Shortcodes and extra features for Phlox theme - Version 2.6.0

Version Description

Download this release

Release Info

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

Code changes from version 2.5.20 to 2.6.0

Files changed (41) hide show
  1. README.txt +8 -3
  2. admin/assets/js/plugins.js +1 -1
  3. admin/assets/js/solo/global.js +0 -22
  4. admin/includes/admin-hooks.php +2 -48
  5. admin/includes/classes/class-auxels-plugin-check-update.php +13 -11
  6. admin/includes/classes/class-auxels-system-check.php +49 -8
  7. admin/includes/classes/class-auxin-dashboard-notice.php +0 -240
  8. admin/includes/classes/class-auxin-license-activation.php +2 -0
  9. admin/includes/classes/class-auxin-notices.php +58 -3
  10. admin/includes/compatibility/smush/smush.php +15 -0
  11. admin/includes/compatibility/yoast-seo/yoast-seo.php +13 -0
  12. admin/includes/index.php +2 -0
  13. auxin-elements.php +2 -2
  14. includes/classes/class-auxin-demo-importer.php +71 -3
  15. includes/classes/class-auxin-welcome-sections.php +4 -2
  16. includes/classes/class-auxin-welcome.php +0 -26
  17. includes/classes/class-auxin-widget.php +3 -1
  18. includes/define.php +1 -1
  19. includes/elementor/class-auxin-elementor-core-elements.php +2 -12
  20. includes/elementor/modules/dynamic-tags/pages-url.php +82 -0
  21. includes/elementor/modules/dynamic-tags/taxonomies-url.php +81 -0
  22. includes/elementor/modules/templates-types-manager.php +12 -0
  23. includes/elementor/widgets/modern-button.php +310 -25
  24. includes/elementor/widgets/recent-posts-grid-carousel.php +2 -1
  25. includes/elementor/widgets/recent-posts-land-style.php +15 -16
  26. includes/elementor/widgets/testimonial.php +4 -0
  27. includes/elementor/widgets/text.php +21 -1
  28. includes/elementor/widgets/theme-elements/menu.php +11 -0
  29. includes/elements/button.php +1 -1
  30. includes/elements/gallery.php +1 -1
  31. includes/elements/recent-posts-grid-carousel.php +1 -1
  32. includes/elements/recent-posts-land-style.php +1 -1
  33. includes/elements/recent-posts-masonry.php +1 -1
  34. includes/elements/recent-posts-tiles-carousel.php +1 -1
  35. includes/elements/recent-posts-tiles.php +1 -1
  36. includes/elements/recent-posts-timeline.php +1 -1
  37. includes/elements/recent-products.php +1 -1
  38. includes/general-hooks.php +112 -13
  39. languages/auxin-elements.pot +545 -493
  40. public/assets/js/plugins.js +1 -1
  41. public/includes/class-auxels-frontend-assets.php +16 -0
README.txt CHANGED
@@ -6,8 +6,8 @@ License URI: http://www.gnu.org/licenses/gpl.html
6
  Tags: phlox, gallery, elementor, siteorigin, auxin, averta, auxin-elements, framework, widget, fullwidth, masonry, timeline, parallax
7
  Requires PHP: 5.4
8
  Requires at least: 4.6
9
- Tested up to: 5.4.1
10
- Stable tag: 2.5.20
11
  License: GPLv3
12
  License URI: http://www.gnu.org/licenses/gpl.html
13
 
@@ -155,12 +155,17 @@ Bugs can be reported in our [support forums](https://docs.phlox.pro).
155
 
156
  == Changelog ==
157
 
 
 
 
 
 
 
158
  = Version 2.5.0 / (09.03.2020) =
159
  - [Improvement]: Instagram link for staff Element added.
160
  - [New]: Inline SVG option for Infobox element added.
161
  - [Improvement]: Improvements in dark mode style of controllers for Elementor applied.
162
 
163
-
164
  = Version 2.4.18 / (03.02.2020) =
165
  - [Improvement]: Some improvements for modern heading element applied.
166
  - [Improvement]: Improvements for dark mode styles in Elementor panel applied.
6
  Tags: phlox, gallery, elementor, siteorigin, auxin, averta, auxin-elements, framework, widget, fullwidth, masonry, timeline, parallax
7
  Requires PHP: 5.4
8
  Requires at least: 4.6
9
+ Tested up to: 5.4.3
10
+ Stable tag: 2.6.0
11
  License: GPLv3
12
  License URI: http://www.gnu.org/licenses/gpl.html
13
 
155
 
156
  == Changelog ==
157
 
158
+ = Version 2.6.0 / (11.05.2020) =
159
+ - [New]: New option for changing the character limit of last breadcrumb text added.
160
+ - [Improvement]: Improvements for ajax add to cart applied.
161
+ - [Improvement]: Improvements for demo importer applied.
162
+ - [Fix]: A minor bug while using WordPress widgets in Elementor fixed.
163
+
164
  = Version 2.5.0 / (09.03.2020) =
165
  - [Improvement]: Instagram link for staff Element added.
166
  - [New]: Inline SVG option for Infobox element added.
167
  - [Improvement]: Improvements in dark mode style of controllers for Elementor applied.
168
 
 
169
  = Version 2.4.18 / (03.02.2020) =
170
  - [Improvement]: Some improvements for modern heading element applied.
171
  - [Improvement]: Improvements for dark mode styles in Elementor panel applied.
admin/assets/js/plugins.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! Phlox Core Plugin - v2.5.20 (2020-05)
2
  * All required javascript plugins for admin
3
  * http://phlox.pro/
4
  * Place any jQuery/helper plugins in here, instead of separate, slower script files!
1
+ /*! Phlox Core Plugin - v2.6.0 (2020-07)
2
  * All required javascript plugins for admin
3
  * http://phlox.pro/
4
  * Place any jQuery/helper plugins in here, instead of separate, slower script files!
admin/assets/js/solo/global.js CHANGED
@@ -1,27 +1,5 @@
1
  (function( $ ) {
2
  "use strict";
3
 
4
- $('.aux-welcome-close-notice').on('click', function(event){
5
- event.preventDefault();
6
- var $this = $(this),
7
- _id = $this.data('id');
8
-
9
- jQuery.post(
10
- ajaxurl,
11
- {
12
- action : 'aux_welcome_dismiss_notice', // the handler
13
- auxnonce : aux_setup_params.wpnonce,
14
- _id : _id
15
- },
16
- function(res){
17
- if( ! res.success ){
18
- alert( res.data.message );
19
- } else {
20
- $this.closest('.aux-welcome-notice-wrapper').hide();
21
- }
22
- }
23
- );
24
-
25
- });
26
 
27
  })( jQuery );
1
  (function( $ ) {
2
  "use strict";
3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
 
5
  })( jQuery );
admin/includes/admin-hooks.php CHANGED
@@ -754,54 +754,8 @@ add_action( 'admin_notices', 'auxin_notice_manager' );
754
  /*-----------------------------------------------------------------------------------*/
755
 
756
  function auxin_ads_manager(){
757
-
758
- if ( false === $data = get_transient( 'auxin_ads_request' ) ) {
759
- $body = auxin_remote_get( 'http://averta.net/main/rest/ara/v1/notifications?notification-space=3,5', null);
760
- $data = json_decode( $body );
761
- set_transient( 'auxin_ads_request', $data , 12 * HOUR_IN_SECONDS );
762
- }
763
-
764
- if ( empty( $data ) ) {
765
- return false;
766
- }
767
-
768
- $ads_list = [];
769
-
770
- foreach( $data as $ads_data ) {
771
- $ads_list['auxin_ads_' . $ads_data->id] = new Auxin_Notices([
772
- 'id' => 'auxin_ads_' . $ads_data->id,
773
- 'title' => $ads_data->title->rendered,
774
- 'desc' => $ads_data->message,
775
- 'skin' => 'ads',
776
- 'has_close' => false,
777
- 'wrapper_extra_styles' => [
778
- 'background-color' => $ads_data->{'background-color'},
779
- 'background-image' => 'url(' . $ads_data->{'background-image'} . ')',
780
- 'color' => $ads_data->color,
781
- 'custom' => $ads_data->boxStyles
782
- ],
783
- 'buttons' => [
784
- [
785
- 'label' => $ads_data->button->label,
786
- 'target' => '_blank',
787
- 'link' => $ads_data->button->url,
788
- 'custom_styles' => $ads_data->button->style
789
- ],
790
- [
791
- 'label' => __('Dismiss', 'auxin-elements'),
792
- 'type' => 'skip',
793
- 'expiration' => HOUR_IN_SECONDS * 2
794
- ]
795
- ],
796
- ]);
797
- }
798
-
799
- foreach ( $ads_list as $ads ) {
800
- if( $ads instanceof Auxin_Notices ){
801
- $ads->render();
802
- }
803
- }
804
-
805
  }
806
 
807
  add_action( 'admin_notices', 'auxin_ads_manager' );
754
  /*-----------------------------------------------------------------------------------*/
755
 
756
  function auxin_ads_manager(){
757
+ $api_id = ( defined('THEME_PRO' ) && THEME_PRO ) ? '27' : '26';
758
+ Auxin_Notices::get_ads_notices( $api_id );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
759
  }
760
 
761
  add_action( 'admin_notices', 'auxin_ads_manager' );
admin/includes/classes/class-auxels-plugin-check-update.php CHANGED
@@ -131,19 +131,21 @@ class AUXELS_Plugin_Check_Update {
131
  $this_plugin['Version'] = defined('THEME_VERSION') ? THEME_VERSION : $theme_data->Version;
132
  $this_plugin['Slug'] = defined('THEME_ID') ? THEME_ID : $this->slug;
133
  $this_plugin['Activated'] = 0;
134
-
135
- $request = wp_remote_post( $this->update_path, array(
136
- 'user-agent' => 'WordPress/'.$wp_version.'; '. get_site_url(),
137
- 'timeout' => ( ( defined('DOING_CRON') && DOING_CRON ) ? 30 : 3),
138
- 'body' => array(
139
- 'cat' => 'version-check',
140
- 'action' => 'final',
141
- 'type' => 'plugin',
142
- 'item-name' => $this->request_name,
143
- 'item-info' => $this_plugin
144
- )
145
  )
146
  );
 
 
147
 
148
  if ( ! is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) === 200 ) {
149
  return $request['body'];
131
  $this_plugin['Version'] = defined('THEME_VERSION') ? THEME_VERSION : $theme_data->Version;
132
  $this_plugin['Slug'] = defined('THEME_ID') ? THEME_ID : $this->slug;
133
  $this_plugin['Activated'] = 0;
134
+ $this_plugin['client_key'] = get_theme_mod( 'client_key', '');
135
+
136
+ $args = array(
137
+ 'user-agent' => 'WordPress/'.$wp_version.'; '. get_site_url(),
138
+ 'timeout' => ( ( defined('DOING_CRON') && DOING_CRON ) ? 30 : 3),
139
+ 'body' => array(
140
+ 'cat' => 'version-check',
141
+ 'action' => 'final',
142
+ 'type' => 'plugin',
143
+ 'item-name' => $this->request_name,
144
+ 'item-info' => $this_plugin
145
  )
146
  );
147
+ $args = apply_filters( 'auxels_version_check_args', $args );
148
+ $request = wp_remote_post( $this->update_path, $args );
149
 
150
  if ( ! is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) === 200 ) {
151
  return $request['body'];
admin/includes/classes/class-auxels-system-check.php CHANGED
@@ -20,6 +20,11 @@ class Auxels_System_Check {
20
  'label' => __( 'System Status Check By Averta', 'auxin-elements' ),
21
  'test' => array( $this, 'check_php_ini_settings' )
22
  );
 
 
 
 
 
23
 
24
  return $tests;
25
  }
@@ -51,19 +56,13 @@ class Auxels_System_Check {
51
 
52
  $output = '<ul>';
53
  $output .= sprintf(
54
- '<li></li>',
55
  $message
56
  );
57
  $output .= '</ul>';
58
 
59
  $result['description'] = $output;
60
-
61
- if ( 'good' !== $result['status'] ) {
62
- if ( 'recommended' === $result['status'] ) {
63
- $result['label'] = __( 'We recommend setting max execution time to at least 60.', 'auxin-elements' );
64
- }
65
-
66
- }
67
  }
68
 
69
  return $result;
@@ -91,10 +90,52 @@ class Auxels_System_Check {
91
  ++$system_notices;
92
  }
93
 
 
 
 
 
94
  return $system_notices;
95
 
96
  }
97
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
  /**
99
  * Return an instance of this class.
100
  *
20
  'label' => __( 'System Status Check By Averta', 'auxin-elements' ),
21
  'test' => array( $this, 'check_php_ini_settings' )
22
  );
23
+
24
+ $tests['direct']['auxin_curl_check'] = array(
25
+ 'label' => __( 'Demo And Template Import Check By Averta', 'auxin-elements' ),
26
+ 'test' => array( $this, 'check_connecting_to_averta_servers' )
27
+ );
28
 
29
  return $tests;
30
  }
56
 
57
  $output = '<ul>';
58
  $output .= sprintf(
59
+ '<li>%s</li>',
60
  $message
61
  );
62
  $output .= '</ul>';
63
 
64
  $result['description'] = $output;
65
+ $result['label'] = __( 'We recommend setting max execution time to at least 60.', 'auxin-elements' );
 
 
 
 
 
 
66
  }
67
 
68
  return $result;
90
  ++$system_notices;
91
  }
92
 
93
+ if ( empty( Auxin_Welcome::get_instance()->get_demo_list() ) ) {
94
+ ++$system_notices;
95
+ }
96
+
97
  return $system_notices;
98
 
99
  }
100
 
101
+ /**
102
+ * Curl connection to averta server check
103
+ */
104
+ public function check_connecting_to_averta_servers() {
105
+ $result = array(
106
+ 'label' => __( 'Connecting to averta servers to get demos and templates passed successfully' ),
107
+ 'status' => 'good',
108
+ 'badge' => array(
109
+ 'label' => __( 'Performance' ),
110
+ 'color' => 'blue',
111
+ ),
112
+ 'actions' => '',
113
+ 'test' => 'auxin_check_connecting_to_averta_servers',
114
+ 'description' => __( 'Connecting to averta servers to get demos and templates passed successfully', 'auxin-elements' )
115
+ );
116
+
117
+ if ( empty( Auxin_Welcome::get_instance()->get_demo_list() ) ) {
118
+ $result['status'] = 'critical';
119
+
120
+ $class = 'error';
121
+ $screen_reader = __( 'Error', 'auxin-elements' );
122
+ $message = __( 'Your site can communicate securely with Phlox update services. <a href="https://docs.phlox.pro/article/206-error-activating-license" target="_blank">How to fix?</a>
123
+ ', 'auxin-elements' );
124
+ $message = "<span class='dashicons $class'><span class='screen-reader-text'>$screen_reader</span></span> $message";
125
+
126
+ $output = '<ul>';
127
+ $output .= sprintf(
128
+ '<li>%s</li>',
129
+ $message
130
+ );
131
+ $output .= '</ul>';
132
+ $result['description'] = $output;
133
+ $result['label'] = __( 'Error while trying to connect to averta servers', 'auxin-elements' );
134
+
135
+ }
136
+ return $result;
137
+ }
138
+
139
  /**
140
  * Return an instance of this class.
141
  *
admin/includes/classes/class-auxin-dashboard-notice.php DELETED
@@ -1,240 +0,0 @@
1
- <?php
2
- /**
3
- * Auxin admin notices
4
- */
5
- class Auxin_Dashboard_Notice {
6
-
7
- /**
8
- * Instance of this class.
9
- *
10
- * @var object
11
- */
12
- protected static $instance = null;
13
-
14
-
15
- /**
16
- * The list of notice IDs
17
- *
18
- * @var object
19
- */
20
- private $notice_ids = array();
21
-
22
- /**
23
- * Notices
24
- *
25
- * @var array
26
- */
27
- private $notices = array();
28
-
29
- /**
30
- * Base API URL
31
- *
32
- * @var string
33
- */
34
- private $base_url = '';
35
-
36
- /**
37
- * Prefix
38
- *
39
- * @var string
40
- */
41
- private $prefix = 'auxin-';
42
-
43
-
44
- function __construct(){
45
-
46
- $this->notice_ids = array(
47
- 'auxels-notice-info-dashboard'
48
- );
49
-
50
- $this->prefix = THEME_ID . '-';
51
-
52
- $this->base_url = 'http://cdn.averta.net/project/phlox/free/info/';
53
- }
54
-
55
- // Methods using the plugin API
56
- // =========================================================================
57
-
58
- private function get_option( $option_key ){
59
- return auxin_get_option( $this->prefix . $option_key );
60
- }
61
-
62
- private function update_option( $option_key, $option_value ){
63
- return auxin_update_option( $this->prefix . $option_key, $option_value );
64
- }
65
-
66
- private function get_transient( $transient ){
67
- return auxin_get_transient( $this->prefix . $transient );
68
- }
69
-
70
- private function set_transient( $transient, $value, $expiration = 0 ){
71
- return auxin_set_transient( $this->prefix . $transient, $value, $expiration );
72
- }
73
-
74
- private function delete_transient( $transient ){
75
- return auxin_delete_transient( $this->prefix . $transient );
76
- }
77
-
78
- private function get_remote_post( $url ){
79
- return auxin_remote_post( $url );
80
- }
81
-
82
- // =========================================================================
83
-
84
- private function get_notice_info_transient_id( $notice_id ){
85
- return 'notice-info-' . esc_attr( $notice_id );
86
- }
87
-
88
- private function fetch_notice_info( $notice_id, $force_update = false ){
89
-
90
- if( empty( $notice_id ) ){
91
- return false;
92
- }
93
-
94
- // defaults
95
- $defaults = array(
96
- 'remote_url' => '', // the remote notice url
97
- 'beta_url' => '', // beta remote content
98
- 'revision' => '', // empty means don't display
99
- 'first_delay' => 0, // in seconds
100
- 'id' => $notice_id,
101
- 'enabled' => true,
102
-
103
- 'content' => '', // the remote notice content
104
- 'delay_passed' => false, // the remote notice content
105
- 'debug' => array()
106
- );
107
-
108
- // info transient id
109
- $transient_id = $this->get_notice_info_transient_id( $notice_id );
110
-
111
- if( isset( $_GET['msafi'] ) ){
112
- $this->delete_transient( $transient_id );
113
- }
114
-
115
- if( ! $force_update && false !== ( $result = $this->get_transient( $transient_id ) ) ){
116
- // wp_parse_args to prevent the errors while new args implemented in new versions
117
- $defaults['debug'][] = '1.1';
118
- return wp_parse_args( $result, $defaults );
119
- }
120
-
121
- if( false === $info = $this->get_remote_post( $this->base_url . $notice_id . '.json' ) ){
122
- $defaults['debug'][] = '1.2';
123
- return $defaults;
124
- } else {
125
- $info = json_decode( $info, true );
126
- $info = wp_parse_args( $info, $defaults );
127
- $info['debug'][] = '1.3';
128
- }
129
-
130
- // get remote content
131
- $remote_url = isset( $_GET['msbeta'] ) ? $info["beta_url"] : $info["remote_url"];
132
- $info["content"] = $this->fetch_file_content( $remote_url );
133
-
134
- if( empty( $info["revision"] ) ){
135
- $info["enabled"] = false;
136
- $info['debug'][] = '1.4';
137
-
138
- } elseif( is_numeric( $info['revision'] ) && $info['revision'] != $this->get_option( 'notice-'. $notice_id .'-latest-revision' ) ){
139
- $info["enabled"] = true;
140
- $info['debug'][] = '1.5';
141
- } else {
142
- $info["enabled"] = false;
143
- $info['debug'][] = '1.55';
144
- }
145
-
146
- if( ! $this->get_option( 'notice-installtion-time' ) ){
147
- $this->update_option( 'notice-installtion-time', time() );
148
- $info['debug'][] = '1.6';
149
- }
150
-
151
- $first_delay_diff = ( ( $this->get_option( 'notice-installtion-time' ) + ( (int) $info['first_delay'] ) ) - time() );
152
- $info['debug'][] = 'Due - Now: '. ( $first_delay_diff < 0 ? 'Passed ' . abs($first_delay_diff) : ' Remaining ' . abs($first_delay_diff) ) . ' seconds';
153
- $info['debug'][] = 'Previous revision: '. $this->get_option( 'notice-'. $notice_id .'-latest-revision' );
154
- $info['debug'][] = 'Remote revision: '. $info['revision'];
155
-
156
- // check for initial delay
157
- if( $info['first_delay'] ){
158
- if( $this->get_option( 'notice-installtion-time' ) + ( (int) $info['first_delay'] ) > time() ){
159
- $info['debug'][] = '1.7';
160
- $info["delay_passed"] = false;
161
- } else {
162
- $info["delay_passed"] = true;
163
- $info['debug'][] = '1.8';
164
- }
165
- } else {
166
- $info["delay_passed"] = true;
167
- }
168
-
169
- $this->set_transient( $transient_id, $info, 6 * HOUR_IN_SECONDS );
170
-
171
- return $info;
172
- }
173
-
174
- private function fetch_file_content( $url ){
175
- if( false === $result = $this->get_remote_post( $url ) ){
176
- return '';
177
- }
178
- return $result;
179
- }
180
-
181
- public function get_content( $notice_id ){
182
- $result = $this->fetch_notice_info( $notice_id );
183
-
184
- if( isset( $_GET['msdebug'] ) ){
185
- $debug_info = $result;
186
- unset( $debug_info['content'] );
187
- $debug = axpp( $debug_info, false, true );
188
- } else {
189
- $debug = '';
190
- }
191
-
192
- if( ! empty( $result['content'] ) && $result['enabled'] && $result['delay_passed'] ){
193
- return $result['content'] . $debug;
194
- }
195
-
196
- return $debug;
197
- }
198
-
199
-
200
- public function get_notice( $notice_id ){
201
- if( $content = $this->get_content( $notice_id ) ){
202
- return '<div class="aux-welcome-notice-wrapper aux-welcome-banner-wrapper">' . $content . '</div>';
203
- }
204
- return '';
205
- }
206
-
207
- public function disable_notice( $notice_id ){
208
-
209
- if( ! in_array( $notice_id, $this->notice_ids ) ){
210
- return false;
211
- }
212
-
213
- // info transient id
214
- $transient_id = $this->get_notice_info_transient_id( $notice_id );
215
-
216
- if( false !== ( $info = $this->fetch_notice_info( $notice_id ) ) ){
217
- $this->update_option( 'notice-'. $notice_id .'-latest-revision', $info['revision'] );
218
- $info['enabled'] = false;
219
- $this->set_transient( $transient_id, $info, 6 * HOUR_IN_SECONDS );
220
- }
221
-
222
- return true;
223
- }
224
-
225
- /**
226
- * Return an instance of this class.
227
- *
228
- * @return object A single instance of this class.
229
- */
230
- public static function get_instance() {
231
-
232
- // If the single instance hasn't been set, set it now.
233
- if ( null == self::$instance ) {
234
- self::$instance = new self;
235
- }
236
-
237
- return self::$instance;
238
- }
239
-
240
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/includes/classes/class-auxin-license-activation.php CHANGED
@@ -73,6 +73,8 @@ class Auxin_License_Activation {
73
  )
74
  );
75
 
 
 
76
  $request = wp_remote_post( $this->api, $args );
77
 
78
  if ( is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) !== 200 ) {
73
  )
74
  );
75
 
76
+ $args = apply_filters( 'auxels_get_license_result_args', $args );
77
+
78
  $request = wp_remote_post( $this->api, $args );
79
 
80
  if ( is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) !== 200 ) {
admin/includes/classes/class-auxin-notices.php CHANGED
@@ -325,14 +325,15 @@ class Auxin_Notices{
325
  * @param boolean $echo
326
  * @return void
327
  */
328
- public function render(){
329
 
330
  if( $this->is_dismissible() || $this->is_visible_screen() || $this->is_snoozed() ) {
331
  return;
332
  }
333
-
334
  echo sprintf(
335
- '<div class="updated auxin-message aux-notice-control aux-notice-wrapper %s %s" %s>%s %s %s <p class="aux-notice-submit submit">%s %s</p></div>',
 
336
  $this->get_unique_class(),
337
  $this->get_skin(),
338
  $this->get_custom_styles(),
@@ -345,4 +346,58 @@ class Auxin_Notices{
345
 
346
  }
347
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
348
  }
325
  * @param boolean $echo
326
  * @return void
327
  */
328
+ public function render( $updated = '' ){
329
 
330
  if( $this->is_dismissible() || $this->is_visible_screen() || $this->is_snoozed() ) {
331
  return;
332
  }
333
+ $updated = empty( $updated ) ? 'updated' : '';
334
  echo sprintf(
335
+ '<div class="%s auxin-message aux-notice-control aux-notice-wrapper %s %s" %s>%s %s %s <p class="aux-notice-submit submit">%s %s</p></div>',
336
+ $updated,
337
  $this->get_unique_class(),
338
  $this->get_skin(),
339
  $this->get_custom_styles(),
346
 
347
  }
348
 
349
+ public static function get_ads_notices( $api_id = '26', $style = array(), $updated = '' ) {
350
+ $transient_id = ( $api_id == '3' || $api_id == '4' ) ? 'auxin_dashboard_ads_request' : 'auxin_ads_request';
351
+ if ( false === $data = get_transient( $transient_id ) ) {
352
+ $body = auxin_remote_get( 'http://api.averta.net/rest/ara/v1/notifications?notification-space='. $api_id, null);
353
+ $data = json_decode( $body );
354
+ set_transient( $transient_id, $data , 12 * HOUR_IN_SECONDS );
355
+ }
356
+
357
+ if ( empty( $data ) ) {
358
+ return false;
359
+ }
360
+
361
+ $ads_list = [];
362
+
363
+ foreach( $data as $ads_data ) {
364
+ $args = [
365
+ 'id' => 'auxin_ads_' . $ads_data->id,
366
+ 'title' => $ads_data->title->rendered,
367
+ 'desc' => $ads_data->message,
368
+ 'skin' => 'ads',
369
+ 'has_close' => false,
370
+ 'wrapper_extra_styles' => [
371
+ 'background-color' => $ads_data->{'background-color'},
372
+ 'background-image' => 'url(' . $ads_data->{'background-image'} . ')',
373
+ 'color' => $ads_data->color,
374
+ 'custom' => $ads_data->boxStyles
375
+ ],
376
+ 'buttons' => [
377
+ [
378
+ 'label' => $ads_data->button->label,
379
+ 'target' => '_blank',
380
+ 'link' => $ads_data->button->url,
381
+ 'custom_styles' => $ads_data->button->style
382
+ ],
383
+ [
384
+ 'label' => __('Dismiss', 'auxin-elements'),
385
+ 'type' => 'skip',
386
+ 'expiration' => HOUR_IN_SECONDS * 2
387
+ ]
388
+ ],
389
+ ];
390
+ if ( ! empty( $style ) ) {
391
+ foreach( $style as $prop => $value ) {
392
+ $args['wrapper_extra_styles'][ $prop ] = $value;
393
+ }
394
+ }
395
+ $ads_list['auxin_dashboard_ads_' . $ads_data->id] = new self( $args );
396
+ }
397
+ foreach ( $ads_list as $ads ) {
398
+ if( $ads instanceof self ){
399
+ $ads->render( $updated );
400
+ }
401
+ }
402
+ }
403
  }
admin/includes/compatibility/smush/smush.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Enqueue smush lazy load script in header
5
+ */
6
+ function auxin_enqueue_smush_lazy_load_in_header() {
7
+ if ( defined( 'WP_SMUSH_PREFIX' ) && empty( get_option( WP_SMUSH_PREFIX . 'lazy_load', '' ) ) ) {
8
+ $default_lazy_load_config = maybe_unserialize( 'a:8:{s:6:"format";a:5:{s:4:"jpeg";b:1;s:3:"png";b:1;s:3:"gif";b:1;s:3:"svg";b:1;s:6:"iframe";b:1;}s:6:"output";a:4:{s:7:"content";b:1;s:7:"widgets";b:1;s:10:"thumbnails";b:1;s:9:"gravatars";b:1;}s:9:"animation";a:4:{s:8:"selected";s:6:"fadein";s:6:"fadein";a:2:{s:8:"duration";i:400;s:5:"delay";i:0;}s:7:"spinner";a:2:{s:8:"selected";i:1;s:6:"custom";a:0:{}}s:11:"placeholder";a:3:{s:8:"selected";i:1;s:6:"custom";a:0:{}s:5:"color";s:7:"#F3F3F3";}}s:7:"include";a:7:{s:9:"frontpage";b:1;s:4:"home";b:1;s:4:"page";b:1;s:6:"single";b:1;s:7:"archive";b:1;s:8:"category";b:1;s:3:"tag";b:1;}s:13:"exclude-pages";a:0:{}s:15:"exclude-classes";a:0:{}s:6:"footer";b:0;s:6:"native";b:0;}' );
9
+ update_option( WP_SMUSH_PREFIX . 'lazy_load', $default_lazy_load_config );
10
+ update_option( 'skip-smush-setup', true );
11
+ }
12
+ }
13
+ add_action( 'admin_init', 'auxin_enqueue_smush_lazy_load_in_header' );
14
+
15
+ ?>
admin/includes/compatibility/yoast-seo/yoast-seo.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Hide yoast seo admin notice
5
+ */
6
+ function auxin_hide_yoast_seo_admin_notice() {
7
+ if ( class_exists( 'WPSEO_Options' ) ) {
8
+ WPSEO_Options::set( 'ignore_indexation_warning', true );
9
+ }
10
+ }
11
+ add_action( 'admin_init', 'auxin_hide_yoast_seo_admin_notice' );
12
+
13
+ ?>
admin/includes/index.php CHANGED
@@ -12,6 +12,8 @@ include_once( 'compatibility/uvca/uvca.php' );
12
  include_once( 'compatibility/sliders/rev.php' );
13
  include_once( 'compatibility/sliders/layerslider.php' );
14
  include_once( 'compatibility/element-pack/element-pack.php' );
 
 
15
 
16
 
17
  if ( function_exists('icl_object_id') ) {
12
  include_once( 'compatibility/sliders/rev.php' );
13
  include_once( 'compatibility/sliders/layerslider.php' );
14
  include_once( 'compatibility/element-pack/element-pack.php' );
15
+ include_once( 'compatibility/yoast-seo/yoast-seo.php' );
16
+ include_once( 'compatibility/smush/smush.php' );
17
 
18
 
19
  if ( function_exists('icl_object_id') ) {
auxin-elements.php CHANGED
@@ -12,14 +12,14 @@
12
  * Plugin Name: Phlox Core Elements
13
  * Plugin URI: https://wordpress.org/plugins/auxin-elements/
14
  * Description: Exclusive and comprehensive plugin that extends the functionality of Phlox theme by adding new Elements, widgets and options.
15
- * Version: 2.5.20
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: 5.4.1
23
  */
24
 
25
  // If this file is called directly, abort.
12
  * Plugin Name: Phlox Core Elements
13
  * Plugin URI: https://wordpress.org/plugins/auxin-elements/
14
  * Description: Exclusive and comprehensive plugin that extends the functionality of Phlox theme by adding new Elements, widgets and options.
15
+ * Version: 2.6.0
16
  * Author: averta
17
  * Author URI: http://averta.net
18
  * Text Domain: auxin-elements
19
  * License: GPL2
20
  * License URI: https://www.gnu.org/licenses/gpl-2.0.html
21
  * Domain Path: /languages
22
+ * Tested up to: 5.4.2
23
  */
24
 
25
  // If this file is called directly, abort.
includes/classes/class-auxin-demo-importer.php CHANGED
@@ -22,6 +22,17 @@ class Auxin_Demo_Importer {
22
  */
23
  protected static $instance = null;
24
 
 
 
 
 
 
 
 
 
 
 
 
25
  /**
26
  * Return an instance of this class.
27
  *
@@ -304,6 +315,9 @@ class Auxin_Demo_Importer {
304
 
305
  auxin_delete_transient( 'aux-old-products-id-transformation' );
306
  $this->update_imported_ids();
 
 
 
307
  wp_send_json_success( array( 'step' => 'content', 'message' => __( 'Importing Options', 'auxin-elements' ), 'next' => 'auxin_options' ) );
308
 
309
  case 'auxin_options':
@@ -479,6 +493,10 @@ class Auxin_Demo_Importer {
479
  // This line is for changing the old attachment ID with new one.
480
  $theme_mods_value = $this->get_attachment_id( 'auxin_import_id', $theme_mods_value );
481
  }
 
 
 
 
482
  // Update theme mods
483
  set_theme_mod( $theme_mods_key , maybe_unserialize( $theme_mods_value ) );
484
  }
@@ -834,10 +852,11 @@ class Auxin_Demo_Importer {
834
  if ( $post['post_type'] == 'product' || $post['post_type'] == 'product_variation' ) {
835
  if ( strpos( $tax, 'pa_' ) == '0' && class_exists( 'WooCommerce' ) ) {
836
  $tax_name = str_replace('pa_','',$tax);
 
837
  $data = array(
838
  'name' => $tax_name,
839
  'slug' => $tax_name,
840
- 'type' => 'select',
841
  'orderby' => 'menu_order',
842
  'has_archive' => 0, // Enable archives ==> true (or 1)
843
  );
@@ -856,7 +875,9 @@ class Auxin_Demo_Importer {
856
  $add_these_terms = array();
857
 
858
  foreach ($term as $key => $value) {
859
-
 
 
860
  $key = is_numeric( $key ) ? (string) $key : $key;
861
  $term_obj = term_exists( $key, $tax );
862
 
@@ -1010,7 +1031,8 @@ class Auxin_Demo_Importer {
1010
  'post_type' => array(
1011
  'post',
1012
  'page',
1013
- 'portfolio'
 
1014
  ),
1015
  'posts_per_page' => -1
1016
  );
@@ -1066,6 +1088,38 @@ class Auxin_Demo_Importer {
1066
  }
1067
  }
1068
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1069
  update_post_meta( get_the_ID(), '_elementor_data', wp_slash( $elementor_data ) );
1070
 
1071
  $page_header_use_legacy = get_post_meta( get_the_ID(), 'page_header_use_legacy', true );
@@ -1086,6 +1140,20 @@ class Auxin_Demo_Importer {
1086
  wp_reset_postdata();
1087
  }
1088
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1089
  public function prepare_download( array $args ) {
1090
 
1091
  $tmpname = $responses = $requests = array();
22
  */
23
  protected static $instance = null;
24
 
25
+ /**
26
+ * Skip these options during demo import process
27
+ */
28
+ public $skip_options = [
29
+ 'initial_date_free',
30
+ 'initial_version_free',
31
+ 'initial_date_pro',
32
+ 'initial_version_pro',
33
+ 'client_key'
34
+ ];
35
+
36
  /**
37
  * Return an instance of this class.
38
  *
315
 
316
  auxin_delete_transient( 'aux-old-products-id-transformation' );
317
  $this->update_imported_ids();
318
+ if ( ! empty( $data['terms-meta'] ) ) {
319
+ $this->add_demo_terms_meta( $data['terms-meta'] );
320
+ }
321
  wp_send_json_success( array( 'step' => 'content', 'message' => __( 'Importing Options', 'auxin-elements' ), 'next' => 'auxin_options' ) );
322
 
323
  case 'auxin_options':
493
  // This line is for changing the old attachment ID with new one.
494
  $theme_mods_value = $this->get_attachment_id( 'auxin_import_id', $theme_mods_value );
495
  }
496
+
497
+ if ( in_array( $theme_mods_key, $this->skip_options ) ) {
498
+ continue;
499
+ }
500
  // Update theme mods
501
  set_theme_mod( $theme_mods_key , maybe_unserialize( $theme_mods_value ) );
502
  }
852
  if ( $post['post_type'] == 'product' || $post['post_type'] == 'product_variation' ) {
853
  if ( strpos( $tax, 'pa_' ) == '0' && class_exists( 'WooCommerce' ) ) {
854
  $tax_name = str_replace('pa_','',$tax);
855
+ $type = ! empty( $term['pa_attribute_type'] ) ? $term['pa_attribute_type'] : 'select';
856
  $data = array(
857
  'name' => $tax_name,
858
  'slug' => $tax_name,
859
+ 'type' => $type,
860
  'orderby' => 'menu_order',
861
  'has_archive' => 0, // Enable archives ==> true (or 1)
862
  );
875
  $add_these_terms = array();
876
 
877
  foreach ($term as $key => $value) {
878
+ if ( $key == 'pa_attribute_type' ) {
879
+ continue;
880
+ }
881
  $key = is_numeric( $key ) ? (string) $key : $key;
882
  $term_obj = term_exists( $key, $tax );
883
 
1031
  'post_type' => array(
1032
  'post',
1033
  'page',
1034
+ 'portfolio',
1035
+ 'product'
1036
  ),
1037
  'posts_per_page' => -1
1038
  );
1088
  }
1089
  }
1090
 
1091
+ // Change products's id in flexible recent posts element
1092
+ preg_match_all( '/only_products__in":"[\d,]*/', $elementor_data, $product_id_strings, PREG_SET_ORDER );
1093
+ if ( ! empty( $product_id_strings ) ) {
1094
+ foreach ( $product_id_strings as $key => $product_id_string ) {
1095
+ $old_ids = str_replace( 'only_products__in":"', '', $product_id_string[0] );
1096
+ $old_ids = explode( ',', $old_ids );
1097
+ $new_id = [];
1098
+ foreach( $old_ids as $key => $id ) {
1099
+ $new_id[] = auxin_get_transient( "aux-elementor-library-{$id}-changs-to" );
1100
+ }
1101
+ $new_id = implode(',', $new_id );
1102
+ $new_product_id_string = 'only_products__in":"' . $new_id . '"';
1103
+ $elementor_data = str_replace( $product_id_string[0].'"', $new_product_id_string, $elementor_data );
1104
+ }
1105
+ }
1106
+
1107
+ // Change posts's id in flexible recent posts element
1108
+ preg_match_all( '/only_posts__in":"[\d,]*/', $elementor_data, $post_id_strings, PREG_SET_ORDER );
1109
+ if ( ! empty( $post_id_strings ) ) {
1110
+ foreach ( $post_id_strings as $key => $post_id_string ) {
1111
+ $old_ids = str_replace( 'only_posts__in":"', '', $post_id_string[0] );
1112
+ $old_ids = explode( ',', $old_ids );
1113
+ $new_id = [];
1114
+ foreach( $old_ids as $key => $id ) {
1115
+ $new_id[] = auxin_get_transient( "aux-elementor-library-{$id}-changs-to" );
1116
+ }
1117
+ $new_id = implode(',', $new_id );
1118
+ $new_post_id_string = 'only_posts__in":"' . $new_id . '"';
1119
+ $elementor_data = str_replace( $post_id_string[0].'"', $new_post_id_string, $elementor_data );
1120
+ }
1121
+ }
1122
+
1123
  update_post_meta( get_the_ID(), '_elementor_data', wp_slash( $elementor_data ) );
1124
 
1125
  $page_header_use_legacy = get_post_meta( get_the_ID(), 'page_header_use_legacy', true );
1140
  wp_reset_postdata();
1141
  }
1142
 
1143
+ /**
1144
+ * Add Terms Meta Fields
1145
+ */
1146
+ public function add_demo_terms_meta( $terms_meta ) {
1147
+ foreach( $terms_meta as $meta_id => $term_options ) {
1148
+ $term_id = auxin_get_transient( 'auxin_category_new_id_of' . (int) $term_options['term_id'] );
1149
+ if ( empty( $term_id ) ) {
1150
+ continue;
1151
+ }
1152
+ $term_options['meta_value'] = ( $term_options['meta_key'] == 'image' && is_numeric( $term_options['meta_value'] ) ) ? $this->get_attachment_id( 'auxin_import_id', $term_options['meta_value'] ) : $term_options['meta_value'];
1153
+ add_term_meta( $term_id, $term_options['meta_key'], $term_options['meta_value'] );
1154
+ }
1155
+ }
1156
+
1157
  public function prepare_download( array $args ) {
1158
 
1159
  $tmpname = $responses = $requests = array();
includes/classes/class-auxin-welcome-sections.php CHANGED
@@ -42,9 +42,9 @@ class Auxin_Welcome_Sections {
42
  add_filter( 'auxin_admin_welcome_sections', array( $this, 'add_section_status' ), 110 );
43
  add_filter( 'auxin_admin_welcome_sections', array( $this, 'add_section_updates' ), 120 );
44
 
 
45
  if( ! defined('THEME_PRO') || ! THEME_PRO ) {
46
  add_filter( 'auxin_admin_welcome_sections', array( $this, 'add_section_go_pro' ), 120 );
47
- add_action( 'auxin_admin_before_welcome_section_content', array( $this, 'maybe_add_dashboard_notice') );
48
  }
49
 
50
  add_action( 'auxin_admin_after_welcome_section_content' , array( $this, 'append_changelog') );
@@ -115,7 +115,9 @@ class Auxin_Welcome_Sections {
115
  * @param array $sections
116
  */
117
  public function maybe_add_dashboard_notice( $sections ){
118
- echo Auxin_Dashboard_Notice::get_instance()->get_notice( 'auxels-notice-info-dashboard' );
 
 
119
  }
120
 
121
  /**
42
  add_filter( 'auxin_admin_welcome_sections', array( $this, 'add_section_status' ), 110 );
43
  add_filter( 'auxin_admin_welcome_sections', array( $this, 'add_section_updates' ), 120 );
44
 
45
+ add_action( 'auxin_admin_before_welcome_section_content', array( $this, 'maybe_add_dashboard_notice') );
46
  if( ! defined('THEME_PRO') || ! THEME_PRO ) {
47
  add_filter( 'auxin_admin_welcome_sections', array( $this, 'add_section_go_pro' ), 120 );
 
48
  }
49
 
50
  add_action( 'auxin_admin_after_welcome_section_content' , array( $this, 'append_changelog') );
115
  * @param array $sections
116
  */
117
  public function maybe_add_dashboard_notice( $sections ){
118
+ $api_id = ( defined('THEME_PRO' ) && THEME_PRO ) ? '3' : '4';
119
+ $style = array( 'display' => 'block !important' );
120
+ Auxin_Notices::get_ads_notices( $api_id, $style, 'no-updated' );
121
  }
122
 
123
  /**
includes/classes/class-auxin-welcome.php CHANGED
@@ -124,8 +124,6 @@ class Auxin_Welcome extends Auxin_Welcome_Base {
124
  add_action( 'wp_ajax_aux_ajax_lightbox' , array( $this, 'ajax_lightbox') );
125
  add_action( 'wp_ajax_aux_step_manager' , array( $this, 'step_manager' ) );
126
 
127
- add_action( 'wp_ajax_aux_welcome_dismiss_notice' , array( $this, 'dimiss_dashboard_notice' ) );
128
-
129
  if( isset( $_POST['action'] ) && $_POST['action'] === "aux_setup_plugins" && wp_doing_ajax() ) {
130
  add_filter( 'wp_redirect', '__return_false', 999 );
131
  }
@@ -271,30 +269,6 @@ class Auxin_Welcome extends Auxin_Welcome_Base {
271
  unset( $submenu[ $this->page_slug ]['1'] );
272
  }
273
 
274
- /**
275
- * Dimiss and close dashboard notice
276
- *
277
- * @return void
278
- */
279
- public function dimiss_dashboard_notice(){
280
- // verify nonce
281
- if ( ! isset( $_POST['auxnonce'] ) || ! wp_verify_nonce( $_POST['auxnonce'], "aux_setup_nonce") ) {
282
- wp_send_json_error( array( 'message' => __( 'Authorization failed! Notice cannot be closed.', 'auxin-elements' ) ) );
283
- }
284
-
285
- $notice_id = ! empty( $_POST['_id'] ) ? $_POST['_id'] : '';
286
-
287
- if ( empty( $notice_id ) ) {
288
- wp_send_json_error( array( 'message' => __( 'Notice cannot be closed. Notice ID is required ..', 'auxin-elements' ) ) );
289
- }
290
-
291
- if( Auxin_Dashboard_Notice::get_instance()->disable_notice( $notice_id ) ){
292
- wp_send_json_success( array( 'message' => __( 'Successfully dismissed ..', 'auxin-elements' ) ) );
293
- }
294
-
295
- wp_send_json_error( array( 'message' => __( 'Notice cannot be closed. Invalid notice ID is required.', 'auxin-elements' ) ) );
296
- }
297
-
298
  /*-----------------------------------------------------------------------------------*/
299
  /* Start Setup Wizard
300
  /*-----------------------------------------------------------------------------------*/
124
  add_action( 'wp_ajax_aux_ajax_lightbox' , array( $this, 'ajax_lightbox') );
125
  add_action( 'wp_ajax_aux_step_manager' , array( $this, 'step_manager' ) );
126
 
 
 
127
  if( isset( $_POST['action'] ) && $_POST['action'] === "aux_setup_plugins" && wp_doing_ajax() ) {
128
  add_filter( 'wp_redirect', '__return_false', 999 );
129
  }
269
  unset( $submenu[ $this->page_slug ]['1'] );
270
  }
271
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
272
  /*-----------------------------------------------------------------------------------*/
273
  /* Start Setup Wizard
274
  /*-----------------------------------------------------------------------------------*/
includes/classes/class-auxin-widget.php CHANGED
@@ -470,7 +470,9 @@ class Auxin_Widget extends WP_Widget {
470
  */
471
  public function print_dependencies(){
472
  // echo js dependencies
473
- printf( '<script>auxinCreateNamespace("auxin.elements.%3$s");
 
 
474
  auxin.elements.%3$s.dependencies = %2$s;
475
  auxin.elements.%3$s.baseid = "%1$s";</script>',
476
  $this->widget_info['base_ID'],
470
  */
471
  public function print_dependencies(){
472
  // echo js dependencies
473
+ printf( '<script>
474
+ function auxinCreateNamespace(n){for(var e=n.split("."),a=window,i="",r=e.length,t=0;r>t;t++)"window"!=e[t]&&(i=e[t],a[i]=a[i]||{},a=a[i]);return a;}
475
+ auxinCreateNamespace("auxin.elements.%3$s");
476
  auxin.elements.%3$s.dependencies = %2$s;
477
  auxin.elements.%3$s.baseid = "%1$s";</script>',
478
  $this->widget_info['base_ID'],
includes/define.php CHANGED
@@ -12,7 +12,7 @@ if( ! defined( 'THEME_NAME' ) ){
12
  }
13
 
14
 
15
- define( 'AUXELS_VERSION' , '2.5.20' );
16
 
17
  define( 'AUXELS_SLUG' , 'auxin-elements' );
18
 
12
  }
13
 
14
 
15
+ define( 'AUXELS_VERSION' , '2.6.0' );
16
 
17
  define( 'AUXELS_SLUG' , 'auxin-elements' );
18
 
includes/elementor/class-auxin-elementor-core-elements.php CHANGED
@@ -612,16 +612,6 @@ final class Elements {
612
  wp_enqueue_style( 'auxin-elementor-widgets' , AUXELS_ADMIN_URL . '/assets/css/elementor-widgets.css' );
613
  wp_enqueue_style( 'wp-mediaelement' );
614
 
615
- // Enqueue header template styles in header
616
- if( $header_template_style = auxin_get_option( 'site_elementor_header_template' ) ){
617
- $css_file = new \Elementor\Core\Files\CSS\Post( $header_template_style );
618
- $css_file->enqueue();
619
- }
620
-
621
- if( $footer_template_style = auxin_get_option( 'site_elementor_footer_template' ) ){
622
- $css_file = new \Elementor\Core\Files\CSS\Post( $footer_template_style );
623
- $css_file->enqueue();
624
- }
625
  }
626
 
627
  /**
@@ -754,7 +744,7 @@ final class Elements {
754
  }
755
 
756
  $tabs['auxicon'] = [
757
- 'name' => 'auxicon',
758
  'label' => __( 'Phlox Icons - Set 1', 'auxin-elements' ),
759
  'url' => THEME_URL . 'css/auxin-icon.css',
760
  'enqueue' => [ THEME_URL . 'css/auxin-icon.css' ],
@@ -773,7 +763,7 @@ final class Elements {
773
  }
774
 
775
  $tabs['auxicon2'] = [
776
- 'name' => 'auxicon2',
777
  'label' => __( 'Phlox Icons - Set 2', 'auxin-elements' ),
778
  'url' => THEME_URL . 'css/auxin-icon.css',
779
  'enqueue' => [ THEME_URL . 'css/auxin-icon.css' ],
612
  wp_enqueue_style( 'auxin-elementor-widgets' , AUXELS_ADMIN_URL . '/assets/css/elementor-widgets.css' );
613
  wp_enqueue_style( 'wp-mediaelement' );
614
 
 
 
 
 
 
 
 
 
 
 
615
  }
616
 
617
  /**
744
  }
745
 
746
  $tabs['auxicon'] = [
747
+ 'name' => 'auxin-front-icon',
748
  'label' => __( 'Phlox Icons - Set 1', 'auxin-elements' ),
749
  'url' => THEME_URL . 'css/auxin-icon.css',
750
  'enqueue' => [ THEME_URL . 'css/auxin-icon.css' ],
763
  }
764
 
765
  $tabs['auxicon2'] = [
766
+ 'name' => 'auxin-front-icon2',
767
  'label' => __( 'Phlox Icons - Set 2', 'auxin-elements' ),
768
  'url' => THEME_URL . 'css/auxin-icon.css',
769
  'enqueue' => [ THEME_URL . 'css/auxin-icon.css' ],
includes/elementor/modules/dynamic-tags/pages-url.php ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Auxin\Plugin\CoreElements\Elementor\Modules\DynamicTags;
3
+
4
+ use Elementor\Controls_Manager;
5
+ use Elementor\Core\DynamicTags\Tag;
6
+ use Elementor\Modules\DynamicTags\Module as TagsModule;
7
+
8
+ if ( ! defined( 'ABSPATH' ) ) {
9
+ exit; // Exit if accessed directly
10
+ }
11
+
12
+ class Auxin_Pages_Url extends Tag {
13
+
14
+ public function get_name() {
15
+ return 'aux-pages-url';
16
+ }
17
+
18
+ public function get_title() {
19
+ return __( 'Pages URL', 'auxin-elements' );
20
+ }
21
+
22
+ public function get_group() {
23
+ return 'URL';
24
+ }
25
+
26
+ public function get_categories() {
27
+ return [
28
+ TagsModule::URL_CATEGORY
29
+ ];
30
+ }
31
+
32
+ public function get_pages_list() {
33
+
34
+ $items = [
35
+ '' => __( 'Select...', 'auxin-elements' ),
36
+ ];
37
+ $pages = get_posts( array(
38
+ 'post_type' => 'page',
39
+ 'numberposts' => -1
40
+ ) );
41
+ $home_id = get_option( 'page_on_front' );
42
+ foreach ( $pages as $page ) {
43
+ $page->post_title = $home_id == $page->ID ? __( 'Home Page', 'auxin-elements' ) : $page->post_title;
44
+ $items[ $page->ID ] = $page->post_title;
45
+ }
46
+
47
+ return $items;
48
+ }
49
+
50
+ public function is_settings_required() {
51
+ return true;
52
+ }
53
+
54
+ protected function _register_controls() {
55
+ $this->add_control(
56
+ 'key',
57
+ [
58
+ 'label' => __( 'Pages URL', 'auxin-elements' ),
59
+ 'type' => Controls_Manager::SELECT,
60
+ 'options' => $this->get_pages_list(),
61
+ 'default' => ''
62
+ ]
63
+ );
64
+ }
65
+
66
+ protected function get_page_url() {
67
+ if( $key = $this->get_settings( 'key' ) ){
68
+ return get_permalink( $key );
69
+ }
70
+
71
+ return '';
72
+ }
73
+
74
+ public function get_value( array $options = [] ) {
75
+ return $this->get_page_url();
76
+ }
77
+
78
+ public function render() {
79
+ echo $this->get_page_url();
80
+ }
81
+
82
+ }
includes/elementor/modules/dynamic-tags/taxonomies-url.php ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Auxin\Plugin\CoreElements\Elementor\Modules\DynamicTags;
3
+
4
+ use Elementor\Controls_Manager;
5
+ use Elementor\Core\DynamicTags\Tag;
6
+ use Elementor\Modules\DynamicTags\Module as TagsModule;
7
+
8
+ if ( ! defined( 'ABSPATH' ) ) {
9
+ exit; // Exit if accessed directly
10
+ }
11
+
12
+ class Auxin_Taxonomies_Url extends Tag {
13
+
14
+ public function get_name() {
15
+ return 'aux-tax-url';
16
+ }
17
+
18
+ public function get_title() {
19
+ return __( 'Taxonomies URL', 'auxin-elements' );
20
+ }
21
+
22
+ public function get_group() {
23
+ return 'URL';
24
+ }
25
+
26
+ public function get_categories() {
27
+ return [
28
+ TagsModule::URL_CATEGORY
29
+ ];
30
+ }
31
+
32
+ public function get_categories_list() {
33
+
34
+ $items = [
35
+ '' => __( 'Select...', 'auxin-elements' ),
36
+ ];
37
+
38
+ $categories = auxin_general_post_types_category_slug();
39
+ foreach( $categories as $category_slug => $post_type_name ) {
40
+ $terms = get_categories( array( 'taxonomy' => $category_slug ) );
41
+ foreach ( $terms as $term ) {
42
+ $items[ $term->term_id ] = $post_type_name . ' - ' . $term->name;
43
+ }
44
+ }
45
+
46
+ return $items;
47
+ }
48
+
49
+ public function is_settings_required() {
50
+ return true;
51
+ }
52
+
53
+ protected function _register_controls() {
54
+ $this->add_control(
55
+ 'key',
56
+ [
57
+ 'label' => __( 'Categories URL', 'auxin-elements' ),
58
+ 'type' => Controls_Manager::SELECT,
59
+ 'options' => $this->get_categories_list(),
60
+ 'default' => ''
61
+ ]
62
+ );
63
+ }
64
+
65
+ protected function get_category_url() {
66
+ if( $key = $this->get_settings( 'key' ) ){
67
+ return get_category_link( $key );
68
+ }
69
+
70
+ return '';
71
+ }
72
+
73
+ public function get_value( array $options = [] ) {
74
+ return $this->get_category_url();
75
+ }
76
+
77
+ public function render() {
78
+ echo $this->get_category_url();
79
+ }
80
+
81
+ }
includes/elementor/modules/templates-types-manager.php CHANGED
@@ -133,6 +133,18 @@ class Templates_Types_Manager {
133
  'group' => 'colors',
134
  'title' => 'Colors',
135
  ),
 
 
 
 
 
 
 
 
 
 
 
 
136
  // 'aux-post-date' => array(
137
  // 'file' => AUXELS_INC_DIR . '/elementor/modules/dynamic-tags/post-date.php',
138
  // 'class' => 'DynamicTags\Post_Date',
133
  'group' => 'colors',
134
  'title' => 'Colors',
135
  ),
136
+ 'aux-pages-url' => array(
137
+ 'file' => AUXELS_INC_DIR . '/elementor/modules/dynamic-tags/pages-url.php',
138
+ 'class' => 'DynamicTags\Auxin_Pages_Url',
139
+ 'group' => 'URL',
140
+ 'title' => 'URL',
141
+ ),
142
+ 'aux-cats-url' => array(
143
+ 'file' => AUXELS_INC_DIR . '/elementor/modules/dynamic-tags/taxonomies-url.php',
144
+ 'class' => 'DynamicTags\Auxin_Taxonomies_Url',
145
+ 'group' => 'URL',
146
+ 'title' => 'URL',
147
+ ),
148
  // 'aux-post-date' => array(
149
  // 'file' => AUXELS_INC_DIR . '/elementor/modules/dynamic-tags/post-date.php',
150
  // 'class' => 'DynamicTags\Post_Date',
includes/elementor/widgets/modern-button.php CHANGED
@@ -105,37 +105,75 @@ class ModernButton extends Widget_Base {
105
  $this->add_control(
106
  'label',
107
  [
108
- 'label' => __('Label','auxin-elements' ),
109
  'type' => Controls_Manager::TEXT,
110
- 'default' => __('Click Here','auxin-elements' ),
111
  ]
112
  );
113
 
114
  $this->add_control(
115
- 'link',
116
  [
117
- 'label' => __('Link','auxin-elements' ),
118
- 'type' => Controls_Manager::URL,
119
- 'placeholder' => 'https://your-link.com',
120
- 'show_external' => true,
121
- 'dynamic' => [
122
- 'active' => true
123
- ]
124
  ]
125
  );
126
 
127
  $this->add_control(
128
- 'open_video_in_lightbox',
129
- array(
130
- 'label' => __('Open Video in Lightbox','auxin-elements' ),
131
- 'type' => Controls_Manager::SWITCHER,
132
- 'label_on' => __( 'On', 'auxin-elements' ),
133
- 'label_off' => __( 'Off', 'auxin-elements' ),
134
- 'return_value' => 'yes',
135
- 'default' => ''
136
- )
137
  );
138
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
139
  $this->add_responsive_control(
140
  'btn_align',
141
  [
@@ -164,14 +202,30 @@ class ModernButton extends Widget_Base {
164
  );
165
 
166
  $this->add_control(
167
- 'icon_divider',
168
  [
169
- 'label' => __( 'Icon', 'auxin-elements' ),
170
- 'type' => Controls_Manager::HEADING,
171
- 'separator' => 'before'
 
 
 
 
172
  ]
173
  );
174
 
 
 
 
 
 
 
 
 
 
 
 
 
175
  $this->add_control(
176
  'icon_display',
177
  [
@@ -401,7 +455,7 @@ class ModernButton extends Widget_Base {
401
  $this->end_controls_section();
402
 
403
  /*-----------------------------------------------------------------------------------*/
404
- /* Text Style Section
405
  /*-----------------------------------------------------------------------------------*/
406
 
407
  $this->start_controls_section(
@@ -496,6 +550,231 @@ class ModernButton extends Widget_Base {
496
 
497
  $this->end_controls_section();
498
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
499
  /*-----------------------------------------------------------------------------------*/
500
  /* Button Style Section
501
  /*-----------------------------------------------------------------------------------*/
@@ -778,7 +1057,13 @@ class ModernButton extends Widget_Base {
778
  <?php Icons_Manager::render_icon( $settings['icon'], [ 'aria-hidden' => 'true' ] );?>
779
  </div>
780
  <?php };?>
781
- <div class="aux-text"><?php echo esc_html( $settings['label'] ); ?></div>
 
 
 
 
 
 
782
  </a>
783
  <?php
784
  if ( auxin_is_true( $settings['open_video_in_lightbox'] ) ) {
105
  $this->add_control(
106
  'label',
107
  [
108
+ 'label' => __('Text','auxin-elements' ),
109
  'type' => Controls_Manager::TEXT,
110
+ 'default' => __('Click Here','auxin-elements' )
111
  ]
112
  );
113
 
114
  $this->add_control(
115
+ 'label2',
116
  [
117
+ 'label' => __('Highlighted Text', 'auxin-elements' ),
118
+ 'type' => Controls_Manager::TEXT,
119
+ 'default' => __('','auxin-elements' )
 
 
 
 
120
  ]
121
  );
122
 
123
  $this->add_control(
124
+ 'label3',
125
+ [
126
+ 'label' => __('After Text', 'auxin-elements' ),
127
+ 'type' => Controls_Manager::TEXT,
128
+ 'default' => __('','auxin-elements' )
129
+ ]
 
 
 
130
  );
131
 
132
+ $this->add_control(
133
+ 'vertical_align',
134
+ [
135
+ 'label' => __( 'Text Vertical Align', 'auxin-elements' ),
136
+ 'type' => Controls_Manager::CHOOSE,
137
+ 'options' => [
138
+ 'top' => [
139
+ 'title' => __( 'Top', 'auxin-elements' ),
140
+ 'icon' => 'eicon-v-align-top',
141
+ ],
142
+ 'center' => [
143
+ 'title' => __( 'Center', 'auxin-elements' ),
144
+ 'icon' => 'eicon-v-align-middle',
145
+ ],
146
+ 'bottom' => [
147
+ 'title' => __( 'Bottom', 'auxin-elements' ),
148
+ 'icon' => 'eicon-v-align-bottom',
149
+ ],
150
+ ],
151
+ 'selectors' => [
152
+ '{{WRAPPER}} .aux-text' => 'display:flex; align-items:{{VALUE}};'
153
+ ],
154
+ 'selectors_dictionary' => [
155
+ 'top' => 'flex-start',
156
+ 'bottom' => 'flex-end'
157
+ ],
158
+ 'conditions' => [
159
+ 'relation' => 'or',
160
+ 'terms' => [
161
+ [
162
+ 'name' => 'label2',
163
+ 'operator' => '!==',
164
+ 'value' => ''
165
+ ],
166
+ [
167
+ 'name' => 'label3',
168
+ 'operator' => '!==',
169
+ 'value' => ''
170
+ ]
171
+ ]
172
+ ],
173
+ 'default' => ''
174
+ ]
175
+ );
176
+
177
  $this->add_responsive_control(
178
  'btn_align',
179
  [
202
  );
203
 
204
  $this->add_control(
205
+ 'link',
206
  [
207
+ 'label' => __('Link','auxin-elements' ),
208
+ 'type' => Controls_Manager::URL,
209
+ 'placeholder' => 'https://your-link.com',
210
+ 'show_external' => true,
211
+ 'dynamic' => [
212
+ 'active' => true
213
+ ]
214
  ]
215
  );
216
 
217
+ $this->add_control(
218
+ 'open_video_in_lightbox',
219
+ array(
220
+ 'label' => __('Open Video in Lightbox','auxin-elements' ),
221
+ 'type' => Controls_Manager::SWITCHER,
222
+ 'label_on' => __( 'On', 'auxin-elements' ),
223
+ 'label_off' => __( 'Off', 'auxin-elements' ),
224
+ 'return_value' => 'yes',
225
+ 'default' => ''
226
+ )
227
+ );
228
+
229
  $this->add_control(
230
  'icon_display',
231
  [
455
  $this->end_controls_section();
456
 
457
  /*-----------------------------------------------------------------------------------*/
458
+ /* Label Style Section
459
  /*-----------------------------------------------------------------------------------*/
460
 
461
  $this->start_controls_section(
550
 
551
  $this->end_controls_section();
552
 
553
+
554
+ /*-----------------------------------------------------------------------------------*/
555
+ /* Label Highlighted Style Section
556
+ /*-----------------------------------------------------------------------------------*/
557
+
558
+ $this->start_controls_section(
559
+ 'section_style_text2',
560
+ [
561
+ 'label' => __('Highlighted Text', 'auxin-elements' ),
562
+ 'tab' => Controls_Manager::TAB_STYLE,
563
+ 'condition' => [
564
+ 'label2!' => ''
565
+ ]
566
+ ]
567
+ );
568
+
569
+
570
+ $this->start_controls_tabs( 'text2_styles' );
571
+
572
+ $this->start_controls_tab(
573
+ 'text2_normal',
574
+ [
575
+ 'label' => __( 'Normal' , 'auxin-elements' )
576
+ ]
577
+ );
578
+
579
+ $this->add_group_control(
580
+ Group_Control_Typography::get_type(),
581
+ [
582
+ 'name' => 'text2_normal_typo',
583
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
584
+ 'selector' => '{{WRAPPER}} .aux-text-highlighted'
585
+ ]
586
+ );
587
+
588
+ $this->add_control(
589
+ 'text2_normal_color',
590
+ [
591
+ 'label' => __( 'Color', 'auxin-elements' ),
592
+ 'type' => Controls_Manager::COLOR,
593
+ 'selectors' => [
594
+ '{{WRAPPER}} .aux-text-highlighted' => 'color: {{VALUE}};'
595
+ ]
596
+ ]
597
+
598
+ );
599
+
600
+ $this->add_group_control(
601
+ Group_Control_Text_Shadow::get_type(),
602
+ [
603
+ 'name' => 'text2_normal_text_shadow',
604
+ 'label' => __( 'Text Shadow', 'auxin-elements' ),
605
+ 'selector' => '{{WRAPPER}} .aux-text-highlighted'
606
+ ]
607
+ );
608
+
609
+ $this->end_controls_tab();
610
+
611
+ $this->start_controls_tab(
612
+ 'text2_hover',
613
+ [
614
+ 'label' => __( 'Hover' , 'auxin-elements' )
615
+ ]
616
+ );
617
+
618
+ $this->add_group_control(
619
+ Group_Control_Typography::get_type(),
620
+ [
621
+ 'name' => 'text2_hover_typo',
622
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
623
+ 'selector' => '{{WRAPPER}} .aux-modern-button:hover .aux-text-highlighted'
624
+ ]
625
+ );
626
+
627
+ $this->add_control(
628
+ 'text2_hover_color',
629
+ [
630
+ 'label' => __( 'Color', 'auxin-elements' ),
631
+ 'type' => Controls_Manager::COLOR,
632
+ 'selectors' => [
633
+ '{{WRAPPER}} .aux-modern-button:hover .aux-text-highlighted' => 'color:{{VALUE}};'
634
+ ]
635
+ ]
636
+ );
637
+
638
+ $this->add_group_control(
639
+ Group_Control_Text_Shadow::get_type(),
640
+ [
641
+ 'name' => 'text2_hover_text_shadow',
642
+ 'label' => __( 'Text Shadow', 'auxin-elements' ),
643
+ 'selector' => '{{WRAPPER}} .aux-modern-button:hover .aux-text-highlighted'
644
+ ]
645
+ );
646
+
647
+ $this->end_controls_tab();
648
+
649
+ $this->end_controls_tabs();
650
+
651
+ $this->add_responsive_control(
652
+ 'text2_margin',
653
+ [
654
+ 'label' => __( 'Margin', 'auxin-elements' ),
655
+ 'type' => Controls_Manager::DIMENSIONS,
656
+ 'size_units' => [ 'px', 'em', '%' ],
657
+ 'selectors' => [
658
+ '{{WRAPPER}} .aux-text-highlighted' => 'margin:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
659
+ ],
660
+ 'separator' => 'before'
661
+ ]
662
+ );
663
+
664
+ $this->end_controls_section();
665
+
666
+ /*-----------------------------------------------------------------------------------*/
667
+ /* Label After Style Section
668
+ /*-----------------------------------------------------------------------------------*/
669
+
670
+ $this->start_controls_section(
671
+ 'section_style_text3',
672
+ [
673
+ 'label' => __('After Text', 'auxin-elements' ),
674
+ 'tab' => Controls_Manager::TAB_STYLE,
675
+ 'condition' => [
676
+ 'label3!' => ''
677
+ ]
678
+ ]
679
+ );
680
+
681
+
682
+ $this->start_controls_tabs( 'text3_styles' );
683
+
684
+ $this->start_controls_tab(
685
+ 'text3_normal',
686
+ [
687
+ 'label' => __( 'Normal' , 'auxin-elements' )
688
+ ]
689
+ );
690
+
691
+ $this->add_group_control(
692
+ Group_Control_Typography::get_type(),
693
+ [
694
+ 'name' => 'text3_normal_typo',
695
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
696
+ 'selector' =