Shortcodes and extra features for Phlox theme - Version 2.9.12

Version Description

Download this release

Release Info

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

Code changes from version 2.9.8 to 2.9.12

Files changed (123) hide show
  1. README.txt +2 -3
  2. admin/assets/js/plugins.js +1 -1
  3. admin/includes/admin-ajax.php +1 -1
  4. admin/includes/admin-hooks.php +0 -36
  5. admin/includes/admin-the-functions.php +4 -1
  6. admin/includes/classes/class-auxels-plugin-check-update.php +2 -2
  7. admin/includes/classes/class-auxels-system-check.php +1 -1
  8. admin/includes/classes/class-auxin-license-activation.php +2 -2
  9. admin/includes/classes/class-auxin-notices.php +5 -5
  10. admin/includes/classes/class-auxin-upgrader-ajax-handlers.php +1 -1
  11. admin/includes/classes/class-auxin-upgrader-http-api.php +0 -126
  12. admin/includes/classes/class-auxin-upgrader-plugin.php +2 -8
  13. admin/includes/classes/class-auxin-upgrader-prepare.php +10 -103
  14. admin/includes/classes/class-auxin-upgrader-theme.php +3 -8
  15. admin/includes/compatibility/siteorigin/fields/colorpicker.class.php +0 -22
  16. admin/includes/compatibility/siteorigin/fields/iconpicker.class.php +0 -31
  17. admin/includes/compatibility/siteorigin/fields/select2-multiple.class.php +0 -33
  18. admin/includes/compatibility/siteorigin/fields/visualselect.class.php +0 -31
  19. admin/includes/compatibility/woocommerce/wc.php +1 -1
  20. admin/includes/metaboxes/metabox-fields-general-custom-logo.php +2 -2
  21. auxin-elements.php +1 -1
  22. includes/classes/class-auxels-admin-assets.php +1 -1
  23. includes/classes/class-auxels-archive-menu-links.php +3 -3
  24. includes/classes/class-auxels-envato-elements.php +2 -2
  25. includes/classes/class-auxels-import-parser.php +25 -25
  26. includes/classes/class-auxels-import.php +4 -4
  27. includes/classes/class-auxels-search-post-type.php +1 -1
  28. includes/classes/class-auxin-admin-dashboard.php +1 -1
  29. includes/classes/class-auxin-demo-importer.php +46 -75
  30. includes/classes/class-auxin-dependency-sorting.php +1 -1
  31. includes/classes/class-auxin-import.php +9 -9
  32. includes/classes/class-auxin-install.php +1 -1
  33. includes/classes/class-auxin-master-nav-menu-admin.php +2 -2
  34. includes/classes/class-auxin-permalink.php +5 -5
  35. includes/classes/class-auxin-plugin-requirements.php +6 -6
  36. includes/classes/class-auxin-post-type-base.php +2 -2
  37. includes/classes/class-auxin-siteorigin-widget.php +0 -246
  38. includes/classes/class-auxin-svg-support.php +5 -5
  39. includes/classes/class-auxin-walker-nav-menu-back.php +34 -37
  40. includes/classes/class-auxin-welcome-sections.php +38 -38
  41. includes/classes/class-auxin-welcome.php +68 -68
  42. includes/classes/class-auxin-whitelabel.php +2 -2
  43. includes/classes/class-auxin-widget-indie.php +6 -6
  44. includes/classes/class-auxin-widget-shortcode-map.php +1 -92
  45. includes/classes/class-auxin-widget.php +80 -84
  46. includes/define.php +1 -1
  47. includes/elementor/class-auxin-elementor-core-elements.php +3 -3
  48. includes/elementor/controls/featured-color.php +1 -1
  49. includes/elementor/controls/icon-select.php +2 -2
  50. includes/elementor/controls/media-select.php +4 -2
  51. includes/elementor/controls/visual-select.php +1 -1
  52. includes/elementor/modules/column.php +1 -1
  53. includes/elementor/modules/common.php +1 -1
  54. includes/elementor/modules/dynamic-tags/featured-colors.php +1 -1
  55. includes/elementor/modules/dynamic-tags/shortcode.php +1 -1
  56. includes/elementor/modules/query-control/module.php +1 -1
  57. includes/elementor/modules/section.php +1 -1
  58. includes/elementor/modules/settings/base/manager.php +1 -1
  59. includes/elementor/modules/theme-builder/module.php +7 -7
  60. includes/elementor/widgets/before-after.php +3 -3
  61. includes/elementor/widgets/heading-modern.php +15 -15
  62. includes/elementor/widgets/icon.php +2 -2
  63. includes/elementor/widgets/recent-comments.php +8 -8
  64. includes/elementor/widgets/responsive-table.php +1 -1
  65. includes/elementor/widgets/theme-elements/logo.php +11 -13
  66. includes/elementor/widgets/theme-elements/menu.php +12 -12
  67. includes/elementor/widgets/theme-elements/modern-search.php +5 -7
  68. includes/elementor/widgets/theme-elements/select.php +6 -6
  69. includes/elementor/widgets/theme-elements/site-title.php +5 -11
  70. includes/elements/about-widget.php +6 -7
  71. includes/elements/accordion-widget.php +0 -2
  72. includes/elements/accordion.php +0 -2
  73. includes/elements/audio.php +3 -4
  74. includes/elements/before-after.php +6 -7
  75. includes/elements/button.php +0 -1
  76. includes/elements/code.php +6 -7
  77. includes/elements/contact-box.php +5 -5
  78. includes/elements/contact-form.php +8 -9
  79. includes/elements/custom-list.php +0 -2
  80. includes/elements/divider.php +0 -1
  81. includes/elements/dropcap.php +5 -6
  82. includes/elements/facebook.php +0 -1
  83. includes/elements/flickr.php +0 -1
  84. includes/elements/gallery.php +5 -6
  85. includes/elements/gmap.php +3 -3
  86. includes/elements/highlight.php +1 -2
  87. includes/elements/image.php +9 -10
  88. includes/elements/instagram-feed.php +3 -4
  89. includes/elements/latest-items.php +7 -7
  90. includes/elements/latest-posts-slider.php +6 -7
  91. includes/elements/popular-posts-widget.php +0 -1
  92. includes/elements/quote.php +6 -7
  93. includes/elements/recent-posts-grid-carousel.php +6 -7
  94. includes/elements/recent-posts-land-style.php +5 -6
  95. includes/elements/recent-posts-masonry.php +5 -6
  96. includes/elements/recent-posts-tiles-carousel.php +6 -7
  97. includes/elements/recent-posts-tiles.php +5 -6
  98. includes/elements/recent-posts-timeline.php +5 -6
  99. includes/elements/recent-posts-widget.php +0 -1
  100. includes/elements/recent-products.php +6 -7
  101. includes/elements/sample-element.php +6 -7
  102. includes/elements/search.php +3 -4
  103. includes/elements/socials-list.php +6 -8
  104. includes/elements/staff.php +7 -8
  105. includes/elements/tab-widget.php +0 -2
  106. includes/elements/tabs.php +4 -6
  107. includes/elements/testimonial.php +7 -9
  108. includes/elements/text.php +11 -13
  109. includes/elements/touch-slider.php +5 -6
  110. includes/elements/video.php +3 -3
  111. includes/general-functions.php +0 -19
  112. includes/general-hooks.php +0 -53
  113. includes/index.php +2 -3
  114. languages/auxin-elements-fa_IR.po +1582 -1603
  115. languages/auxin-elements.pot +1582 -1603
  116. phpcs.xml +141 -0
  117. public/assets/js/plugins.js +1 -1
  118. public/class-auxels.php +2 -2
  119. public/includes/class-auxels-frontend-assets.php +1 -1
  120. public/includes/frontend-ajax.php +1 -1
  121. public/templates/vcomposer/vc_raw_html.php +1 -1
  122. public/templates/vcomposer/vc_row.php +1 -1
  123. public/templates/woocommerce/recent-products.php +1 -1
README.txt CHANGED
@@ -3,11 +3,11 @@ Contributors: averta, averta_support
3
  Donate link: http://phlox.pro/go/?utm_medium=donate-phlox&ref=averta&utm_source=wporg-auxin-elements
4
  License: GPLv3
5
  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: 6.0.0
10
- Stable tag: 2.9.8
11
  License: GPLv3
12
  License URI: http://www.gnu.org/licenses/gpl.html
13
 
@@ -25,7 +25,6 @@ This plugin adds plenty of premium functionalities to Phlox theme, such as one-c
25
 
26
  = Features =
27
  * Elementor Page builder support (27 Exclusive Elements)
28
- * Siteorigin Page builder support (27 Exclusive Elements)
29
  * Page builder Elements
30
  * 31 Exclusive Shortcodes
31
  * Auxin Widgets
3
  Donate link: http://phlox.pro/go/?utm_medium=donate-phlox&ref=averta&utm_source=wporg-auxin-elements
4
  License: GPLv3
5
  License URI: http://www.gnu.org/licenses/gpl.html
6
+ Tags: phlox, gallery, elementor, 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: 6.0.0
10
+ Stable tag: 2.9.12
11
  License: GPLv3
12
  License URI: http://www.gnu.org/licenses/gpl.html
13
 
25
 
26
  = Features =
27
  * Elementor Page builder support (27 Exclusive Elements)
 
28
  * Page builder Elements
29
  * 31 Exclusive Shortcodes
30
  * Auxin Widgets
admin/assets/js/plugins.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! Phlox Core Plugin - v2.9.8 (2022-06)
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.9.12 (2022-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/includes/admin-ajax.php CHANGED
@@ -53,7 +53,7 @@ function auxin_ajax_send_feedback(){
53
 
54
  // send the feedback via email
55
  $message = 'Rate: '. $rate . "\r\n" . 'Email: <' . $email . ">\r\n\r\n" . $feedback;
56
- wp_mail( 'feedbacks'.'@'.'averta.net', 'Feedback from phlox dashboard:', $message );
57
 
58
  wp_send_json_success( __( 'Sent Successfully. Thanks for your feedback!', 'auxin-elements' ) );
59
 
53
 
54
  // send the feedback via email
55
  $message = 'Rate: '. $rate . "\r\n" . 'Email: <' . $email . ">\r\n\r\n" . $feedback;
56
+ wp_mail( 'feedbacks@averta.net', 'Feedback from phlox dashboard:', $message );
57
 
58
  wp_send_json_success( __( 'Sent Successfully. Thanks for your feedback!', 'auxin-elements' ) );
59
 
admin/includes/admin-hooks.php CHANGED
@@ -383,27 +383,6 @@ function auxels_add_page_metabox_models( $models ){
383
 
384
  add_filter( 'auxin_admin_metabox_models_page', 'auxels_add_page_metabox_models' );
385
 
386
- /*-----------------------------------------------------------------------------------*/
387
- /* Add theme tab in siteorigin page builder
388
- /*-----------------------------------------------------------------------------------*/
389
-
390
- function auxin_add_widget_tabs($tabs) {
391
- $tabs[] = array(
392
- 'title' => THEME_NAME,
393
- 'filter' => array(
394
- 'groups' => array('auxin')
395
- )
396
- );
397
-
398
- if (isset($tabs['recommended'])){
399
- unset($tabs['recommended']);
400
- }
401
-
402
-
403
- return $tabs;
404
- }
405
- add_filter( 'siteorigin_panels_widget_dialog_tabs', 'auxin_add_widget_tabs', 20 );
406
-
407
  // =============================================================================
408
 
409
  function auxin_admin_footer_text( $footer_text ) {
@@ -598,21 +577,6 @@ function auxels_after_plugin_update(){
598
  add_action( 'admin_init', 'auxels_after_plugin_update', 9 );
599
 
600
 
601
-
602
- add_action( 'admin_init', function(){
603
-
604
- $plugin_update_check = new AUXELS_Plugin_Check_Update (
605
- AUXELS_VERSION, // current version
606
- 'http://api.averta.net/envato/items/', // update path
607
- AUXELS_BASE_NAME, // plugin file slug
608
- 'auxin-elements', // plugin slug
609
- 'auxin-elements', // item request name
610
- AUXELS_DIR . '/auxin-elements.php' // plugin file
611
- );
612
-
613
- $plugin_update_check->plugin_id = '1238506';
614
- } );
615
-
616
  /**
617
  * Disable the query monitor on vc frontend editor
618
  *
383
 
384
  add_filter( 'auxin_admin_metabox_models_page', 'auxels_add_page_metabox_models' );
385
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
386
  // =============================================================================
387
 
388
  function auxin_admin_footer_text( $footer_text ) {
577
  add_action( 'admin_init', 'auxels_after_plugin_update', 9 );
578
 
579
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
580
  /**
581
  * Disable the query monitor on vc frontend editor
582
  *
admin/includes/admin-the-functions.php CHANGED
@@ -183,6 +183,7 @@ if ( ! function_exists('auxin_template_importer') ) {
183
  ]
184
  ];
185
 
 
186
  if ( is_numeric( $template_ID ) ) {
187
  // Get All Templates data
188
  $templates_data = Auxin_Welcome::get_instance()->get_demo_list('templates');
@@ -308,7 +309,9 @@ if ( ! function_exists('auxin_template_importer') ) {
308
  update_post_meta( $post_id, '_elementor_template_type', $template_type );
309
  }
310
 
311
- auxin_set_transient( $template_imported_id_key, $post_id, MONTH_IN_SECONDS );
 
 
312
 
313
  // Force to generate CSS file for this template
314
  Auxin_Demo_Importer::get_instance()->maybe_flush_post( $post_id );
183
  ]
184
  ];
185
 
186
+ $template_imported_id_key = false;
187
  if ( is_numeric( $template_ID ) ) {
188
  // Get All Templates data
189
  $templates_data = Auxin_Welcome::get_instance()->get_demo_list('templates');
309
  update_post_meta( $post_id, '_elementor_template_type', $template_type );
310
  }
311
 
312
+ if ( $template_imported_id_key ) {
313
+ auxin_set_transient( $template_imported_id_key, $post_id, MONTH_IN_SECONDS );
314
+ }
315
 
316
  // Force to generate CSS file for this template
317
  Auxin_Demo_Importer::get_instance()->maybe_flush_post( $post_id );
admin/includes/classes/class-auxels-plugin-check-update.php CHANGED
@@ -73,7 +73,7 @@ class AUXELS_Plugin_Check_Update {
73
  * @param string $plugin_slug
74
  * @param string $slug
75
  */
76
- function __construct( $current_version, $update_path, $plugin_slug, $slug, $item_request_name = '' ) {
77
  // Set the class public variables
78
  $this->current_version = $current_version;
79
  $this->update_path = $update_path;
@@ -83,7 +83,7 @@ class AUXELS_Plugin_Check_Update {
83
  $this->request_name = empty( $item_request_name ) ? $this->slug : $item_request_name;
84
 
85
  // define the alternative API for checking for updates
86
- add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update') );
87
  }
88
 
89
 
73
  * @param string $plugin_slug
74
  * @param string $slug
75
  */
76
+ public function __construct( $current_version, $update_path, $plugin_slug, $slug, $item_request_name = '' ) {
77
  // Set the class public variables
78
  $this->current_version = $current_version;
79
  $this->update_path = $update_path;
83
  $this->request_name = empty( $item_request_name ) ? $this->slug : $item_request_name;
84
 
85
  // define the alternative API for checking for updates
86
+ add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ) );
87
  }
88
 
89
 
admin/includes/classes/class-auxels-system-check.php CHANGED
@@ -8,7 +8,7 @@ class Auxels_System_Check {
8
  */
9
  protected static $instance = null;
10
 
11
- function __construct(){
12
  add_filter( 'site_status_tests', array( $this, 'auxin_system_status_check' ) );
13
  }
14
 
8
  */
9
  protected static $instance = null;
10
 
11
+ public function __construct(){
12
  add_filter( 'site_status_tests', array( $this, 'auxin_system_status_check' ) );
13
  }
14
 
admin/includes/classes/class-auxin-license-activation.php CHANGED
@@ -22,7 +22,7 @@ class Auxin_License_Activation {
22
  protected $action = 'activate';
23
 
24
 
25
- function __construct(){
26
  $this->option_prefix = AUXELS_PURCHASE_KEY;
27
  }
28
 
@@ -56,7 +56,7 @@ class Auxin_License_Activation {
56
 
57
  global $wp_version;
58
 
59
- $action = ( 'activate' === $this->action ) ? 'activate': 'deactivate';
60
  $token = $this->get_license_info( 'token' );
61
 
62
  $args = array(
22
  protected $action = 'activate';
23
 
24
 
25
+ public function __construct(){
26
  $this->option_prefix = AUXELS_PURCHASE_KEY;
27
  }
28
 
56
 
57
  global $wp_version;
58
 
59
+ $action = ( 'activate' === $this->action ) ? 'activate' : 'deactivate';
60
  $token = $this->get_license_info( 'token' );
61
 
62
  $args = array(
admin/includes/classes/class-auxin-notices.php CHANGED
@@ -7,9 +7,9 @@ class Auxin_Notices{
7
  protected $args = array();
8
  protected $buttons = '';
9
 
10
- function __construct( $args = array() ){
11
  $defaults = array(
12
- 'id' => NULL,
13
  'title' => '',
14
  'skin' => 'default',
15
  'image' => '',
@@ -183,7 +183,7 @@ class Auxin_Notices{
183
  if( $this->args['has_close'] ){
184
  ?>
185
  <a href="<?php echo esc_url( $this->get_nonce_url() ); ?>" class="notice-dismiss aux-skip-notice aux-close-notice">
186
- <span class="screen-reader-text"><?php echo _e( 'Skip', 'auxin-elements' ); ?></span>
187
  </a>
188
  <?php } ?>
189
  <script>
@@ -219,7 +219,7 @@ class Auxin_Notices{
219
  private function flush_dismissible(){
220
  if ( isset( $_GET[ $this->args['dismissible']['url_key'] ] ) && isset( $_GET[ '_notice_nonce' ] ) && $_GET[ $this->args['dismissible']['url_key'] ] === $this->args['id'] ) {
221
  if ( ! wp_verify_nonce( $_GET[ '_notice_nonce' ], $this->args['dismissible']['action'] ) ) {
222
- wp_die( __( 'Authorization failed. Please refresh the page and try again.', 'auxin-elements' ) );
223
  }
224
  auxin_set_transient( $this->get_transient_key(), 1, $this->args['dismissible']['expiration'] );
225
  $this->args['dismissible'] = false;
@@ -333,7 +333,7 @@ class Auxin_Notices{
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(),
7
  protected $args = array();
8
  protected $buttons = '';
9
 
10
+ public function __construct( $args = array() ){
11
  $defaults = array(
12
+ 'id' => null,
13
  'title' => '',
14
  'skin' => 'default',
15
  'image' => '',
183
  if( $this->args['has_close'] ){
184
  ?>
185
  <a href="<?php echo esc_url( $this->get_nonce_url() ); ?>" class="notice-dismiss aux-skip-notice aux-close-notice">
186
+ <span class="screen-reader-text"><?php echo esc_html__( 'Skip', 'auxin-elements' ); ?></span>
187
  </a>
188
  <?php } ?>
189
  <script>
219
  private function flush_dismissible(){
220
  if ( isset( $_GET[ $this->args['dismissible']['url_key'] ] ) && isset( $_GET[ '_notice_nonce' ] ) && $_GET[ $this->args['dismissible']['url_key'] ] === $this->args['id'] ) {
221
  if ( ! wp_verify_nonce( $_GET[ '_notice_nonce' ], $this->args['dismissible']['action'] ) ) {
222
+ wp_die( esc_html__( 'Authorization failed. Please refresh the page and try again.', 'auxin-elements' ) );
223
  }
224
  auxin_set_transient( $this->get_transient_key(), 1, $this->args['dismissible']['expiration'] );
225
  $this->args['dismissible'] = false;
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
+ esc_attr( $updated ),
337
  $this->get_unique_class(),
338
  $this->get_skin(),
339
  $this->get_custom_styles(),
admin/includes/classes/class-auxin-upgrader-ajax-handlers.php CHANGED
@@ -4,7 +4,7 @@ class Auxin_Upgrader_Ajax_Handlers {
4
 
5
  protected $skin;
6
 
7
- function __construct(){
8
  // Include upgrader class
9
  include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
10
  $this->skin = new WP_Ajax_Upgrader_Skin();
4
 
5
  protected $skin;
6
 
7
+ public function __construct(){
8
  // Include upgrader class
9
  include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
10
  $this->skin = new WP_Ajax_Upgrader_Skin();
admin/includes/classes/class-auxin-upgrader-http-api.php DELETED
@@ -1,126 +0,0 @@
1
- <?php
2
-
3
- class Auxin_Upgrader_Http_Api {
4
-
5
- protected $api = 'http://api.averta.net/envato/items/';
6
-
7
- function __construct(){}
8
-
9
- /**
10
- * Get single setting value
11
- *
12
- * @param string $option
13
- * @param string $section
14
- * @param string $default
15
- * @return string
16
- */
17
- private function get_setting( $option, $section, $default = '' ) {
18
- $options = get_site_option( $section );
19
-
20
- if ( isset( $options[$option] ) ) {
21
- return $options[$option];
22
- }
23
- return $default;
24
- }
25
-
26
- /**
27
- * Make a wordpress remote post request on averta API
28
- *
29
- * @param array $args
30
- * @return void
31
- */
32
- private function remote_post( $args ){
33
- global $wp_version;
34
-
35
- $request_string = array(
36
- 'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo('url'),
37
- 'timeout' => ( ( defined('DOING_CRON') && DOING_CRON ) ? 30: 3),
38
- 'body' => $args
39
- );
40
-
41
- // Start checking for an update
42
- $request = wp_remote_post( $this->api, $request_string );
43
-
44
- if ( is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) !== 200 ) {
45
- return false;
46
- }
47
-
48
- return $request;
49
- }
50
-
51
- /**
52
- * Get our non official items list
53
- *
54
- * @return array
55
- */
56
- private function get_non_official_items(){
57
- return apply_filters( 'auxin_set_non_official_items', array(
58
- '3909293' => 'phlox-pro',
59
- '3909293-03' => 'auxin-shop',
60
- '3909293-04' => 'auxin-the-news',
61
- '3909293-05' => 'auxin-pro-tools',
62
- '3909293-06' => 'masterslider-wp',
63
- '3909293-07' => 'js_composer',
64
- '3909293-08' => 'bdthemes-element-pack',
65
- '3909293-09' => 'Ultimate_VC_Addons',
66
- '3909293-10' => 'waspthemes-yellow-pencil',
67
- '3909293-11' => 'LayerSlider',
68
- '3909293-12' => 'revslider',
69
- '3909293-13' => 'go_pricing',
70
- '3909293-14' => 'convertplug'
71
- ) );
72
- }
73
-
74
- /**
75
- * Get download link from averta API
76
- *
77
- * @return void
78
- */
79
- public function get_download_link( $key ){
80
-
81
- $token = $this->get_setting( 'token' , AUXELS_PURCHASE_KEY );
82
- $token = empty( $token ) ? $this->get_setting( 'token' , THEME_ID . '_license' ) : $token;
83
-
84
- if( empty( $token ) ) {
85
- return new WP_Error( 'no_credentials',
86
- __( 'Envato username, API key and your item purchase code are required for downloading updates from Envato marketplace.', 'auxin-elements' )
87
- );
88
- }
89
-
90
- $items = $this->get_non_official_items();
91
-
92
- if( ! in_array( $key, $items ) ) {
93
- return new WP_Error( 'no_credentials',
94
- '"' . $key . '" ' . __( 'Is not exist in our non official list. ', 'auxin-elements' )
95
- );
96
- }
97
- $item_ID = array_search( $key, $items );
98
-
99
- $request = $this->remote_post( array(
100
- 'cat' => 'download-purchase',
101
- 'action' => 'token',
102
- 'item-id' => $item_ID,
103
- 'token' => $token,
104
- 'url' => get_site_url()
105
- ) );
106
-
107
- if( $request === false ){
108
- return new WP_Error( 'process_faild',
109
- __( 'Error in getting download link.', 'auxin-elements' )
110
- );
111
- }
112
-
113
- $response = wp_remote_retrieve_body( $request );
114
- $response = json_decode( $response, true );
115
-
116
- if( ! isset( $response['download_url'] ) || empty( $response['download_url'] ) ) {
117
- // Envato API error ..
118
- return new WP_Error( 'no_credentials',
119
- __( 'Error on connecting to download API...', 'auxin-elements' )
120
- );
121
- }
122
-
123
- return $response['download_url'];
124
- }
125
-
126
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/includes/classes/class-auxin-upgrader-plugin.php CHANGED
@@ -55,7 +55,6 @@ class Auxin_Upgrader_Plugin extends Plugin_Upgrader {
55
  $this->maintenance_mode(true);
56
 
57
  $results = array();
58
- $api_request = new Auxin_Upgrader_Http_Api;
59
 
60
  $this->update_count = count($plugins);
61
  $this->update_current = 0;
@@ -82,13 +81,8 @@ class Auxin_Upgrader_Plugin extends Plugin_Upgrader {
82
 
83
  $this->skin->plugin_active = is_plugin_active($plugin);
84
 
85
- if( ! wp_http_validate_url( $r['package'] ) && $r['package'] == 'AUXIN_GET_DOWNLOAD_URL' ){
86
- $r['slug'] = ( $r['slug'] == 'masterslider' ) ? 'masterslider-wp' : $r['slug'];
87
- $downlaod_link = $api_request->get_download_link( $r['slug'] );
88
- if( ! is_wp_error( $downlaod_link ) ){
89
- $r['package'] = $downlaod_link;
90
- }
91
- }
92
 
93
  $result = $this->run( array(
94
  'package' => $r['package'],
55
  $this->maintenance_mode(true);
56
 
57
  $results = array();
 
58
 
59
  $this->update_count = count($plugins);
60
  $this->update_current = 0;
81
 
82
  $this->skin->plugin_active = is_plugin_active($plugin);
83
 
84
+
85
+ $r = apply_filters( 'auxin_modify_package_before_upgrade', $r );
 
 
 
 
 
86
 
87
  $result = $this->run( array(
88
  'package' => $r['package'],
admin/includes/classes/class-auxin-upgrader-prepare.php CHANGED
@@ -12,12 +12,10 @@ class Auxin_Upgrader_Prepare {
12
  'plugins' => 'update_plugins',
13
  'themes' => 'update_themes'
14
  );
15
- protected $api = 'http://api.averta.net/envato/items/';
16
 
17
- function __construct(){
18
  add_filter( 'site_transient_update_plugins', array( $this, 'disable_update_plugins' ) );
19
  add_filter( 'site_transient_update_themes', array( $this, 'disable_update_themes' ) );
20
- add_filter ( 'pre_set_site_transient_update_themes', [ $this, 'pre_set_transient_update_theme' ] );
21
 
22
  add_action( 'load-plugins.php', array( $this, 'update_plugins' ) );
23
  add_action( 'load-update.php', array( $this, 'update_plugins' ) );
@@ -42,9 +40,9 @@ class Auxin_Upgrader_Prepare {
42
  $plugins = apply_filters( 'auxin_disable_plugins_updates', array() );
43
  if ( isset($transient) && is_object($transient) && ! empty( $plugins ) ) {
44
  foreach ( $plugins as $key => $plugin ) {
45
- $pluginPath = $plugin . '/' . $plugin . '.php';
46
- if ( isset( $transient->response[$pluginPath] ) ) {
47
- unset( $transient->response[$pluginPath] );
48
  }
49
  }
50
  }
@@ -61,8 +59,8 @@ class Auxin_Upgrader_Prepare {
61
  $themes = apply_filters( 'auxin_disable_themes_updates', array() );
62
  if ( isset($transient) && is_object($transient) && ! empty( $themes ) ) {
63
  foreach ( $themes as $theme ) {
64
- if ( isset( $transient->response[$theme] ) ) {
65
- unset( $transient->response[$theme] );
66
  }
67
  }
68
  }
@@ -165,25 +163,12 @@ class Auxin_Upgrader_Prepare {
165
  );
166
  }
167
  }
168
- } else {
169
- // Get version number of our api
170
- $new_version = $this->remote_get( array(
171
- 'cat' => 'version-check',
172
- 'action' => 'final',
173
- 'item-name' => sanitize_key( $slug )
174
- ) );
175
-
176
- if( ! empty( $new_version ) && version_compare( $new_version, $data->get( 'Version' ), '>' ) ){
177
- $new_option->response[ $data->get_stylesheet() ] = array(
178
- 'slug' => esc_sql($slug),
179
- 'version' => esc_sql($new_version),
180
- 'package' => 'AUXIN_GET_DOWNLOAD_URL'
181
- );
182
- }
183
  }
184
 
185
  }
186
 
 
 
187
  auxin_set_transient( 'auxin_update_themes', $new_option );
188
  }
189
 
@@ -282,24 +267,11 @@ class Auxin_Upgrader_Prepare {
282
  );
283
  }
284
  }
285
- } else {
286
- // Get version number of our api
287
- $new_version = $this->remote_get( array(
288
- 'cat' => 'version-check',
289
- 'action' => 'final',
290
- 'item-name' => sanitize_key( $slug )
291
- ) );
292
-
293
- if( ! empty( $new_version ) && version_compare( $new_version, $data['Version'], '>' ) ){
294
- $new_option->response[ $path ] = array(
295
- 'slug' => esc_sql($slug),
296
- 'version' => esc_sql($new_version),
297
- 'package' => 'AUXIN_GET_DOWNLOAD_URL'
298
- );
299
- }
300
  }
301
  }
302
 
 
 
303
  auxin_set_transient( 'auxin_update_plugins', $new_option );
304
  }
305
 
@@ -396,27 +368,6 @@ class Auxin_Upgrader_Prepare {
396
  return false;
397
  }
398
 
399
- /**
400
- * General remote get function
401
- *
402
- * @param array $request_args
403
- * @return void
404
- */
405
- public function remote_get( $request_args ){
406
- $url = add_query_arg(
407
- $request_args,
408
- $this->api
409
- );
410
-
411
- $request = wp_remote_get( $url );
412
-
413
- if ( is_wp_error( $request ) ) {
414
- return false;
415
- }
416
-
417
- return wp_remote_retrieve_body( $request );
418
- }
419
-
420
  /**
421
  * Check the last time upgrades were run before checking plugin versions.
422
  *
@@ -459,48 +410,4 @@ class Auxin_Upgrader_Prepare {
459
  return self::$instance;
460
  }
461
 
462
- /**
463
- * Upgrade theme through wordpress built in upgrader system
464
- *
465
- * @param object $transient
466
- * @return object $transient
467
- */
468
- function pre_set_transient_update_theme( $transient ) {
469
-
470
- if( empty( $transient->checked ) ) {
471
- return $transient;
472
- }
473
-
474
- $get_themes = $this->get_themes();
475
- $api_request = new Auxin_Upgrader_Http_Api;
476
- foreach ( $get_themes as $slug => $data ) {
477
-
478
- if( !$data->isOfficial ) {
479
-
480
- // Get version number of our api
481
- $new_version = $this->remote_get( array(
482
- 'cat' => 'version-check',
483
- 'action' => 'final',
484
- 'item-name' => sanitize_key( $slug )
485
- ) );
486
-
487
- if( ! empty( $new_version ) && version_compare( $new_version, $data->get( 'Version' ), '>' ) ){
488
- $downlaod_link = $api_request->get_download_link( $slug );
489
- if( is_wp_error( $downlaod_link ) ){
490
- continue;
491
- }
492
- $transient->response[ $data->get_stylesheet() ] = array(
493
- 'slug' => esc_sql($slug),
494
- 'version' => $data->get( 'Version' ),
495
- 'new_version' => esc_sql($new_version),
496
- 'package' => $downlaod_link
497
- );
498
- }
499
- }
500
-
501
- }
502
-
503
- return $transient;
504
- }
505
-
506
  }
12
  'plugins' => 'update_plugins',
13
  'themes' => 'update_themes'
14
  );
 
15
 
16
+ public function __construct(){
17
  add_filter( 'site_transient_update_plugins', array( $this, 'disable_update_plugins' ) );
18
  add_filter( 'site_transient_update_themes', array( $this, 'disable_update_themes' ) );
 
19
 
20
  add_action( 'load-plugins.php', array( $this, 'update_plugins' ) );
21
  add_action( 'load-update.php', array( $this, 'update_plugins' ) );
40
  $plugins = apply_filters( 'auxin_disable_plugins_updates', array() );
41
  if ( isset($transient) && is_object($transient) && ! empty( $plugins ) ) {
42
  foreach ( $plugins as $key => $plugin ) {
43
+ $plugin_path = $plugin . '/' . $plugin . '.php';
44
+ if ( isset( $transient->response[$plugin_path] ) ) {
45
+ unset( $transient->response[$plugin_path] );
46
  }
47
  }
48
  }
59
  $themes = apply_filters( 'auxin_disable_themes_updates', array() );
60
  if ( isset($transient) && is_object($transient) && ! empty( $themes ) ) {
61
  foreach ( $themes as $theme ) {
62
+ if ( isset( $transient->response[ $theme ] ) ) {
63
+ unset( $transient->response[ $theme ] );
64
  }
65
  }
66
  }
163
  );
164
  }
165
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
166
  }
167
 
168
  }
169
 
170
+ $new_option = apply_filters( 'auxin_before_setting_update_themes_transient', $new_option, $get_themes );
171
+
172
  auxin_set_transient( 'auxin_update_themes', $new_option );
173
  }
174
 
267
  );
268
  }
269
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
270
  }
271
  }
272
 
273
+ $new_option = apply_filters( 'auxin_before_setting_update_plugins_transient', $new_option, $get_plugins );
274
+
275
  auxin_set_transient( 'auxin_update_plugins', $new_option );
276
  }
277
 
368
  return false;
369
  }
370
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
371
  /**
372
  * Check the last time upgrades were run before checking plugin versions.
373
  *
410
  return self::$instance;
411
  }
412
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
413
  }
admin/includes/classes/class-auxin-upgrader-theme.php CHANGED
@@ -55,7 +55,6 @@ class Auxin_Upgrader_Theme extends Theme_Upgrader {
55
  $this->maintenance_mode(true);
56
 
57
  $results = array();
58
- $api_request = new Auxin_Upgrader_Http_Api;
59
 
60
  $this->update_count = count($themes);
61
  $this->update_current = 0;
@@ -69,19 +68,15 @@ class Auxin_Upgrader_Theme extends Theme_Upgrader {
69
  $this->skin->before();
70
  $this->skin->feedback( 'up_to_date' );
71
  $this->skin->after();
72
- $results[$theme] = true;
73
  continue;
74
  }
75
 
76
  // Get the URL to the zip file
77
  $r = $this->update_list->response[ $theme ];
78
 
79
- if( ! wp_http_validate_url( $r['package'] ) && $r['package'] == 'AUXIN_GET_DOWNLOAD_URL' ){
80
- $downlaod_link = $api_request->get_download_link( $r['slug'] );
81
- if( ! is_wp_error( $downlaod_link ) ){
82
- $r['package'] = $downlaod_link;
83
- }
84
- }
85
 
86
  $result = $this->run( array(
87
  'package' => $r['package'],
55
  $this->maintenance_mode(true);
56
 
57
  $results = array();
 
58
 
59
  $this->update_count = count($themes);
60
  $this->update_current = 0;
68
  $this->skin->before();
69
  $this->skin->feedback( 'up_to_date' );
70
  $this->skin->after();
71
+ $results[ $theme ] = true;
72
  continue;
73
  }
74
 
75
  // Get the URL to the zip file
76
  $r = $this->update_list->response[ $theme ];
77
 
78
+ $r = apply_filters( 'auxin_modify_package_before_upgrade', $r );
79
+
 
 
 
 
80
 
81
  $result = $this->run( array(
82
  'package' => $r['package'],
admin/includes/compatibility/siteorigin/fields/colorpicker.class.php DELETED
@@ -1,22 +0,0 @@
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/compatibility/siteorigin/fields/iconpicker.class.php DELETED
@@ -1,31 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class Auxin_SiteOrigin_Field_Iconpicker
5
- */
6
- class Auxin_SiteOrigin_Field_Iconpicker extends SiteOrigin_Widget_Field_Base {
7
-
8
- protected function render_field( $value, $instance ) {
9
-
10
- $font_icons = Auxin()->Font_Icons->get_icons_list('fontastic');
11
- $output = '<div class="aux-element-field aux-iconpicker">';
12
- $output .= sprintf( '<select name="%1$s" id="%1$s" class="aux-fonticonpicker aux-select" >', $this->element_name );
13
- $output .= '<option value="">' . __('Choose ..', 'auxin-elements') . '</option>';
14
-
15
- if( is_array( $font_icons ) ){
16
- foreach ( $font_icons as $icon ) {
17
- $icon_id = trim( $icon->classname, '.' );
18
- $output .= '<option value="'. $icon_id .'" '. selected( $value, $icon_id, false ) .' >'. $icon->name . '</option>';
19
- }
20
- }
21
-
22
- $output .= '</select>';
23
- $output .= '</div>';
24
-
25
- echo $output;
26
- }
27
-
28
- protected function sanitize_field_input( $value, $instance ) {
29
- return $value;
30
- }
31
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/includes/compatibility/siteorigin/fields/select2-multiple.class.php DELETED
@@ -1,33 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class Auxin_SiteOrigin_Field_Select2
5
- */
6
- class Auxin_SiteOrigin_Field_Select2_Multiple extends SiteOrigin_Widget_Field_Base {
7
-
8
- protected $options;
9
-
10
- protected function render_field( $value, $instance ) {
11
-
12
- if( gettype( $value ) ==="string" ) {
13
- $value = explode( ',', $value );
14
- }
15
-
16
- $output = '<div class="aux-element-field aux-multiple-selector ">';
17
- $output .= '<select multiple="multiple" name="'.$this->element_name.'" id="'.$this->element_id.'" style="width:100%" ' . ' class="wpb-multiselect wpb_vc_param_value aux-select2-multiple">';
18
-
19
- foreach ( $this->options as $id => $option_info ) {
20
- $active_attr = in_array( $id, $value ) ? 'selected="selected"' : '';
21
- $output .= sprintf( '<option value="%s" %s >%s</option>', $id, $active_attr, $option_info );
22
- }
23
-
24
- $output .= '</select></div>';
25
-
26
- echo $output;
27
-
28
- }
29
-
30
- protected function sanitize_field_input( $value, $instance ) {
31
- return $value;
32
- }
33
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/includes/compatibility/siteorigin/fields/visualselect.class.php DELETED
@@ -1,31 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class Auxin_SiteOrigin_Field_Visualselect
5
- */
6
- class Auxin_SiteOrigin_Field_Visualselect extends SiteOrigin_Widget_Field_Base {
7
-
8
- protected $options;
9
-
10
- protected function render_field( $value, $instance ) {
11
-
12
- $output = '<div class="aux-element-field aux-visual-selector">';
13
- $output .= '<select class="meta-select visual-select-wrapper" name="' . $this->element_name . '" id="' . $this->element_id . '" value="' . $value . '" >';
14
-
15
- foreach ( $this->options as $id => $option_info ) {
16
- $active_attr = ( $value == $id ) ? ' selected ' : "";
17
- $data_class = isset( $option_info['css_class'] ) && !empty( $option_info['css_class'] ) ? 'data-class="'. $option_info['css_class'].'"' : '';
18
- $data_symbol = empty( $data_class ) && isset( $option_info['image'] ) && ! empty( $option_info['image'] ) ? 'data-symbol="'. $option_info['image'].'"' : '';
19
- $data_video = ! empty( $option_info['video_src'] ) ? 'data-video-src="'. esc_attr( $option_info['video_src'] ).'"' : '';
20
- $output .= sprintf( '<option value="%s" %s %s %s %s>%s</option>', $id, $active_attr, $data_symbol, $data_video, $data_class, $option_info['label'] );
21
- }
22
-
23
- $output .= '</select></div>';
24
-
25
- echo $output;
26
- }
27
-
28
- protected function sanitize_field_input( $value, $instance ) {
29
- return $value;
30
- }
31
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/includes/compatibility/woocommerce/wc.php CHANGED
@@ -9,7 +9,7 @@ function auxin_disable_automatic_page_creation( $pages ) {
9
  if ( ! empty( $_GET['action'] ) && $_GET['action'] == 'install_pages' ) {
10
  return $pages;
11
  }
12
- return[];
13
  }
14
 
15
  ?>
9
  if ( ! empty( $_GET['action'] ) && $_GET['action'] == 'install_pages' ) {
10
  return $pages;
11
  }
12
+ return [];
13
  }
14
 
15
  ?>
admin/includes/metaboxes/metabox-fields-general-custom-logo.php CHANGED
@@ -44,12 +44,12 @@ function auxin_metabox_fields_general_custom_logo(){
44
  'default' => '',
45
  'style_callback' => function( $value = null ){
46
  // Get the dependency value while saving the metafield
47
- $enabled = isset( $_POST['aux_use_custom_logo'] ) ? $_POST['aux_use_custom_logo'] : 0;
48
  if( ! auxin_is_true( $enabled ) ){
49
  return '';
50
  }
51
  $value = trim( $value, 'px');
52
- return $value ? ".aux-logo-header .aux-logo-anchor{ max-width:{$value}px; }" : '';
53
  }
54
  ),
55
 
44
  'default' => '',
45
  'style_callback' => function( $value = null ){
46
  // Get the dependency value while saving the metafield
47
+ $enabled = isset( $_POST['aux_use_custom_logo'] ) ? sanitize_text_field( $_POST['aux_use_custom_logo'] ) : 0;
48
  if( ! auxin_is_true( $enabled ) ){
49
  return '';
50
  }
51
  $value = trim( $value, 'px');
52
+ return $value ? ".aux-logo-header .aux-logo-anchor{ max-width:{" . esc_attr( $value ) . "}px; }" : '';
53
  }
54
  ),
55
 
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: Exclusive and comprehensive plugin that extends the functionality of Phlox theme by adding new Elements, widgets and options.
15
- * Version: 2.9.8
16
  * Author: averta
17
  * Author URI: http://averta.net
18
  * Text Domain: auxin-elements
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.9.12
16
  * Author: averta
17
  * Author URI: http://averta.net
18
  * Text Domain: auxin-elements
includes/classes/class-auxels-admin-assets.php CHANGED
@@ -23,7 +23,7 @@ class Auxels_Admin_Assets {
23
  /**
24
  * __construct
25
  */
26
- function __construct() {
27
  // general assets
28
  add_action( 'admin_enqueue_scripts', array( $this, 'load_scripts' ) );
29
  }
23
  /**
24
  * __construct
25
  */
26
+ public function __construct() {
27
  // general assets
28
  add_action( 'admin_enqueue_scripts', array( $this, 'load_scripts' ) );
29
  }
includes/classes/class-auxels-archive-menu-links.php CHANGED
@@ -54,7 +54,7 @@ class Auxels_Archive_Menu_Links{
54
  <li>
55
  <label class="menu-item-title">
56
  <input type="checkbox" class="menu-item-checkbox" name="menu-item[<?php echo esc_attr( $counter ); ?>][menu-item-object-id]" value="-1"/>
57
- <?php echo __( 'Archive', 'auxin-elements' ) . ' <strong>'.$post_type_label .'</strong>'; ?>
58
  </label>
59
  <input type="hidden" class="menu-item-type" name="menu-item[<?php echo esc_attr( $counter ); ?>][menu-item-type]" value="custom"/>
60
  <input type="hidden" class="menu-item-title" name="menu-item[<?php echo esc_attr( $counter ); ?>][menu-item-title]" value="<?php echo esc_attr( $post_type_label ); ?>"/>
@@ -69,10 +69,10 @@ class Auxels_Archive_Menu_Links{
69
  </div>
70
  <p class="button-controls">
71
  <span class="list-controls">
72
- <a href="<?php echo admin_url('nav-menus.php?page-tab=all&selectall=1#posttype-archive-pages'); ?>" class="select-all"> <?php _e('Select All', 'auxin-elements' ); ?></a>
73
  </span>
74
  <span class="add-to-menu">
75
- <input type="submit" class="button-secondary submit-add-to-menu right" value="<?php _e('Add to Menu', 'auxin-elements') ?>" name="add-post-type-menu-item" id="submit-posttype-archive-pages">
76
  <span class="spinner"></span>
77
  </span>
78
  </p>
54
  <li>
55
  <label class="menu-item-title">
56
  <input type="checkbox" class="menu-item-checkbox" name="menu-item[<?php echo esc_attr( $counter ); ?>][menu-item-object-id]" value="-1"/>
57
+ <?php echo esc_html__( 'Archive', 'auxin-elements' ) . ' <strong>'. esc_html( $post_type_label ) .'</strong>'; ?>
58
  </label>
59
  <input type="hidden" class="menu-item-type" name="menu-item[<?php echo esc_attr( $counter ); ?>][menu-item-type]" value="custom"/>
60
  <input type="hidden" class="menu-item-title" name="menu-item[<?php echo esc_attr( $counter ); ?>][menu-item-title]" value="<?php echo esc_attr( $post_type_label ); ?>"/>
69
  </div>
70
  <p class="button-controls">
71
  <span class="list-controls">
72
+ <a href="<?php echo esc_url( admin_url('nav-menus.php?page-tab=all&selectall=1#posttype-archive-pages') ); ?>" class="select-all"> <?php esc_html_e('Select All', 'auxin-elements' ); ?></a>
73
  </span>
74
  <span class="add-to-menu">
75
+ <input type="submit" class="button-secondary submit-add-to-menu right" value="<?php esc_attr_e('Add to Menu', 'auxin-elements') ?>" name="add-post-type-menu-item" id="submit-posttype-archive-pages">
76
  <span class="spinner"></span>
77
  </span>
78
  </p>
includes/classes/class-auxels-envato-elements.php CHANGED
@@ -45,14 +45,14 @@ class Auxels_Envato_Elements {
45
  }
46
 
47
  public function __construct() {
48
- add_action( 'wp_ajax_aux_verify_envato_elements_email', array( $this, 'ajax_get_Extension_ID' ) );
49
  add_action( 'wp_ajax_aux_verify_envato_elements_token', array( $this, 'ajax_verify_token' ) );
50
  }
51
 
52
  /**
53
  * Return Extension ID for communicating with envato elements
54
  */
55
- public function ajax_get_Extension_ID() {
56
 
57
  if ( ! empty( get_option( 'phlox_envato_elements_license_code', '' ) ) ) {
58
  wp_send_json( array( 'status' => true, 'message' => __( 'Email verified.', 'auxin-elements') ) );
45
  }
46
 
47
  public function __construct() {
48
+ add_action( 'wp_ajax_aux_verify_envato_elements_email', array( $this, 'ajax_get_extension_id' ) );
49
  add_action( 'wp_ajax_aux_verify_envato_elements_token', array( $this, 'ajax_verify_token' ) );
50
  }
51
 
52
  /**
53
  * Return Extension ID for communicating with envato elements
54
  */
55
+ public function ajax_get_extension_id() {
56
 
57
  if ( ! empty( get_option( 'phlox_envato_elements_license_code', '' ) ) ) {
58
  wp_send_json( array( 'status' => true, 'message' => __( 'Email verified.', 'auxin-elements') ) );
includes/classes/class-auxels-import-parser.php CHANGED
@@ -10,7 +10,7 @@
10
  * WordPress Importer class for managing parsing of WXR files.
11
  */
12
  class Auxels_Import_Parser {
13
- function parse( $file ) {
14
  // Attempt to use proper XML parsers first
15
  if ( extension_loaded( 'simplexml' ) ) {
16
  $parser = new AUXELS_WXR_Parser_SimpleXML;
@@ -33,14 +33,14 @@ class Auxels_Import_Parser {
33
  echo '<pre>';
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
  }
41
  echo '</pre>';
42
- echo '<p><strong>' . __( 'There was an error when reading this WXR file', 'wordpress-importer' ) . '</strong><br />';
43
- echo __( 'Details are shown above. The importer will now try again with a different parser...', 'wordpress-importer' ) . '</p>';
44
  }
45
 
46
  // use regular expressions if nothing else available or this is bad XML
@@ -54,7 +54,7 @@ class Auxels_Import_Parser {
54
  */
55
  class AUXELS_WXR_Parser_SimpleXML {
56
 
57
- function parse( $file ) {
58
 
59
  $options = $option = array();
60
 
@@ -71,7 +71,7 @@ class AUXELS_WXR_Parser_SimpleXML {
71
  }
72
 
73
  if ( ! $success || isset( $dom->doctype ) ) {
74
- return new WP_Error( 'SimpleXML_parse_error', __( 'There was an error when reading this WXR file', 'wordpress-importer' ), libxml_get_errors() );
75
  }
76
 
77
  $xml = simplexml_import_dom( $dom );
@@ -79,16 +79,16 @@ class AUXELS_WXR_Parser_SimpleXML {
79
 
80
  // halt if loading produces an error
81
  if ( ! $xml )
82
- return new WP_Error( 'SimpleXML_parse_error', __( 'There was an error when reading this WXR file', 'wordpress-importer' ), libxml_get_errors() );
83
 
84
  $wxr_version = $xml->xpath('/rss/channel/wp:wxr_version');
85
  if ( ! $wxr_version )
86
- return new WP_Error( 'AUXELS_WXR_parse_error', __( 'This does not appear to be a WXR file, missing/invalid WXR version number', 'wordpress-importer' ) );
87
 
88
  $wxr_version = (string) trim( $wxr_version[0] );
89
  // confirm that we are dealing with the correct file format
90
  if ( ! preg_match( '/^\d+\.\d+$/', $wxr_version ) )
91
- return new WP_Error( 'AUXELS_WXR_parse_error', __( 'This does not appear to be a WXR file, missing/invalid WXR version number', 'wordpress-importer' ) );
92
 
93
  $base_url = $xml->xpath('/rss/channel/wp:base_site_url');
94
  $base_url = (string) trim( $base_url[0] );
@@ -123,7 +123,7 @@ class AUXELS_WXR_Parser_XML {
123
  'wp:option_name', 'wp:option_value'
124
  );
125
 
126
- function parse( $file ) {
127
 
128
  $this->wxr_version = $this->in_post = $this->cdata = $this->data = $this->sub_data = $this->in_tag = $this->in_sub_tag = false;
129
  $this->authors = $this->posts = $this->term = $this->category = $this->tag = array();
@@ -145,7 +145,7 @@ class AUXELS_WXR_Parser_XML {
145
  xml_parser_free( $xml );
146
 
147
  if ( ! preg_match( '/^\d+\.\d+$/', $this->wxr_version ) )
148
- return new WP_Error( 'AUXELS_WXR_parse_error', __( 'This does not appear to be a WXR file, missing/invalid WXR version number', 'wordpress-importer' ) );
149
 
150
  return array(
151
  'authors' => $this->authors,
@@ -158,7 +158,7 @@ class AUXELS_WXR_Parser_XML {
158
  );
159
  }
160
 
161
- function tag_open( $parse, $tag, $attr ) {
162
  if ( in_array( $tag, $this->wp_tags ) ) {
163
  $this->in_tag = substr( $tag, 3 );
164
  return;
@@ -189,7 +189,7 @@ class AUXELS_WXR_Parser_XML {
189
  }
190
  }
191
 
192
- function cdata( $parser, $cdata ) {
193
  if ( ! trim( $cdata ) )
194
  return;
195
 
@@ -200,7 +200,7 @@ class AUXELS_WXR_Parser_XML {
200
  }
201
  }
202
 
203
- function tag_close( $parser, $tag ) {
204
  switch ( $tag ) {
205
  case 'wp:option':
206
  $n = substr( $tag, 3 );
@@ -220,11 +220,11 @@ class AUXELS_WXR_Parser_Regex {
220
 
221
  var $options = array();
222
 
223
- function __construct() {
224
  $this->has_gzip = is_callable( 'gzopen' );
225
  }
226
 
227
- function parse( $file ) {
228
  $wxr_version = $in_post = false;
229
 
230
  $fp = $this->fopen( $file, 'r' );
@@ -246,14 +246,14 @@ class AUXELS_WXR_Parser_Regex {
246
  }
247
 
248
  if ( ! $wxr_version )
249
- return new WP_Error( 'AUXELS_WXR_parse_error', __( 'This does not appear to be a WXR file, missing/invalid WXR version number', 'wordpress-importer' ) );
250
 
251
  return array(
252
  'options' => $this->options
253
  );
254
  }
255
 
256
- function get_tag( $string, $tag ) {
257
  preg_match( "|<$tag.*?>(.*?)</$tag>|is", $string, $return );
258
  if ( isset( $return[1] ) ) {
259
  if ( substr( $return[1], 0, 9 ) == '<![CDATA[' ) {
@@ -274,36 +274,36 @@ class AUXELS_WXR_Parser_Regex {
274
  return $return;
275
  }
276
 
277
- function process_option( $t ) {
278
  return array(
279
  'option_name' => $this->get_tag( $t, 'wp:option_name' ),
280
  'option_value' => $this->get_tag( $t, 'wp:option_value' )
281
  );
282
  }
283
 
284
- function _normalize_tag( $matches ) {
285
  return '<' . strtolower( $matches[1] );
286
  }
287
 
288
- function fopen( $filename, $mode = 'r' ) {
289
  if ( $this->has_gzip )
290
  return gzopen( $filename, $mode );
291
  return fopen( $filename, $mode );
292
  }
293
 
294
- function feof( $fp ) {
295
  if ( $this->has_gzip )
296
  return gzeof( $fp );
297
  return feof( $fp );
298
  }
299
 
300
- function fgets( $fp, $len = 8192 ) {
301
  if ( $this->has_gzip )
302
  return gzgets( $fp, $len );
303
  return fgets( $fp, $len );
304
  }
305
 
306
- function fclose( $fp ) {
307
  if ( $this->has_gzip )
308
  return gzclose( $fp );
309
  return fclose( $fp );
10
  * WordPress Importer class for managing parsing of WXR files.
11
  */
12
  class Auxels_Import_Parser {
13
+ public function parse( $file ) {
14
  // Attempt to use proper XML parsers first
15
  if ( extension_loaded( 'simplexml' ) ) {
16
  $parser = new AUXELS_WXR_Parser_SimpleXML;
33
  echo '<pre>';
34
  if ( 'SimpleXML_parse_error' == $result->get_error_code() ) {
35
  foreach ( $result->get_error_data() as $error )
36
+ echo esc_html( $error->line ) . ':' . esc_html( $error->column ) . ' ' . esc_html( $error->message ) . "\n";
37
  } elseif ( 'XML_parse_error' == $result->get_error_code() ) {
38
  $error = $result->get_error_data();
39
+ echo esc_html( $error[0] ) . ':' . esc_html( $error[1] ) . ' ' . esc_html( $error[2] );
40
  }
41
  echo '</pre>';
42
+ echo '<p><strong>' . esc_html__( 'There was an error when reading this WXR file', 'auxin-elements' ) . '</strong><br />';
43
+ echo esc_html__( 'Details are shown above. The importer will now try again with a different parser...', 'auxin-elements' ) . '</p>';
44
  }
45
 
46
  // use regular expressions if nothing else available or this is bad XML
54
  */
55
  class AUXELS_WXR_Parser_SimpleXML {
56
 
57
+ public function parse( $file ) {
58
 
59
  $options = $option = array();
60
 
71
  }
72
 
73
  if ( ! $success || isset( $dom->doctype ) ) {
74
+ return new WP_Error( 'SimpleXML_parse_error', __( 'There was an error when reading this WXR file', 'auxin-elements' ), libxml_get_errors() );
75
  }
76
 
77
  $xml = simplexml_import_dom( $dom );
79
 
80
  // halt if loading produces an error
81
  if ( ! $xml )
82
+ return new WP_Error( 'SimpleXML_parse_error', __( 'There was an error when reading this WXR file', 'auxin-elements' ), libxml_get_errors() );
83
 
84
  $wxr_version = $xml->xpath('/rss/channel/wp:wxr_version');
85
  if ( ! $wxr_version )
86
+ return new WP_Error( 'AUXELS_WXR_parse_error', __( 'This does not appear to be a WXR file, missing/invalid WXR version number', 'auxin-elements' ) );
87
 
88
  $wxr_version = (string) trim( $wxr_version[0] );
89
  // confirm that we are dealing with the correct file format
90
  if ( ! preg_match( '/^\d+\.\d+$/', $wxr_version ) )
91
+ return new WP_Error( 'AUXELS_WXR_parse_error', __( 'This does not appear to be a WXR file, missing/invalid WXR version number', 'auxin-elements' ) );
92
 
93
  $base_url = $xml->xpath('/rss/channel/wp:base_site_url');
94
  $base_url = (string) trim( $base_url[0] );
123
  'wp:option_name', 'wp:option_value'
124
  );
125
 
126
+ public function parse( $file ) {
127
 
128
  $this->wxr_version = $this->in_post = $this->cdata = $this->data = $this->sub_data = $this->in_tag = $this->in_sub_tag = false;
129
  $this->authors = $this->posts = $this->term = $this->category = $this->tag = array();
145
  xml_parser_free( $xml );
146
 
147
  if ( ! preg_match( '/^\d+\.\d+$/', $this->wxr_version ) )
148
+ return new WP_Error( 'AUXELS_WXR_parse_error', __( 'This does not appear to be a WXR file, missing/invalid WXR version number', 'auxin-elements' ) );
149
 
150
  return array(
151
  'authors' => $this->authors,
158
  );
159
  }
160
 
161
+ public function tag_open( $parse, $tag, $attr ) {
162
  if ( in_array( $tag, $this->wp_tags ) ) {
163
  $this->in_tag = substr( $tag, 3 );
164
  return;
189
  }
190
  }
191
 
192
+ public function cdata( $parser, $cdata ) {
193
  if ( ! trim( $cdata ) )
194
  return;
195
 
200
  }
201
  }
202
 
203
+ public function tag_close( $parser, $tag ) {
204
  switch ( $tag ) {
205
  case 'wp:option':
206
  $n = substr( $tag, 3 );
220
 
221
  var $options = array();
222
 
223
+ public function __construct() {
224
  $this->has_gzip = is_callable( 'gzopen' );
225
  }
226
 
227
+ public function parse( $file ) {
228
  $wxr_version = $in_post = false;
229
 
230
  $fp = $this->fopen( $file, 'r' );
246
  }
247
 
248
  if ( ! $wxr_version )
249
+ return new WP_Error( 'AUXELS_WXR_parse_error', __( 'This does not appear to be a WXR file, missing/invalid WXR version number', 'auxin-elements' ) );
250
 
251
  return array(
252
  'options' => $this->options
253
  );
254
  }
255
 
256
+ public function get_tag( $string, $tag ) {
257
  preg_match( "|<$tag.*?>(.*?)</$tag>|is", $string, $return );
258
  if ( isset( $return[1] ) ) {
259
  if ( substr( $return[1], 0, 9 ) == '<![CDATA[' ) {
274
  return $return;
275
  }
276
 
277
+ public function process_option( $t ) {
278
  return array(
279
  'option_name' => $this->get_tag( $t, 'wp:option_name' ),
280
  'option_value' => $this->get_tag( $t, 'wp:option_value' )
281
  );
282
  }
283
 
284
+ public function _normalize_tag( $matches ) {
285
  return '<' . strtolower( $matches[1] );
286
  }
287
 
288
+ public function fopen( $filename, $mode = 'r' ) {
289
  if ( $this->has_gzip )
290
  return gzopen( $filename, $mode );
291
  return fopen( $filename, $mode );
292
  }
293
 
294
+ public function feof( $fp ) {
295
  if ( $this->has_gzip )
296
  return gzeof( $fp );
297
  return feof( $fp );
298
  }
299
 
300
+ public function fgets( $fp, $len = 8192 ) {
301
  if ( $this->has_gzip )
302
  return gzgets( $fp, $len );
303
  return fgets( $fp, $len );
304
  }
305
 
306
+ public function fclose( $fp ) {
307
  if ( $this->has_gzip )
308
  return gzclose( $fp );
309
  return fclose( $fp );
includes/classes/class-auxels-import.php CHANGED
@@ -12,7 +12,7 @@ class Auxels_Import {
12
  protected static $instance = null;
13
 
14
 
15
- function __construct(){
16
  // Add a radio option for exporting auxin options to wp export options.
17
  add_action( 'export_filters', array( $this, 'export_filters' ) );
18
  // Process the check field for auxin options while export submitted
@@ -34,7 +34,7 @@ class Auxels_Import {
34
  <hr />
35
  <p><label>
36
  <input type="checkbox" name="auxin-options" checked="checked" aria-describedby="all-content-desc" />
37
- <?php _e( 'Include theme options', 'auxin-elements' ); ?>
38
  </label></p>
39
  <?php
40
  }
@@ -65,7 +65,7 @@ class Auxels_Import {
65
 
66
  foreach ( $options_ref as $option_export_name => $option_import_name ) {
67
  $sql = $wpdb->prepare("SELECT option_name, option_value FROM $wpdb->options WHERE option_name = %s", $option_import_name );
68
- $result = $wpdb->get_results( $sql );
69
 
70
  if( ! empty( $result[0]->option_value ) ){
71
  ?>
@@ -121,7 +121,7 @@ class Auxels_Import {
121
  * @param string $str
122
  * @return string
123
  */
124
- function wxr_cdata( $str ) {
125
  if ( ! seems_utf8( $str ) ) {
126
  $str = utf8_encode( $str );
127
  }
12
  protected static $instance = null;
13
 
14
 
15
+ public function __construct(){
16
  // Add a radio option for exporting auxin options to wp export options.
17
  add_action( 'export_filters', array( $this, 'export_filters' ) );
18
  // Process the check field for auxin options while export submitted
34
  <hr />
35
  <p><label>
36
  <input type="checkbox" name="auxin-options" checked="checked" aria-describedby="all-content-desc" />
37
+ <?php esc_html_e( 'Include theme options', 'auxin-elements' ); ?>
38
  </label></p>
39
  <?php
40
  }
65
 
66
  foreach ( $options_ref as $option_export_name => $option_import_name ) {
67
  $sql = $wpdb->prepare("SELECT option_name, option_value FROM $wpdb->options WHERE option_name = %s", $option_import_name );
68
+ $result = $wpdb->get_results( $sql ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
69
 
70
  if( ! empty( $result[0]->option_value ) ){
71
  ?>
121
  * @param string $str
122
  * @return string
123
  */
124
+ public function wxr_cdata( $str ) {
125
  if ( ! seems_utf8( $str ) ) {
126
  $str = utf8_encode( $str );
127
  }
includes/classes/class-auxels-search-post-type.php CHANGED
@@ -70,7 +70,7 @@ class Auxels_Search_Post_Type {
70
  /**
71
  * __construct
72
  */
73
- function __construct( $search_phrase = '', $search_category = '', $search_post_type = '', $number_per_page = '' ) {
74
 
75
  $this->s = $search_phrase;
76
  $this->cat = $search_category;
70
  /**
71
  * __construct
72
  */
73
+ public function __construct( $search_phrase = '', $search_category = '', $search_post_type = '', $number_per_page = '' ) {
74
 
75
  $this->s = $search_phrase;
76
  $this->cat = $search_category;
includes/classes/class-auxin-admin-dashboard.php CHANGED
@@ -50,7 +50,7 @@ class Auxin_Admin_Dashboard {
50
  foreach( $post_types as $pt => $args ) {
51
  if( isset( $auxin_active_post_types[ $pt ] ) && $auxin_active_post_types[$pt] ){
52
  $edit_url = 'edit.php?post_type='. $pt;
53
- echo '<tr><td class="t"><a href="'. $edit_url .'">'. $args->labels->name .'</a></td><td class="b">( '. wp_count_posts( $pt )->publish .' )</td></tr>';
54
  }
55
  }
56
  echo '</table>';
50
  foreach( $post_types as $pt => $args ) {
51
  if( isset( $auxin_active_post_types[ $pt ] ) && $auxin_active_post_types[$pt] ){
52
  $edit_url = 'edit.php?post_type='. $pt;
53
+ echo '<tr><td class="t"><a href="'. esc_url( $edit_url ) .'">'. esc_html( $args->labels->name ) .'</a></td><td class="b">( '. esc_html( wp_count_posts( $pt )->publish ) .' )</td></tr>';
54
  }
55
  }
56
  echo '</table>';
includes/classes/class-auxin-demo-importer.php CHANGED
@@ -50,7 +50,7 @@ class Auxin_Demo_Importer {
50
  }
51
 
52
 
53
- function __construct() {
54
  add_action( 'wp_ajax_auxin_demo_data' , array( $this, 'import') );
55
  add_action( 'wp_ajax_auxin_templates_data' , array( $this, 'templates') );
56
  add_action( 'wp_ajax_import_step' , array( $this, 'import_step') );
@@ -109,10 +109,10 @@ class Auxin_Demo_Importer {
109
  <h3><?php esc_html_e( 'Page has been successfully generated.', 'auxin-elements' ); ?></h3>
110
  <div class="aux-template-actions">
111
  <a href="<?php echo esc_url( get_edit_post_link( $post_id ) ) ;?>" target="_blank" class="aux-button aux-primary aux-medium">
112
- <?php _e( 'Edit Page', 'auxin-elements' ); ?>
113
  </a>
114
  <a href="#" class="aux-button aux-medium aux-outline aux-transparent aux-pp-close">
115
- <?php _e( 'Close', 'auxin-elements' ); ?>
116
  </a>
117
  </div>
118
  </div>
@@ -144,7 +144,7 @@ class Auxin_Demo_Importer {
144
  data-template-type="<?php echo esc_attr( $template_type ); ?>"
145
  data-status-type="copy"
146
  data-nonce="<?php echo wp_create_nonce( 'aux-template-manager' ); ?>"
147
- ><span><?php _e( 'Copy to clipboard', 'auxin-elements' ); ?></span></a>
148
  <a href="<?php esc_url( add_query_arg( array( 'action' => 'aux_ajax_lightbox', 'type' => 'progress' , 'nonce' => wp_create_nonce( 'aux-open-lightbox' ) ), admin_url( 'admin-ajax.php' ) ) ); ?>"
149
  class="aux-button aux-green aux-import-template aux-open-modal aux-medium aux-copy-template aux-iconic-action"
150
  data-template-id="<?php echo esc_attr( $template_ID ); ?>"
@@ -153,9 +153,9 @@ class Auxin_Demo_Importer {
153
  data-template-title="<?php echo esc_attr( $template_title ); ?>"
154
  data-status-type="create_my_template"
155
  data-nonce="<?php echo wp_create_nonce( 'aux-template-manager' ); ?>"
156
- ><span><?php _e( 'Import to my templates', 'auxin-elements' ); ?></span></a>
157
  <a href="#" class="aux-button aux-medium aux-outline aux-transparent aux-pp-close">
158
- <?php _e( 'Close', 'auxin-elements' ); ?>
159
  </a>
160
  </div>
161
  </div>
@@ -188,9 +188,9 @@ class Auxin_Demo_Importer {
188
  data-template-type="<?php echo esc_attr( $template_type ); ?>"
189
  data-status-type="import"
190
  data-nonce="<?php echo wp_create_nonce( 'aux-template-manager' ); ?>"
191
- ><span><?php _e( 'Retry', 'auxin-elements' ); ?></span></a>
192
  <a href="#" class="aux-button aux-outline aux-round aux-transparent aux-pp-close">
193
- <?php _e( 'Close', 'auxin-elements' ); ?>
194
  </a>
195
  </div>
196
  </div>
@@ -212,7 +212,7 @@ class Auxin_Demo_Importer {
212
  }
213
 
214
  // Put demo ID in a variable
215
- $demo_ID = $_POST['ID'];
216
 
217
  $data = json_decode( $this->parse( 'https://demo.phlox.pro/api/v2/data/' . $demo_ID, 'insert', 'post' ), true );
218
 
@@ -242,7 +242,7 @@ class Auxin_Demo_Importer {
242
  wp_send_json_error( array( 'message' => __( 'Step Failed!', 'auxin-elements' ) ) );
243
  }
244
 
245
- $index = isset( $_POST['index'] ) ? $_POST['index'] : 0;
246
  $data = $this->get_demo_data();
247
 
248
  if( ! is_array( $data ) ){
@@ -392,10 +392,10 @@ class Auxin_Demo_Importer {
392
  )
393
  );
394
  } else {
395
- $getLicense = get_site_option( THEME_ID . '_license' );
396
- $getLicense = empty( $getLicense ) ? get_site_option( AUXELS_PURCHASE_KEY ) : $getLicense;
397
- $bearer = ! empty( $getLicense['token'] ) ? $getLicense['token'] : '';
398
- $getToken = 'Bearer ' . $bearer;
399
 
400
  $request = wp_remote_post(
401
  $url,
@@ -404,10 +404,10 @@ class Auxin_Demo_Importer {
404
  'audit_token' => base64_encode( auxin_get_site_key() ),
405
  'item_slug' => THEME_ID,
406
  'item_version' => THEME_VERSION,
407
- 'authorization' => $getToken
408
  ),
409
  'headers' => array(
410
- 'Authorization' => $getToken,
411
  'Envato-Extensions-Token' => get_option( 'phlox_envato_elements_token', '' ),
412
  'Envato-Extensions-Extension-Id' => get_option( 'phlox_envato_elements_license_code', '' ),
413
  ),
@@ -433,7 +433,7 @@ class Auxin_Demo_Importer {
433
  //proceed to retrieving the data
434
  $body = wp_remote_retrieve_body( $request );
435
  // Check for error
436
- if ( is_wp_error( $body ) || json_decode( $body ) == NULL ) {
437
  wp_send_json_error( array( 'message' => __( 'Retrieve Body Fails', 'auxin-elements' ) ) );
438
  }
439
 
@@ -678,6 +678,11 @@ class Auxin_Demo_Importer {
678
  default:
679
  if( strpos( $item_value['menu-item-url'], '{{demo_home_url}}' ) !== false ) {
680
  $item_value['menu-item-url'] = esc_url( str_replace( "{{demo_home_url}}", get_site_url(), $item_value['menu-item-url'] ) );
 
 
 
 
 
681
  }
682
  $item_value['menu-item-object-id'] = 0;
683
  }
@@ -973,21 +978,6 @@ class Auxin_Demo_Importer {
973
  $meta_value = maybe_unserialize( $meta_value );
974
 
975
  switch ( $meta_key ) {
976
- case '_panels_data_preview':
977
- case 'panels_data' :
978
- $meta_value = $this->siteorigin_data_update( $meta_value );
979
- $auxin_custom_images = $this->get_widget_by_type( array('attach_image', 'attach_images', 'aux_select_video', 'aux_select_audio') );
980
- foreach ( $meta_value['widgets'] as $widgets_key => $widgets_value ) {
981
- foreach ($widgets_value as $panel_key => $panel_value) {
982
- if ( in_array( $panel_key, $auxin_custom_images ) && ! empty( $panel_key ) ) {
983
- $meta_value['widgets'][$widgets_key][$panel_key] = $this->update_gallery_ids( $panel_value );
984
- } elseif( $panel_key == 'cf7_shortcode' ) {
985
- $meta_value['widgets'][$widgets_key][$panel_key] = $this->shortcode_process( $panel_value );
986
- }
987
- }
988
- }
989
- break;
990
-
991
  case '_thumbnail_id' :
992
  case '_thumbnail_id2':
993
  case '_format_audio_attachment':
@@ -1604,16 +1594,16 @@ class Auxin_Demo_Importer {
1604
 
1605
  global $wpdb;
1606
 
1607
- $meta = $wpdb->get_results( "
1608
- SELECT *
1609
- FROM $wpdb->postmeta
1610
- WHERE
1611
- meta_key='".$key."'
1612
- AND
1613
- meta_value='".$value."'
1614
- OR
1615
- meta_key='auxin_attachment_has_duplicate_".$value."'
1616
- ");
1617
 
1618
  if ( is_array($meta) && !empty($meta) && isset($meta[0]) ) {
1619
  $meta = $meta[0];
@@ -1691,9 +1681,9 @@ class Auxin_Demo_Importer {
1691
 
1692
  global $wpdb;
1693
 
1694
- $sql = $wpdb->prepare("SELECT post_id FROM $wpdb->postmeta WHERE meta_key=%s AND meta_value=%s", $key, $value );
1695
 
1696
- $meta = $wpdb->get_results( $sql );
1697
 
1698
  if ( is_array($meta) && !empty($meta) && isset($meta[0]) ) {
1699
  $meta = $meta[0];
@@ -1718,12 +1708,12 @@ class Auxin_Demo_Importer {
1718
 
1719
  global $wpdb;
1720
 
1721
- $post = $wpdb->get_results( "
1722
- SELECT *
1723
- FROM $wpdb->posts
1724
- WHERE
1725
- guid LIKE '%".$path."%'
1726
- ");
1727
 
1728
  if ( is_array($post) && !empty($post) && isset($post[0]) ) {
1729
  $post = $post[0];
@@ -1928,17 +1918,17 @@ class Auxin_Demo_Importer {
1928
  global $wpdb;
1929
  $title = preg_replace('/\.[^.]+$/', '', 'demo-attachment-' . $import_id . '-' . $filename );
1930
 
1931
- return $wpdb->get_var( "
1932
  SELECT COUNT(*)
1933
  FROM
1934
- $wpdb->posts AS p,
1935
  $wpdb->postmeta AS m
1936
  WHERE
1937
  p.ID = m.post_id
1938
  AND p.post_type = 'attachment'
1939
  AND m.meta_key = 'auxin_import_id'
1940
- AND p.post_title LIKE '$title'
1941
- " );
1942
 
1943
  }
1944
 
@@ -2115,25 +2105,6 @@ class Auxin_Demo_Importer {
2115
  return $meta;
2116
  }
2117
 
2118
-
2119
- public function siteorigin_data_update( $meta ) {
2120
-
2121
- $meta_str = wp_json_encode( $meta );
2122
-
2123
- preg_match_all( '/\s*"background_image_attachment"\s*:\s*"(\d+?)\s*",?/', $meta_str, $matchs, PREG_SET_ORDER );
2124
-
2125
- foreach ( $matchs as $match ) {
2126
- if ( sizeof( $match ) > 1 ) {
2127
- $new_id = $this->get_attachment_id( 'auxin_import_id', $match[1] );
2128
- $replaced_meta = str_replace( $match[1] , $new_id, $match[0]);
2129
- $meta_str = str_replace( $match[0] , $replaced_meta, $meta_str );
2130
- }
2131
- }
2132
-
2133
- return json_decode( $meta_str, true );
2134
-
2135
- }
2136
-
2137
  /**
2138
  * Search for depicter widget in pages and update its imported ID
2139
  */
@@ -2150,12 +2121,12 @@ class Auxin_Demo_Importer {
2150
  }
2151
 
2152
  $elementor_data = is_array( $elementor_data ) ? wp_json_encode( $elementor_data ) : $elementor_data;
2153
- preg_match_all( '/\{\"slider_id\":\"(\d+)\"\}/', $elementor_data, $shortcodes, PREG_SET_ORDER );
2154
  if ( !empty( $shortcodes ) ) {
2155
  foreach ( $shortcodes as $shortcode ) {
2156
  if ( !empty( $shortcode[1] ) ) {
2157
  $imported_slider_id = get_transient( 'auxin_depicter_' . $shortcode[1] . '_to', $shortcode[1] );
2158
- $elementor_data = str_replace( $shortcode[0], '{"slider_id":"'.$imported_slider_id.'"}', $elementor_data );
2159
  }
2160
  }
2161
  $elementor_data = wp_slash( $elementor_data );
50
  }
51
 
52
 
53
+ public function __construct() {
54
  add_action( 'wp_ajax_auxin_demo_data' , array( $this, 'import') );
55
  add_action( 'wp_ajax_auxin_templates_data' , array( $this, 'templates') );
56
  add_action( 'wp_ajax_import_step' , array( $this, 'import_step') );
109
  <h3><?php esc_html_e( 'Page has been successfully generated.', 'auxin-elements' ); ?></h3>
110
  <div class="aux-template-actions">
111
  <a href="<?php echo esc_url( get_edit_post_link( $post_id ) ) ;?>" target="_blank" class="aux-button aux-primary aux-medium">
112
+ <?php esc_html_e( 'Edit Page', 'auxin-elements' ); ?>
113
  </a>
114
  <a href="#" class="aux-button aux-medium aux-outline aux-transparent aux-pp-close">
115
+ <?php esc_html_e( 'Close', 'auxin-elements' ); ?>
116
  </a>
117
  </div>
118
  </div>
144
  data-template-type="<?php echo esc_attr( $template_type ); ?>"
145
  data-status-type="copy"
146
  data-nonce="<?php echo wp_create_nonce( 'aux-template-manager' ); ?>"
147
+ ><span><?php esc_html_e( 'Copy to clipboard', 'auxin-elements' ); ?></span></a>
148
  <a href="<?php esc_url( add_query_arg( array( 'action' => 'aux_ajax_lightbox', 'type' => 'progress' , 'nonce' => wp_create_nonce( 'aux-open-lightbox' ) ), admin_url( 'admin-ajax.php' ) ) ); ?>"
149
  class="aux-button aux-green aux-import-template aux-open-modal aux-medium aux-copy-template aux-iconic-action"
150
  data-template-id="<?php echo esc_attr( $template_ID ); ?>"
153
  data-template-title="<?php echo esc_attr( $template_title ); ?>"
154
  data-status-type="create_my_template"
155
  data-nonce="<?php echo wp_create_nonce( 'aux-template-manager' ); ?>"
156
+ ><span><?php esc_html_e( 'Import to my templates', 'auxin-elements' ); ?></span></a>
157
  <a href="#" class="aux-button aux-medium aux-outline aux-transparent aux-pp-close">
158
+ <?php esc_html_e( 'Close', 'auxin-elements' ); ?>
159
  </a>
160
  </div>
161
  </div>
188
  data-template-type="<?php echo esc_attr( $template_type ); ?>"
189
  data-status-type="import"
190
  data-nonce="<?php echo wp_create_nonce( 'aux-template-manager' ); ?>"
191
+ ><span><?php esc_html_e( 'Retry', 'auxin-elements' ); ?></span></a>
192
  <a href="#" class="aux-button aux-outline aux-round aux-transparent aux-pp-close">
193
+ <?php esc_html_e( 'Close', 'auxin-elements' ); ?>
194
  </a>
195
  </div>
196
  </div>
212
  }
213
 
214
  // Put demo ID in a variable
215
+ $demo_ID = sanitize_text_field( $_POST['ID'] );
216
 
217
  $data = json_decode( $this->parse( 'https://demo.phlox.pro/api/v2/data/' . $demo_ID, 'insert', 'post' ), true );
218
 
242
  wp_send_json_error( array( 'message' => __( 'Step Failed!', 'auxin-elements' ) ) );
243
  }
244
 
245
+ $index = isset( $_POST['index'] ) ? sanitize_text_field( $_POST['index'] ) : 0;
246
  $data = $this->get_demo_data();
247
 
248
  if( ! is_array( $data ) ){
392
  )
393
  );
394
  } else {
395
+ $get_license = get_site_option( THEME_ID . '_license' );
396
+ $get_license = empty( $get_license ) ? get_site_option( AUXELS_PURCHASE_KEY ) : $get_license;
397
+ $bearer = ! empty( $get_license['token'] ) ? $get_license['token'] : '';
398
+ $get_token = 'Bearer ' . $bearer;
399
 
400
  $request = wp_remote_post(
401
  $url,
404
  'audit_token' => base64_encode( auxin_get_site_key() ),
405
  'item_slug' => THEME_ID,
406
  'item_version' => THEME_VERSION,
407
+ 'authorization' => $get_token
408
  ),
409
  'headers' => array(
410
+ 'Authorization' => $get_token,
411
  'Envato-Extensions-Token' => get_option( 'phlox_envato_elements_token', '' ),
412
  'Envato-Extensions-Extension-Id' => get_option( 'phlox_envato_elements_license_code', '' ),
413
  ),
433
  //proceed to retrieving the data
434
  $body = wp_remote_retrieve_body( $request );
435
  // Check for error
436
+ if ( is_wp_error( $body ) || json_decode( $body ) == null ) {
437
  wp_send_json_error( array( 'message' => __( 'Retrieve Body Fails', 'auxin-elements' ) ) );
438
  }
439
 
678
  default:
679
  if( strpos( $item_value['menu-item-url'], '{{demo_home_url}}' ) !== false ) {
680
  $item_value['menu-item-url'] = esc_url( str_replace( "{{demo_home_url}}", get_site_url(), $item_value['menu-item-url'] ) );
681
+ } else if ( strpos( $item_value['menu-item-url'], '/' ) === 0 ) {
682
+ preg_match_all( '/\/[^\/]+\//' , $item_value['menu-item-url'], $site_ids, PREG_SET_ORDER );
683
+ if ( !empty( $site_ids ) ) {
684
+ $item_value['menu-item-url'] = str_replace( $site_ids[0], get_site_url() . '/', $item_value['menu-item-url'] );
685
+ }
686
  }
687
  $item_value['menu-item-object-id'] = 0;
688
  }
978
  $meta_value = maybe_unserialize( $meta_value );
979
 
980
  switch ( $meta_key ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
981
  case '_thumbnail_id' :
982
  case '_thumbnail_id2':
983
  case '_format_audio_attachment':
1594
 
1595
  global $wpdb;
1596
 
1597
+ $meta = $wpdb->get_results( $wpdb->prepare( "
1598
+ SELECT *
1599
+ FROM $wpdb->postmeta
1600
+ WHERE
1601
+ meta_key=%s
1602
+ AND
1603
+ meta_value=%s
1604
+ OR
1605
+ meta_key=%s
1606
+ ", [ $key, $value, 'auxin_attachment_has_duplicate_' . $value ] ) );
1607
 
1608
  if ( is_array($meta) && !empty($meta) && isset($meta[0]) ) {
1609
  $meta = $meta[0];
1681
 
1682
  global $wpdb;
1683
 
1684
+ $sql = $wpdb->prepare("SELECT post_id FROM $wpdb->postmeta WHERE meta_key=%s AND meta_value=%s", [ $key, $value ] );
1685
 
1686
+ $meta = $wpdb->get_results( $sql ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
1687
 
1688
  if ( is_array($meta) && !empty($meta) && isset($meta[0]) ) {
1689
  $meta = $meta[0];
1708
 
1709
  global $wpdb;
1710
 
1711
+ $post = $wpdb->get_results( $wpdb->prepare( "
1712
+ SELECT *
1713
+ FROM $wpdb->posts
1714
+ WHERE
1715
+ guid LIKE %s
1716
+ ", "'%" . $path . "'%" ) );
1717
 
1718
  if ( is_array($post) && !empty($post) && isset($post[0]) ) {
1719
  $post = $post[0];
1918
  global $wpdb;
1919
  $title = preg_replace('/\.[^.]+$/', '', 'demo-attachment-' . $import_id . '-' . $filename );
1920
 
1921
+ return $wpdb->get_var( $wpdb->prepare( "
1922
  SELECT COUNT(*)
1923
  FROM
1924
+ $wpdb->posts AS p,
1925
  $wpdb->postmeta AS m
1926
  WHERE
1927
  p.ID = m.post_id
1928
  AND p.post_type = 'attachment'
1929
  AND m.meta_key = 'auxin_import_id'
1930
+ AND p.post_title LIKE %s
1931
+ ", [ $title ] ) );
1932
 
1933
  }
1934
 
2105
  return $meta;
2106
  }
2107
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2108
  /**
2109
  * Search for depicter widget in pages and update its imported ID
2110
  */
2121
  }
2122
 
2123
  $elementor_data = is_array( $elementor_data ) ? wp_json_encode( $elementor_data ) : $elementor_data;
2124
+ preg_match_all( '/\{\"slider_id\":\"(\d+)\"/', $elementor_data, $shortcodes, PREG_SET_ORDER );
2125
  if ( !empty( $shortcodes ) ) {
2126
  foreach ( $shortcodes as $shortcode ) {
2127
  if ( !empty( $shortcode[1] ) ) {
2128
  $imported_slider_id = get_transient( 'auxin_depicter_' . $shortcode[1] . '_to', $shortcode[1] );
2129
+ $elementor_data = str_replace( $shortcode[0], '{"slider_id":"'.$imported_slider_id.'"', $elementor_data );
2130
  }
2131
  }
2132
  $elementor_data = wp_slash( $elementor_data );
includes/classes/class-auxin-dependency-sorting.php CHANGED
@@ -28,7 +28,7 @@ class Auxin_Dependency_Sorting {
28
  protected $graph = array();
29
 
30
 
31
- function __construct(){}
32
 
33
  /**
34
  * Check and sort dependencies for each node
28
  protected $graph = array();
29
 
30
 
31
+ public function __construct(){}
32
 
33
  /**
34
  * Check and sort dependencies for each node
includes/classes/class-auxin-import.php CHANGED
@@ -55,7 +55,7 @@ class Auxin_Import {
55
 
56
 
57
 
58
- function __construct() {
59
 
60
  $this->importer_id = 'auxin-importer';
61
 
@@ -136,16 +136,16 @@ class Auxin_Import {
136
  /**
137
  * Display import page title
138
  */
139
- function header() {
140
  echo '<div class="wrap">';
141
- echo '<h2>' . __( 'Importing Demo Data', 'auxin-elements' ) . '</h2><br />';
142
  echo '<div class="aux-import-wrapper">';
143
  }
144
 
145
  /**
146
  * Close div.wrap
147
  */
148
- function footer() {
149
  echo '</div></div>';
150
  }
151
 
@@ -168,8 +168,8 @@ class Auxin_Import {
168
  // if wordpress importer is not available, try to install it
169
  if ( ! class_exists( 'WP_Importer' ) ) {
170
 
171
- printf( __( 'In order to import the demo data, you need to have "WordPress Importer" plugin installed. Please %s install and activate "WordPress Importer"%s and then try importing the demo data again.', 'auxin-elements' ),
172
- '<a href="'. admin_url( 'plugin-install.php?s=WordPress+Importer+zourbuth&tab=search' ) .'&tab=plugins">',
173
  '</a>'
174
  );
175
 
@@ -186,15 +186,15 @@ class Auxin_Import {
186
 
187
  } else {
188
 
189
- printf( __( 'The demo that you have requested is not valid. Please try to %s select a demo %s to import.', 'auxin-elements' ),
190
- '<a href="'. $this->demo_page_url .'">',
191
  '</a>'
192
  );
193
 
194
  }
195
 
196
  } else {
197
- printf( __( 'Please %s select a demo %s to import.', 'auxin-elements' ), '<a href="'. $this->demo_page_url .'">', '</a>' );
198
  }
199
 
200
  }
55
 
56
 
57
 
58
+ public function __construct() {
59
 
60
  $this->importer_id = 'auxin-importer';
61
 
136
  /**
137
  * Display import page title
138
  */
139
+ public function header() {
140
  echo '<div class="wrap">';
141
+ echo '<h2>' . esc_html__( 'Importing Demo Data', 'auxin-elements' ) . '</h2><br />';
142
  echo '<div class="aux-import-wrapper">';
143
  }
144
 
145
  /**
146
  * Close div.wrap
147
  */
148
+ public function footer() {
149
  echo '</div></div>';
150
  }
151
 
168
  // if wordpress importer is not available, try to install it
169
  if ( ! class_exists( 'WP_Importer' ) ) {
170
 
171
+ printf( esc_html__( 'In order to import the demo data, you need to have "WordPress Importer" plugin installed. Please %s install and activate "WordPress Importer"%s and then try importing the demo data again.', 'auxin-elements' ),
172
+ '<a href="'. esc_url( admin_url( 'plugin-install.php?s=WordPress+Importer+zourbuth&tab=search' ) ) .'&tab=plugins">',
173
  '</a>'
174
  );
175
 
186
 
187
  } else {
188
 
189
+ printf( esc_html__( 'The demo that you have requested is not valid. Please try to %s select a demo %s to import.', 'auxin-elements' ),
190
+ '<a href="'. esc_url( $this->demo_page_url ) .'">',
191
  '</a>'
192
  );
193
 
194
  }
195
 
196
  } else {
197
+ printf( esc_html__( 'Please %s select a demo %s to import.', 'auxin-elements' ), '<a href="'. esc_url( $this->demo_page_url ) .'">', '</a>' );
198
  }
199
 
200
  }
includes/classes/class-auxin-install.php CHANGED
@@ -25,7 +25,7 @@ class Auxin_Install {
25
  protected static $instance = null;
26
 
27
 
28
- function __construct(){
29
  // Add theme capabilities on theme activation
30
  add_action( 'after_switch_theme', array( $this, 'install' ) );
31
  // will be @deprecated in version 2.0
25
  protected static $instance = null;
26
 
27
 
28
+ public function __construct(){
29
  // Add theme capabilities on theme activation
30
  add_action( 'after_switch_theme', array( $this, 'install' ) );
31
  // will be @deprecated in version 2.0
includes/classes/class-auxin-master-nav-menu-admin.php CHANGED
@@ -19,7 +19,7 @@ class Auxin_Master_Nav_Menu_Admin {
19
  protected static $instance = null;
20
 
21
 
22
- function __construct(){
23
 
24
  // Back-end modification hooks
25
 
@@ -106,7 +106,7 @@ class Auxin_Master_Nav_Menu_Admin {
106
  global $pagenow;
107
 
108
  if( 'nav-menus.php' == $pagenow ){
109
- wp_enqueue_style ( 'auxin-edit-menus-css' , ADMIN_CSS_URL . 'other/edit-menus.css' , NULL, '1.1' );
110
  wp_enqueue_script( 'auxin-edit-menus-js' , ADMIN_JS_URL . 'solo/edit-menus.js' , array('jquery'), '1.1', true );
111
  }
112
  }
19
  protected static $instance = null;
20
 
21
 
22
+ public function __construct(){
23
 
24
  // Back-end modification hooks
25
 
106
  global $pagenow;
107
 
108
  if( 'nav-menus.php' == $pagenow ){
109
+ wp_enqueue_style ( 'auxin-edit-menus-css' , ADMIN_CSS_URL . 'other/edit-menus.css' , null, '1.1' );
110
  wp_enqueue_script( 'auxin-edit-menus-js' , ADMIN_JS_URL . 'solo/edit-menus.js' , array('jquery'), '1.1', true );
111
  }
112
  }
includes/classes/class-auxin-permalink.php CHANGED
@@ -27,7 +27,7 @@ if ( ! defined('ABSPATH') ) {
27
  public $default_post_types = array();
28
 
29
 
30
- function __construct() {
31
 
32
  if( defined('THEME_NAME_I18N') ) $this->theme_name = THEME_NAME_I18N;
33
  if( defined('THEME_ID' ) ) $this->theme_id = THEME_ID;
@@ -71,7 +71,7 @@ if ( ! defined('ABSPATH') ) {
71
  // store posted custom permalink slugs
72
  if( isset( $_POST['submit'] ) && isset( $_POST['_wp_http_referer'] ) ){
73
 
74
- if( strpos( $_POST['_wp_http_referer'],'options-permalink.php' ) !== FALSE ) {
75
  $this->store_permalink_options( $post_type );
76
  }
77
  }
@@ -388,7 +388,7 @@ if ( ! defined('ABSPATH') ) {
388
  * @return void
389
  */
390
  public function posttypes_permalink_section_callback_function(){
391
- _e('These settings control the permalinks used for theme\'s post types. These settings only apply when <strong>not using "default" permalink structure.</strong>.', 'auxin-elements' );
392
  echo "<br /><br />";
393
  }
394
 
@@ -399,12 +399,12 @@ if ( ! defined('ABSPATH') ) {
399
  * @return void
400
  */
401
  public function posttypes_permalink_fields_callback_function( $args ) {
402
- $output_suffix = $args['page_type'] !== 'single' ? '' : '<code>/' . __( 'sample-post', 'auxin-elements' ).'/</code>';
403
 
404
  $option_id = $this->get_structure( $args );
405
  $val = get_theme_mod( $option_id );
406
 
407
- printf( '<code>%1$s/</code><input id="%2$s" name="%2$s" type="text" value="%3$s" />%4$s', home_url(), $option_id, $val, $output_suffix );
408
  }
409
 
410
  /**
27
  public $default_post_types = array();
28
 
29
 
30
+ public function __construct() {
31
 
32
  if( defined('THEME_NAME_I18N') ) $this->theme_name = THEME_NAME_I18N;
33
  if( defined('THEME_ID' ) ) $this->theme_id = THEME_ID;
71
  // store posted custom permalink slugs
72
  if( isset( $_POST['submit'] ) && isset( $_POST['_wp_http_referer'] ) ){
73
 
74
+ if( strpos( $_POST['_wp_http_referer'],'options-permalink.php' ) !== false ) {
75
  $this->store_permalink_options( $post_type );
76
  }
77
  }
388
  * @return void
389
  */
390
  public function posttypes_permalink_section_callback_function(){
391
+ esc_html_e('These settings control the permalinks used for theme\'s post types. These settings only apply when <strong>not using "default" permalink structure.</strong>.', 'auxin-elements' );
392
  echo "<br /><br />";
393
  }
394
 
399
  * @return void
400
  */
401
  public function posttypes_permalink_fields_callback_function( $args ) {
402
+ $output_suffix = $args['page_type'] !== 'single' ? '' : '<code>/' . esc_html__( 'sample-post', 'auxin-elements' ).'/</code>';
403
 
404
  $option_id = $this->get_structure( $args );
405
  $val = get_theme_mod( $option_id );
406
 
407
+ printf( '<code>%1$s/</code><input id="%2$s" name="%2$s" type="text" value="%3$s" />%4$s', esc_url( home_url() ), esc_attr( $option_id ), esc_attr( $val ), $output_suffix );
408
  }
409
 
410
  /**
includes/classes/class-auxin-plugin-requirements.php CHANGED
@@ -31,7 +31,7 @@ if( ! class_exists( 'Auxin_Plugin_Requirements' ) ){
31
 
32
 
33
 
34
- function __construct(){
35
  global $auxin_plugins_dependency_map;
36
 
37
  if( empty( $auxin_plugins_dependency_map ) ){
@@ -71,7 +71,7 @@ if( ! class_exists( 'Auxin_Plugin_Requirements' ) ){
71
  if( $this->admin_notices && $notices = implode( '</li><li>', $this->admin_notices ) ) {
72
  $the_notice .= '<p>' . $pop_notice;
73
  $the_notice .= sprintf(
74
- __( '%s plugin has been disabled automatically due to following reason:', 'auxin-elements' ),
75
  '<strong>'. $this->requirements['config']['plugin_name'] . '</strong>'
76
  );
77
  $the_notice .= '<ul><li>'. $notices . '</li></ul></p>';
@@ -121,7 +121,7 @@ if( ! class_exists( 'Auxin_Plugin_Requirements' ) ){
121
  *
122
  * @return bool True, if in the active plugins list. False, not in the list.
123
  */
124
- function is_plugin_active( $plugin ) {
125
 
126
  if ( ! function_exists( 'is_plugin_active' ) ) {
127
  require_once ABSPATH . 'wp-admin/includes/plugin.php';
@@ -135,7 +135,7 @@ if( ! class_exists( 'Auxin_Plugin_Requirements' ) ){
135
  *
136
  * @return void
137
  */
138
- function update_plugins_dependencies(){
139
 
140
  // Flush the rewrite rules on plugin activation
141
  flush_rewrite_rules();
@@ -199,7 +199,7 @@ if( ! class_exists( 'Auxin_Plugin_Requirements' ) ){
199
  *
200
  * @return void
201
  */
202
- function check_plugins_requirement(){
203
 
204
  if( empty( $this->requirements['plugins'] ) ){
205
  return;
@@ -266,7 +266,7 @@ if( ! class_exists( 'Auxin_Plugin_Requirements' ) ){
266
  *
267
  * @return void
268
  */
269
- function check_theme_requirement(){
270
 
271
  if( empty( $this->requirements['themes'] ) ){
272
  return;
31
 
32
 
33
 
34
+ public function __construct(){
35
  global $auxin_plugins_dependency_map;
36
 
37
  if( empty( $auxin_plugins_dependency_map ) ){
71
  if( $this->admin_notices && $notices = implode( '</li><li>', $this->admin_notices ) ) {
72
  $the_notice .= '<p>' . $pop_notice;
73
  $the_notice .= sprintf(
74
+ esc_html__( '%s plugin has been disabled automatically due to following reason:', 'auxin-elements' ),
75
  '<strong>'. $this->requirements['config']['plugin_name'] . '</strong>'
76
  );
77
  $the_notice .= '<ul><li>'. $notices . '</li></ul></p>';
121
  *
122
  * @return bool True, if in the active plugins list. False, not in the list.
123
  */
124
+ public function is_plugin_active( $plugin ) {
125
 
126