Accordion - Version 2.2.32

Version Description

  • 2021-04-22 - fix - html output issue fixed
Download this release

Release Info

Developer pickplugins
Plugin Icon 128x128 Accordion
Version 2.2.32
Comparing to
See all releases

Code changes from version 2.2.28 to 2.2.32

accordions.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Accordions by PickPlugins
4
  Plugin URI: https://www.pickplugins.com/item/accordions-html-css3-responsive-accordion-grid-for-wordpress/?ref=dashboard
5
  Description: Fully responsive and mobile ready accordion grid for wordpress.
6
- Version: 2.2.28
7
  Author: PickPlugins
8
  Author URI: http://pickplugins.com
9
  Text Domain: accordions
@@ -21,7 +21,7 @@ class Accordions{
21
 
22
  define('accordions_plugin_url', plugins_url('/', __FILE__) );
23
  define('accordions_plugin_dir', plugin_dir_path( __FILE__ ) );
24
- define('accordions_version', '2.2.28' );
25
  define('accordions_plugin_name', 'Accordions' );
26
  define('accordions_plugin_basename', plugin_basename( __FILE__ ) );
27
 
3
  Plugin Name: Accordions by PickPlugins
4
  Plugin URI: https://www.pickplugins.com/item/accordions-html-css3-responsive-accordion-grid-for-wordpress/?ref=dashboard
5
  Description: Fully responsive and mobile ready accordion grid for wordpress.
6
+ Version: 2.2.32
7
  Author: PickPlugins
8
  Author URI: http://pickplugins.com
9
  Text Domain: accordions
21
 
22
  define('accordions_plugin_url', plugins_url('/', __FILE__) );
23
  define('accordions_plugin_dir', plugin_dir_path( __FILE__ ) );
24
+ define('accordions_version', '2.2.32' );
25
  define('accordions_plugin_name', 'Accordions' );
26
  define('accordions_plugin_basename', plugin_basename( __FILE__ ) );
27
 
includes/class-accordions-support.php DELETED
@@ -1,15 +0,0 @@
1
- <?php
2
- /*
3
- Plugin Name: License Manager - Clients
4
- Plugin URI: http://pickplugins.com
5
- Description: Awesome Question and Answer.
6
- Version: 2.0.1
7
- Text Domain: question-answer
8
- Author: pickplugins
9
- Author URI: http://pickplugins.com
10
- License: GPLv2 or later
11
- License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
- */
13
-
14
- if ( ! defined('ABSPATH')) exit; // if direct access
15
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/class-admin-notices.php CHANGED
@@ -34,7 +34,7 @@ class class_accordions_notices{
34
  ?>
35
  <div class="update-nag">
36
  <?php
37
- echo sprintf(__('Data migration required for <b>Accordions by PickPlugins</b> plugin, please <a class="button button-primary" href="%s">click to start</a> migration. Watch this <a target="_blank" href="https://www.youtube.com/watch?v=4ZGMA6hOoxs">video</a> first', 'accordions'), $actionurl);
38
  ?>
39
  </div>
40
  <?php
34
  ?>
35
  <div class="update-nag">
36
  <?php
37
+ echo sprintf(__('Data migration required for <b>Accordions by PickPlugins</b> plugin, please <a class="button button-primary" href="%s">click to start</a> migration. Watch this <a target="_blank" href="https://www.youtube.com/watch?v=4ZGMA6hOoxs">video</a> first', 'accordions'), esc_url_raw($actionurl));
38
  ?>
39
  </div>
40
  <?php
includes/class-post-meta-accordions-hook.php CHANGED
@@ -30,12 +30,12 @@ function accordions_metabox_content_shortcode($post_id){
30
  ?>
31
 
32
  <div class="copy-to-clipboard">
33
- <input type="text" value="[accordions id='<?php echo $post_id; ?>']"> <span class="copied"><?php echo __('Copied','accordions'); ?></span>
34
  <p class="description"><?php echo __('You can use this shortcode under post content','accordions'); ?></p>
35
  </div>
36
 
37
  <div class="copy-to-clipboard">
38
- <input type="text" value="[accordions_pplugins id='<?php echo $post_id; ?>']"> <span class="copied"><?php echo __('Copied','accordions'); ?></span>
39
  <p class="description"><?php echo __('To avoid conflict with 3rd party shortcode also used same <code>[accordions]</code>You can use this shortcode under post content.','accordions'); ?></p>
40
  </div>
41
 
@@ -76,12 +76,12 @@ function accordions_metabox_content_shortcode($post_id){
76
  ?>
77
 
78
  <div class="copy-to-clipboard">
79
- <input type="text" value="[accordions_tabs id='<?php echo $post_id; ?>']"> <span class="copied"><?php echo __('Copied','accordions'); ?></span>
80
  <p class="description"><?php echo __('You can use this shortcode under post content','accordions'); ?></p>
81
  </div>
82
 
83
  <div class="copy-to-clipboard">
84
- <input type="text" value="[accordions_tabs_pplugins id='<?php echo $post_id; ?>']"> <span class="copied"><?php echo __('Copied','accordions'); ?></span>
85
  <p class="description"><?php echo __('To avoid conflict with 3rd party shortcode also used same <code>[accordions_tabs]</code>You can use this shortcode under post content','accordions'); ?></p>
86
  </div>
87
 
@@ -1329,7 +1329,7 @@ add_action('accordions_post_meta_save','accordions_post_meta_save');
1329
 
1330
  function accordions_post_meta_save($job_id){
1331
 
1332
- $accordions_options = isset($_POST['accordions_options']) ? stripslashes_deep($_POST['accordions_options']) : '';
1333
  update_post_meta($job_id, 'accordions_options', $accordions_options);
1334
 
1335
 
30
  ?>
31
 
32
  <div class="copy-to-clipboard">
33
+ <input type="text" value="[accordions id='<?php echo esc_attr($post_id); ?>']"> <span class="copied"><?php echo __('Copied','accordions'); ?></span>
34
  <p class="description"><?php echo __('You can use this shortcode under post content','accordions'); ?></p>
35
  </div>
36
 
37
  <div class="copy-to-clipboard">
38
+ <input type="text" value="[accordions_pplugins id='<?php echo esc_attr($post_id); ?>']"> <span class="copied"><?php echo __('Copied','accordions'); ?></span>
39
  <p class="description"><?php echo __('To avoid conflict with 3rd party shortcode also used same <code>[accordions]</code>You can use this shortcode under post content.','accordions'); ?></p>
40
  </div>
41
 
76
  ?>
77
 
78
  <div class="copy-to-clipboard">
79
+ <input type="text" value="[accordions_tabs id='<?php echo esc_attr($post_id); ?>']"> <span class="copied"><?php echo __('Copied','accordions'); ?></span>
80
  <p class="description"><?php echo __('You can use this shortcode under post content','accordions'); ?></p>
81
  </div>
82
 
83
  <div class="copy-to-clipboard">
84
+ <input type="text" value="[accordions_tabs_pplugins id='<?php echo esc_attr($post_id); ?>']"> <span class="copied"><?php echo __('Copied','accordions'); ?></span>
85
  <p class="description"><?php echo __('To avoid conflict with 3rd party shortcode also used same <code>[accordions_tabs]</code>You can use this shortcode under post content','accordions'); ?></p>
86
  </div>
87
 
1329
 
1330
  function accordions_post_meta_save($job_id){
1331
 
1332
+ $accordions_options = isset($_POST['accordions_options']) ? accordions_recursive_sanitize_arr($_POST['accordions_options']) : '';
1333
  update_post_meta($job_id, 'accordions_options', $accordions_options);
1334
 
1335
 
includes/class-post-meta-accordions.php CHANGED
@@ -135,7 +135,7 @@ class class_accordions_post_meta{
135
  $(document).on('click', '.settings-tabs input[name="accordions_options[view_type]"]', function(){
136
  var val = $(this).val();
137
 
138
- console.log( val );
139
 
140
  $('.settings-tabs .tab-navs li').each(function( index ) {
141
  data_visible = $( this ).attr('data_visible');
@@ -164,7 +164,7 @@ class class_accordions_post_meta{
164
  </script>
165
 
166
  <div class="settings-tabs vertical">
167
- <input class="current_tab" type="hidden" name="accordions_options[current_tab]" value="<?php echo $current_tab; ?>">
168
  <div class="view-types">
169
 
170
  <?php
@@ -197,7 +197,7 @@ class class_accordions_post_meta{
197
  $data_visible = isset($tab['data_visible']) ? $tab['data_visible'] : '';
198
  $hidden = isset($tab['hidden']) ? $tab['hidden'] : false;
199
  ?>
200
- <li <?php if(!empty($data_visible)): ?> data_visible="<?php echo $data_visible; ?>" <?php endif; ?> class="tab-nav <?php if($hidden) echo 'hidden';?> <?php if($active) echo 'active';?>" data-id="<?php echo $id; ?>"><?php echo $title; ?></li>
201
  <?php
202
  }
203
  ?>
@@ -209,7 +209,7 @@ class class_accordions_post_meta{
209
  $active = $tab['active'];
210
  ?>
211
 
212
- <div class="tab-content <?php if($active) echo 'active';?>" id="<?php echo $id; ?>">
213
  <?php
214
  do_action('accordions_metabox_content_'.$id, $post_id);
215
  ?>
135
  $(document).on('click', '.settings-tabs input[name="accordions_options[view_type]"]', function(){
136
  var val = $(this).val();
137
 
138
+ //console.log( val );
139
 
140
  $('.settings-tabs .tab-navs li').each(function( index ) {
141
  data_visible = $( this ).attr('data_visible');
164
  </script>
165
 
166
  <div class="settings-tabs vertical">
167
+ <input class="current_tab" type="hidden" name="accordions_options[current_tab]" value="<?php echo esc_attr($current_tab); ?>">
168
  <div class="view-types">
169
 
170
  <?php
197
  $data_visible = isset($tab['data_visible']) ? $tab['data_visible'] : '';
198
  $hidden = isset($tab['hidden']) ? $tab['hidden'] : false;
199
  ?>
200
+ <li <?php if(!empty($data_visible)): ?> data_visible="<?php echo esc_attr($data_visible); ?>" <?php endif; ?> class="tab-nav <?php if($hidden) echo 'hidden';?> <?php if($active) echo 'active';?>" data-id="<?php echo esc_attr($id); ?>"><?php echo $title; ?></li>
201
  <?php
202
  }
203
  ?>
209
  $active = $tab['active'];
210
  ?>
211
 
212
+ <div class="tab-content <?php if($active) echo 'active';?>" id="<?php echo esc_attr($id); ?>">
213
  <?php
214
  do_action('accordions_metabox_content_'.$id, $post_id);
215
  ?>
includes/class-post-meta-product.php CHANGED
@@ -42,14 +42,14 @@ class class_accordions_post_meta_product{
42
  <select style="width: 100%;" id="accordions_id" name="accordions_id">
43
  <option>Select accordion</option>
44
  <?php if(!empty($accordions_id)): ?>
45
- <option value="<?php echo $accordions_id; ?>" selected><?php echo get_the_title($accordions_id); ?></option>
46
  <?php endif; ?>
47
  </select>
48
 
49
- <span class="clear-faq-tab button">CLear</span>
50
 
51
  <p>
52
- <input style="width: 100%;" type="text" placeholder="Tab title" value="<?php echo $accordions_tab_title; ?>" name="accordions_tab_title">
53
  </p>
54
 
55
 
42
  <select style="width: 100%;" id="accordions_id" name="accordions_id">
43
  <option>Select accordion</option>
44
  <?php if(!empty($accordions_id)): ?>
45
+ <option value="<?php echo esc_attr($accordions_id); ?>" selected><?php echo esc_html(get_the_title($accordions_id)); ?></option>
46
  <?php endif; ?>
47
  </select>
48
 
49
+ <span class="clear-faq-tab button">Clear</span>
50
 
51
  <p>
52
+ <input style="width: 100%;" type="text" placeholder="Tab title" value="<?php echo esc_attr($accordions_tab_title); ?>" name="accordions_tab_title">
53
  </p>
54
 
55
 
includes/class-post-types.php CHANGED
@@ -1,12 +1,6 @@
1
  <?php
2
 
3
- /*
4
- * @Author ParaTheme
5
- * @Folder Team/Includes
6
- * @version 3.0.5
7
 
8
- * Copyright: 2015 ParaTheme
9
- */
10
 
11
  if ( ! defined('ABSPATH')) exit; // if direct access
12
 
1
  <?php
2
 
 
 
 
 
3
 
 
 
4
 
5
  if ( ! defined('ABSPATH')) exit; // if direct access
6
 
includes/class-settings-hook.php CHANGED
@@ -96,7 +96,7 @@ function accordions_settings_content_general(){
96
 
97
  ?>
98
 
99
- <textarea id="text-val" rows="4"><?php echo $post_data_exported_json; ?></textarea><br/>
100
  <input type="button" class="button" id="dwn-btn" value="Download json"/>
101
 
102
  <style type="text/css">
@@ -150,7 +150,7 @@ function accordions_settings_content_general(){
150
  ?>
151
 
152
  <input placeholder="json file url" type="text" class="json_file" name="json_file" value="">
153
- <div class="accordions-import-json button">Import</div>
154
  <?php
155
  $html = ob_get_clean();
156
  $args = array(
@@ -288,11 +288,11 @@ if(!function_exists('accordions_settings_content_help_support')) {
288
 
289
  ?>
290
  <p style="color: #f00;"><i class="fas fa-spin fa-spinner"></i> Migration reset on process, please wait until complete.</p>
291
- <p><a href="<?php echo $url; ?>">Refresh</a> to check Migration reset stats</p>
292
 
293
  <script>
294
  setTimeout(function(){
295
- window.location.href = '<?php echo $url; ?>';
296
  }, 1000*20);
297
 
298
  </script>
@@ -314,7 +314,7 @@ if(!function_exists('accordions_settings_content_help_support')) {
314
  <p class="">Please click the button bellow to reset migration data, you can start over, Please use with caution, your new migrate data will deleted. you can use default <a href="<?php echo admin_url().'export.php'; ?>">export</a> menu to take your wcps, wcps layouts data saved.</p>
315
  <p>Please <a target="_blank" href="https://www.pickplugins.com/question/accordions-latest-version-data-migration-doesnt-work-here-is-the-solution/"><b>read this</b></a> if you have any issue on data migration</p>
316
 
317
- <p class="reset-migration"><a class="button button-primary" href="<?php echo $actionurl; ?>">Reset migration</a> <span style="display: none; color: #f2433f; margin: 0 5px"> Click again to confirm!</span></p>
318
 
319
  <script>
320
  jQuery(document).ready(function($){
@@ -505,108 +505,95 @@ if(!function_exists('accordions_settings_content_3rd_party_import')) {
505
 
506
  <div class="import-source">
507
  <div class="item">
508
- <img src="https://ps.w.org/easy-accordion-free/assets/banner-772x250.png?rev=2031404">
509
  <div class="">Easy Accordion</span></div>
510
  <div class="">By ShapedPlugin</div>
511
 
512
- <p class=""><a class="button button-primary" href="<?php echo $actionurl.'&source=easy-accordion-free'; ?>">Import data</a></p>
513
  </div>
514
  <div class="item">
515
- <img src="https://ps.w.org/responsive-accordion-and-collapse/assets/banner-772x250.png?rev=2031404">
516
  <div class="">Responsive Accordion And Collapse </div>
517
  <div class="">By wpshopmart</div>
518
 
519
- <p class=""><a class="button button-primary" href="<?php echo $actionurl.'&source=responsive-accordion-and-collapse'; ?>">Import data</a></p>
520
 
521
  </div>
522
 
523
  <div class="item">
524
- <img src="https://ps.w.org/tabs-responsive/assets/banner-772x250.png?rev=2031404">
525
  <div class="">Tabs Responsive </div>
526
  <div class="">By wpshopmart</div>
527
 
528
- <p class=""><a class="button button-primary" href="<?php echo $actionurl.'&source=tabs-responsive'; ?>">Import data</a></p>
529
 
530
  </div>
531
 
532
  <div class="item">
533
- <img src="https://ps.w.org/responsive-tabs/assets/banner-772x250.png?rev=2031404">
534
  <div class="">Responsive Tabs</div>
535
  <div class="">By WP Darko</div>
536
 
537
- <p class=""><a class="button button-primary" href="<?php echo $actionurl.'&source=responsive-tabs'; ?>">Import data</a></p>
538
 
539
  </div>
540
 
541
  <div class="item">
542
- <img src="https://ps.w.org/easy-responsive-tabs/assets/banner-772x250.jpg?rev=789170">
543
  <div class="">Easy Responsive Tabs </div>
544
  <div class="">By oscitas</div>
545
 
546
- <p class=""><a class="button button-primary" href="<?php echo $actionurl.'&source=easy-responsive-tabs'; ?>">Import data</a></p>
547
 
548
  </div>
549
 
550
 
551
  <div class="item">
552
- <img src="https://ps.w.org/everest-tab-lite/assets/banner-772x250.png?rev=1810732">
553
  <div class="">Everest Tab Lite</div>
554
  <div class="">By AccessPress Themes</div>
555
 
556
- <p class=""><a class="button button-primary" href="<?php echo $actionurl.'&source=everest-tab-lite'; ?>">Import data</a></p>
557
 
558
  </div>
559
 
560
  <div class="item">
561
- <img src="https://ps.w.org/quick-and-easy-faqs/assets/banner-772x250.png?rev=2255173">
562
  <div class="">Quick and Easy FAQs</div>
563
  <div class="">By Inspiry Themes</div>
564
 
565
- <p class=""><a class="button button-primary" href="<?php echo $actionurl.'&source=quick-and-easy-faqs'; ?>">Import data</a></p>
566
  </div>
567
 
568
  <div class="item">
569
- <img src="https://ps.w.org/shortcodes-ultimate/assets/banner-772x250.jpg?rev=1760590">
570
  <div class="">Shortcodes Ultimate</div>
571
  <div class="">By Vladimir Anokhin</div>
572
 
573
- <p class=""><a class="button button-primary" href="<?php echo $actionurl.'&source=shortcodes-ultimate'; ?>">Import data</a></p>
574
  </div>
575
 
576
  <div class="item">
577
- <img src="https://ps.w.org/sp-faq/assets/banner-772x250.png?rev=1988830">
578
  <div class="">WP responsive FAQ with category plugin</div>
579
  <div class="">By WP OnlineSupport</div>
580
 
581
- <p class=""><a class="button button-primary" href="<?php echo $actionurl.'&source=sp-faq'; ?>">Import data</a></p>
582
  </div>
583
 
584
  <div class="item">
585
- <img src="https://ps.w.org/squelch-tabs-and-accordions-shortcodes/assets/banner-772x250.png?rev=1988830">
586
  <div class="">Squelch Tabs and Accordions Shortcodes</div>
587
  <div class="">By Matt Lowe</div>
588
 
589
- <p class=""><a class="button button-primary" href="<?php echo $actionurl.'&source=squelch-tabs-and-accordions-shortcodes'; ?>">Import data</a></p>
590
  </div>
591
 
592
  <div class="item">
593
- <img src="https://ps.w.org/tabby-responsive-tabs/assets/banner-772x250.jpg?rev=1485141">
594
  <div class="">Tabby Responsive Tabs</div>
595
  <div class="">By cubecolour</div>
596
 
597
- <p class=""><a class="button button-primary" href="<?php echo $actionurl.'&source=tabby-responsive-tabs'; ?>">Import data</a></p>
598
  </div>
599
 
600
  <div class="item">
601
- <img src="https://ps.w.org/ultimate-faqs/assets/banner-772x250.png?rev=1805913">
602
  <div class="">Ultimate FAQ</div>
603
  <div class="">By Etoile Web Design</div>
604
 
605
- <p class=""><a class="button button-primary" href="<?php echo $actionurl.'&source=ultimate-faqs'; ?>">Import data</a></p>
606
  </div>
607
 
608
  <!-- <div class="item">-->
609
- <!-- <img src="https://ps.w.org/tabs-pro/assets/banner-772x250.png?rev=1570543">-->
610
  <!-- <div class="">Tab</div>-->
611
  <!-- <div class="">By themepoints</div>-->
612
  <!---->
@@ -617,12 +604,11 @@ if(!function_exists('accordions_settings_content_3rd_party_import')) {
617
  <div class="">Accordion Shortcodes</div>
618
  <div class="">By Phil Buchanan</div>
619
 
620
- <p class=""><a class="button button-primary" href="<?php echo $actionurl.'&source=accordion-shortcodes'; ?>">Import data</a></p>
621
  </div>
622
 
623
 
624
  <!-- <div class="item">-->
625
- <!-- <img src="https://ps.w.org/wc-shortcodes/assets/banner-772x250.jpg?rev=1585251">-->
626
  <!-- <div class="">Shortcodes by Angie Makes</div>-->
627
  <!-- <div class="">By Chris Baldelomar</div>-->
628
  <!---->
@@ -631,46 +617,41 @@ if(!function_exists('accordions_settings_content_3rd_party_import')) {
631
 
632
 
633
  <div class="item">
634
- <img src="https://ps.w.org/wp-shortcode/assets/banner-772x250.png?rev=865700">
635
  <div class="">WP Shortcode</div>
636
  <div class="">By MyThemeShop</div>
637
 
638
- <p class=""><a class="button button-primary" href="<?php echo $actionurl.'&source=wp-shortcode'; ?>">Import data</a></p>
639
  </div>
640
 
641
  <div class="item">
642
- <img src="https://ps.w.org/arconix-faq/assets/banner-772x250.png?rev=1063597">
643
  <div class="">Arconix FAQ</div>
644
  <div class="">By Tyche Softwares</div>
645
 
646
- <p class=""><a class="button button-primary" href="<?php echo $actionurl.'&source=arconix-faq'; ?>">Import data</a></p>
647
  </div>
648
 
649
  <div class="item">
650
- <img src="https://ps.w.org/meks-flexible-shortcodes/assets/banner-772x250.jpg?rev=1927393">
651
  <div class="">Meks Flexible Shortcodes</div>
652
  <div class="">By Meks</div>
653
 
654
- <p class=""><a class="button button-primary" href="<?php echo $actionurl.'&source=meks-flexible-shortcodes'; ?>">Import data</a></p>
655
  </div>
656
 
657
 
658
  <div class="item">
659
- <img src="https://i.imgur.com/B79SCcW.png">
660
  <div class="">Tabs Shortcode</div>
661
  <div class="">By CTLT</div>
662
 
663
- <p class=""><a class="button button-primary" href="<?php echo $actionurl.'&source=tabs-shortcode'; ?>">Import data</a></p>
664
  </div>
665
 
666
 
667
 
668
  <div class="item">
669
- <img src="https://i.imgur.com/LEUcSIV.png">
670
  <div class="">Wonder Tabs Trial</div>
671
  <div class="">By Magic Hills Pty Ltd</div>
672
 
673
- <p class=""><a class="button button-primary" href="<?php echo $actionurl.'&source=wonderplugin-tabs-trial'; ?>">Import data</a></p>
674
  </div>
675
 
676
 
@@ -1187,6 +1168,6 @@ add_action('accordions_settings_save', 'accordions_settings_save');
1187
 
1188
  function accordions_settings_save(){
1189
 
1190
- $accordions_settings = isset($_POST['accordions_settings']) ? stripslashes_deep($_POST['accordions_settings']) : array();
1191
  update_option('accordions_settings', $accordions_settings);
1192
  }
96
 
97
  ?>
98
 
99
+ <textarea id="text-val" rows="4"><?php echo esc_textarea($post_data_exported_json); ?></textarea><br/>
100
  <input type="button" class="button" id="dwn-btn" value="Download json"/>
101
 
102
  <style type="text/css">
150
  ?>
151
 
152
  <input placeholder="json file url" type="text" class="json_file" name="json_file" value="">
153
+ <div class="accordions-import-json button"><?php echo __('Import', 'accordions'); ?></div>
154
  <?php
155
  $html = ob_get_clean();
156
  $args = array(
288
 
289
  ?>
290
  <p style="color: #f00;"><i class="fas fa-spin fa-spinner"></i> Migration reset on process, please wait until complete.</p>
291
+ <p><a href="<?php echo esc_url_raw($url); ?>">Refresh</a> to check Migration reset stats</p>
292
 
293
  <script>
294
  setTimeout(function(){
295
+ window.location.href = '<?php echo esc_url_raw($url); ?>';
296
  }, 1000*20);
297
 
298
  </script>
314
  <p class="">Please click the button bellow to reset migration data, you can start over, Please use with caution, your new migrate data will deleted. you can use default <a href="<?php echo admin_url().'export.php'; ?>">export</a> menu to take your wcps, wcps layouts data saved.</p>
315
  <p>Please <a target="_blank" href="https://www.pickplugins.com/question/accordions-latest-version-data-migration-doesnt-work-here-is-the-solution/"><b>read this</b></a> if you have any issue on data migration</p>
316
 
317
+ <p class="reset-migration"><a class="button button-primary" href="<?php echo esc_url_raw($actionurl); ?>">Reset migration</a> <span style="display: none; color: #f2433f; margin: 0 5px"> Click again to confirm!</span></p>
318
 
319
  <script>
320
  jQuery(document).ready(function($){
505
 
506
  <div class="import-source">
507
  <div class="item">
 
508
  <div class="">Easy Accordion</span></div>
509
  <div class="">By ShapedPlugin</div>
510
 
511
+ <p class=""><a class="button button-primary" href="<?php echo esc_url_raw($actionurl).'&source=easy-accordion-free'; ?>">Import data</a></p>
512
  </div>
513
  <div class="item">
 
514
  <div class="">Responsive Accordion And Collapse </div>
515
  <div class="">By wpshopmart</div>
516
 
517
+ <p class=""><a class="button button-primary" href="<?php echo esc_url_raw($actionurl).'&source=responsive-accordion-and-collapse'; ?>">Import data</a></p>
518
 
519
  </div>
520
 
521
  <div class="item">
 
522
  <div class="">Tabs Responsive </div>
523
  <div class="">By wpshopmart</div>
524
 
525
+ <p class=""><a class="button button-primary" href="<?php echo esc_url_raw($actionurl).'&source=tabs-responsive'; ?>">Import data</a></p>
526
 
527
  </div>
528
 
529
  <div class="item">
 
530
  <div class="">Responsive Tabs</div>
531
  <div class="">By WP Darko</div>
532
 
533
+ <p class=""><a class="button button-primary" href="<?php echo esc_url_raw($actionurl).'&source=responsive-tabs'; ?>">Import data</a></p>
534
 
535
  </div>
536
 
537
  <div class="item">
 
538
  <div class="">Easy Responsive Tabs </div>
539
  <div class="">By oscitas</div>
540
 
541
+ <p class=""><a class="button button-primary" href="<?php echo esc_url_raw($actionurl).'&source=easy-responsive-tabs'; ?>">Import data</a></p>
542
 
543
  </div>
544
 
545
 
546
  <div class="item">
 
547
  <div class="">Everest Tab Lite</div>
548
  <div class="">By AccessPress Themes</div>
549
 
550
+ <p class=""><a class="button button-primary" href="<?php echo esc_url_raw($actionurl).'&source=everest-tab-lite'; ?>">Import data</a></p>
551
 
552
  </div>
553
 
554
  <div class="item">
 
555
  <div class="">Quick and Easy FAQs</div>
556
  <div class="">By Inspiry Themes</div>
557
 
558
+ <p class=""><a class="button button-primary" href="<?php echo esc_url_raw($actionurl).'&source=quick-and-easy-faqs'; ?>">Import data</a></p>
559
  </div>
560
 
561
  <div class="item">
 
562
  <div class="">Shortcodes Ultimate</div>
563
  <div class="">By Vladimir Anokhin</div>
564
 
565
+ <p class=""><a class="button button-primary" href="<?php echo esc_url_raw($actionurl).'&source=shortcodes-ultimate'; ?>">Import data</a></p>
566
  </div>
567
 
568
  <div class="item">
 
569
  <div class="">WP responsive FAQ with category plugin</div>
570
  <div class="">By WP OnlineSupport</div>
571
 
572
+ <p class=""><a class="button button-primary" href="<?php echo esc_url_raw($actionurl).'&source=sp-faq'; ?>">Import data</a></p>
573
  </div>
574
 
575
  <div class="item">
 
576
  <div class="">Squelch Tabs and Accordions Shortcodes</div>
577
  <div class="">By Matt Lowe</div>
578
 
579
+ <p class=""><a class="button button-primary" href="<?php echo esc_url_raw($actionurl).'&source=squelch-tabs-and-accordions-shortcodes'; ?>">Import data</a></p>
580
  </div>
581
 
582
  <div class="item">
 
583
  <div class="">Tabby Responsive Tabs</div>
584
  <div class="">By cubecolour</div>
585
 
586
+ <p class=""><a class="button button-primary" href="<?php echo esc_url_raw($actionurl).'&source=tabby-responsive-tabs'; ?>">Import data</a></p>
587
  </div>
588
 
589
  <div class="item">
 
590
  <div class="">Ultimate FAQ</div>
591
  <div class="">By Etoile Web Design</div>
592
 
593
+ <p class=""><a class="button button-primary" href="<?php echo esc_url_raw($actionurl).'&source=ultimate-faqs'; ?>">Import data</a></p>
594
  </div>
595
 
596
  <!-- <div class="item">-->
 
597
  <!-- <div class="">Tab</div>-->
598
  <!-- <div class="">By themepoints</div>-->
599
  <!---->
604
  <div class="">Accordion Shortcodes</div>
605
  <div class="">By Phil Buchanan</div>
606
 
607
+ <p class=""><a class="button button-primary" href="<?php echo esc_url_raw($actionurl).'&source=accordion-shortcodes'; ?>">Import data</a></p>
608
  </div>
609
 
610
 
611
  <!-- <div class="item">-->
 
612
  <!-- <div class="">Shortcodes by Angie Makes</div>-->
613
  <!-- <div class="">By Chris Baldelomar</div>-->
614
  <!---->
617
 
618
 
619
  <div class="item">
 
620
  <div class="">WP Shortcode</div>
621
  <div class="">By MyThemeShop</div>
622
 
623
+ <p class=""><a class="button button-primary" href="<?php echo esc_url_raw($actionurl).'&source=wp-shortcode'; ?>">Import data</a></p>
624
  </div>
625
 
626
  <div class="item">
 
627
  <div class="">Arconix FAQ</div>
628
  <div class="">By Tyche Softwares</div>
629
 
630
+ <p class=""><a class="button button-primary" href="<?php echo esc_url_raw($actionurl).'&source=arconix-faq'; ?>">Import data</a></p>
631
  </div>
632
 
633
  <div class="item">
 
634
  <div class="">Meks Flexible Shortcodes</div>
635
  <div class="">By Meks</div>
636
 
637
+ <p class=""><a class="button button-primary" href="<?php echo esc_url_raw($actionurl).'&source=meks-flexible-shortcodes'; ?>">Import data</a></p>
638
  </div>
639
 
640
 
641
  <div class="item">
 
642
  <div class="">Tabs Shortcode</div>
643
  <div class="">By CTLT</div>
644
 
645
+ <p class=""><a class="button button-primary" href="<?php echo esc_url_raw($actionurl).'&source=tabs-shortcode'; ?>">Import data</a></p>
646
  </div>
647
 
648
 
649
 
650
  <div class="item">
 
651
  <div class="">Wonder Tabs Trial</div>
652
  <div class="">By Magic Hills Pty Ltd</div>
653
 
654
+ <p class=""><a class="button button-primary" href="<?php echo esc_url_raw($actionurl).'&source=wonderplugin-tabs-trial'; ?>">Import data</a></p>
655
  </div>
656
 
657
 
1168
 
1169
  function accordions_settings_save(){
1170
 
1171
+ $accordions_settings = isset($_POST['accordions_settings']) ? accordions_recursive_sanitize_arr($_POST['accordions_settings']) : array();
1172
  update_option('accordions_settings', $accordions_settings);
1173
  }
includes/class-settings-tabs.php CHANGED
@@ -4,7 +4,7 @@ if ( ! defined('ABSPATH')) exit; // if direct access
4
  if( ! class_exists( 'settings_tabs_field' ) ) {
5
  class settings_tabs_field{
6
 
7
- // public $asset_dir_url = '';
8
  public $textdomain = 'settings-tabs';
9
 
10
  public function __construct(){
@@ -36,19 +36,113 @@ class settings_tabs_field{
36
  wp_enqueue_script( 'code-editor' );
37
  wp_enqueue_style( 'code-editor' );
38
 
39
- wp_enqueue_editor();
 
 
 
 
 
 
40
  }
41
 
42
  function field_template($option){
43
 
44
  $id = isset( $option['id'] ) ? $option['id'] : "";
 
 
 
45
  $is_error = isset( $option['is_error'] ) ? $option['is_error'] : false;
46
  $error_details = isset( $option['error_details'] ) ? $option['error_details'] : '';
47
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  ob_start();
49
 
50
  ?>
51
- <div class="setting-field <?php if($is_error) echo 'field-error'; ?>">
52
  <div class="field-lable">%s</div>
53
  <div class="field-input">%s
54
  <p class="description">%s</p>
@@ -330,6 +424,8 @@ class settings_tabs_field{
330
  $parent = isset( $option['parent'] ) ? $option['parent'] : "";
331
  $field_template = isset( $option['field_template'] ) ? $option['field_template'] : $this->field_template($option);
332
  $title = isset( $option['title'] ) ? $option['title'] : "";
 
 
333
  $details = isset( $option['details'] ) ? $option['details'] : "";
334
 
335
  $is_pro = isset( $option['is_pro'] ) ? $option['is_pro'] : false;
@@ -345,8 +441,6 @@ class settings_tabs_field{
345
 
346
 
347
  $media_url = !empty($media_url) ? $media_url : $default;
348
-
349
- $placeholder = 'https://i.imgur.com/qOPTTdQ.jpg';
350
  $media_url = !empty($media_url) ? $media_url : $placeholder;
351
  $media_basename = wp_basename($media_type);
352
 
@@ -355,7 +449,6 @@ class settings_tabs_field{
355
 
356
 
357
 
358
-
359
  ob_start();
360
  //wp_enqueue_media();
361
 
@@ -396,9 +489,9 @@ class settings_tabs_field{
396
  }
397
  ?>
398
  </div>
399
- <input class="media-input-value" type="hidden" name="<?php echo $field_name; ?>" id="media_input_<?php echo $css_id; ?>" value="<?php echo $value; ?>" />
400
- <div class="media-upload button" id="media_upload_<?php echo $css_id; ?>"><?php echo __('Upload', $this->textdomain);?></div>
401
- <div placeholder="<?php echo $placeholder; ?>" class="clear button" id="media_clear_<?php echo $css_id; ?>"><?php echo __('Clear', $this->textdomain);?></div>
402
  <div class="error-mgs"></div>
403
  </div>
404
 
@@ -424,6 +517,8 @@ class settings_tabs_field{
424
  $field_name = isset( $option['field_name'] ) ? $option['field_name'] : $id;
425
  $parent = isset( $option['parent'] ) ? $option['parent'] : "";
426
  $placeholder = isset( $option['placeholder'] ) ? $option['placeholder'] : "";
 
 
427
  $field_template = isset( $option['field_template'] ) ? $option['field_template'] : $this->field_template($option);
428
  $title = isset( $option['title'] ) ? $option['title'] : "";
429
  $details = isset( $option['details'] ) ? $option['details'] : "";
@@ -439,6 +534,7 @@ class settings_tabs_field{
439
  $media_type = get_post_mime_type( $value );
440
  $media_title= get_the_title( $value );
441
  $media_url = !empty($media_url) ? $media_url : '';
 
442
 
443
  $field_name = !empty( $field_name ) ? $field_name : $id;
444
  $field_name = !empty($parent) ? $parent.'['.$field_name.']' : $field_name;
@@ -477,9 +573,9 @@ class settings_tabs_field{
477
  }
478
  ?>
479
  </div>
480
- <input type="text" placeholder="<?php echo $placeholder; ?>" name="<?php echo $field_name; ?>" id="media_input_<?php echo $css_id; ?>" value="<?php echo $value; ?>" />
481
- <div class="media-upload button" id="media_upload_<?php echo $css_id; ?>"><?php echo __('Upload', $this->textdomain);?></div>
482
- <div class="clear button" id="media_clear_<?php echo $css_id; ?>"><?php echo __('Clear','accordions');?></div>
483
  <div class="error-mgs"></div>
484
  </div>
485
 
@@ -580,7 +676,7 @@ class settings_tabs_field{
580
 
581
  <div id="input-wrapper-<?php echo $css_id; ?>" class=" input-wrapper field-repeatable-wrapper
582
  field-repeatable-wrapper-<?php echo $css_id; ?>">
583
- <div add_html="<?php echo esc_attr($fieldHtml); ?>" class="add-repeat-field"><i class="far fa-plus-square"></i> <?php _e('Add','accordions'); ?></div>
584
  <div class="repeatable-field-list sortable" id="<?php echo $css_id; ?>">
585
  <?php
586
  if(!empty($values)):
@@ -938,7 +1034,7 @@ class settings_tabs_field{
938
 
939
  ob_start();
940
  ?>
941
- <input type="hidden" class="" name="<?php echo $field_name; ?>" id="<?php echo $css_id; ?>" placeholder="<?php echo $placeholder; ?>" value="<?php echo esc_attr($value); ?>" />
942
  <?php
943
 
944
  $input_html = ob_get_clean();
@@ -975,7 +1071,7 @@ class settings_tabs_field{
975
 
976
  ob_start();
977
  ?>
978
- <input type="text" class="" name="<?php echo $field_name; ?>" id="<?php echo $css_id; ?>" placeholder="<?php echo $placeholder; ?>" value="<?php echo esc_attr($value); ?>" />
979
  <?php
980
 
981
  $input_html = ob_get_clean();
@@ -1012,12 +1108,11 @@ class settings_tabs_field{
1012
 
1013
  $field_name = !empty($parent) ? $parent.'['.$id.']' : $id;
1014
 
1015
- $editor_settings= isset( $option['editor_settings'] ) ? $option['editor_settings'] : array('textarea_name'=>$field_name,'tinymce' => true, 'textarea_rows' => 15, );
1016
 
1017
  ob_start();
1018
 
1019
  ?>
1020
- Hello
1021
  <div id="field-wrapper-<?php echo $id; ?>" class="<?php if(!empty($depends)) echo 'dependency-field'; ?> field-wrapper field-wp_editor-wrapper
1022
  field-wp_editor-wrapper-<?php echo $id; ?>">
1023
  <?php
@@ -1068,7 +1163,7 @@ class settings_tabs_field{
1068
  ob_start();
1069
  ?>
1070
  <div class="text-icon">
1071
- <span class="icon"><?php echo $option_value; ?></span><input type="text" class="" name="<?php echo $field_name; ?>" id="<?php echo $css_id; ?>" placeholder="<?php echo esc_attr($placeholder); ?>" value="<?php echo esc_attr($option_value); ?>" />
1072
  </div>
1073
  <style type="text/css">
1074
  .text-icon{}
@@ -1133,7 +1228,7 @@ class settings_tabs_field{
1133
  ob_start();
1134
  ?>
1135
  <div class="range-input">
1136
- <span class="range-value"><?php echo $value; ?></span><input type="range" min="<?php if($min) echo $min; ?>" max="<?php if($max) echo $max; ?>" step="<?php if($step) echo $step; ?>" class="" name="<?php echo $field_name; ?>" id="<?php echo $css_id; ?>" value="<?php echo $value; ?>" />
1137
  </div>
1138
 
1139
  <script>
@@ -1378,7 +1473,7 @@ class settings_tabs_field{
1378
 
1379
 
1380
  ?>
1381
- <label for='<?php echo $for;?>'><input name='<?php echo $field_name; ?>[]' type='checkbox' id='<?php echo $for; ?>' value='<?php echo $key;?>' <?php echo $checked;?>><span><?php echo $value;?></span></label>
1382
 
1383
  <?php
1384
 
@@ -1429,7 +1524,7 @@ class settings_tabs_field{
1429
  $checked = ( $key == $option_value ) ? "checked" : "";
1430
  $for = !empty($for) ? $for.'-'.$css_id."-".$key : $css_id."-".$key;
1431
  ?>
1432
- <label for="<?php echo $for;?>"><input name="<?php echo $field_name; ?>" type="radio" id="<?php echo $for; ?>" value="<?php echo $key;?>" <?php echo $checked;?>><span><?php echo $value;?></span></label>
1433
 
1434
  <?php
1435
  endforeach;
@@ -1453,6 +1548,7 @@ class settings_tabs_field{
1453
  //$args = is_array( $args ) ? $args : $this->generate_args_from_string( $args );
1454
  $option_value = isset( $option['value'] ) ? $option['value'] : '';
1455
  $default = isset( $option['default'] ) ? $option['default'] : '';
 
1456
 
1457
  $is_pro = isset( $option['is_pro'] ) ? $option['is_pro'] : false;
1458
  $pro_text = isset( $option['pro_text'] ) ? $option['pro_text'] : '';
@@ -1487,14 +1583,15 @@ class settings_tabs_field{
1487
  //var_dump($checked);
1488
 
1489
  ?>
1490
- <label title="<?php echo $name; ?>" class="<?php if($checked =='checked') echo 'active';?> <?php if($disabled == true) echo 'disabled';?>">
1491
- <input <?php if($disabled) echo 'disabled'; ?> name="<?php echo $field_name; ?>" type="radio" id="<?php echo $css_id; ?>-<?php echo $key; ?>" value="<?php echo $key; ?>" <?php echo $checked; ?>>
1492
 
1493
  <?php
1494
  if(!empty($thumb)):
 
1495
  ?>
1496
- <img style="width: <?php echo $width; ?>;" alt="<?php echo $name; ?>" src="<?php echo $thumb; ?>">
1497
- <div style="padding: 5px;" class="name"><?php echo $name; ?></div>
1498
 
1499
  <?php
1500
  else:
@@ -1515,19 +1612,6 @@ class settings_tabs_field{
1515
  endforeach;
1516
  ?>
1517
  </div>
1518
- <script>
1519
- jQuery(document).ready(function($){
1520
- $(document).on("click", ".radio-img label", function () {
1521
- if($(this).hasClass('disabled')){
1522
- return;
1523
- }
1524
-
1525
- $(this).parent().children("label").removeClass("active");
1526
- $(this).addClass("active");
1527
-
1528
- })
1529
- })
1530
- </script>
1531
 
1532
  <style type="text/css">
1533
  .radio-img{}
@@ -1583,6 +1667,7 @@ class settings_tabs_field{
1583
  .radio-img img{
1584
 
1585
  vertical-align: top;
 
1586
  }
1587
 
1588
  </style>
@@ -1622,7 +1707,7 @@ class settings_tabs_field{
1622
 
1623
  ob_start();
1624
  ?>
1625
- <input type="text" autocomplete="off" name="<?php echo $field_name; ?>" id="<?php echo $css_id; ?>" placeholder="<?php echo $placeholder; ?>" value="<?php echo $value; ?>" />
1626
  <script>jQuery(document).ready(function($) { $("#<?php echo $css_id; ?>").datepicker({ dateFormat: "<?php echo $format; ?>" });});</script>
1627
  <?php
1628
 
@@ -1655,7 +1740,7 @@ class settings_tabs_field{
1655
 
1656
  ob_start();
1657
  ?>
1658
- <input colorPicker="" name="<?php echo $field_name; ?>" id="<?php echo $css_id; ?>" placeholder="<?php echo esc_attr($placeholder); ?>" value="<?php echo esc_attr($value); ?>" />
1659
  <?php
1660
 
1661
  $input_html = ob_get_clean();
@@ -1701,7 +1786,7 @@ class settings_tabs_field{
1701
  ?>
1702
  <div class="">
1703
  <span><?php echo $arg_key; ?></span>
1704
- <input name="<?php echo $field_name; ?>[<?php echo $arg_key; ?>]" id="<?php echo $arg_key.'-'.$css_id; ?>" value="<?php echo $item_value; ?>" />
1705
  <script>jQuery(document).ready(function($) { $("#<?php echo $arg_key.'-'.$css_id; ?>").wpColorPicker();});</script>
1706
  </div>
1707
 
4
  if( ! class_exists( 'settings_tabs_field' ) ) {
5
  class settings_tabs_field{
6
 
7
+ //public $asset_dir_url = '';
8
  public $textdomain = 'settings-tabs';
9
 
10
  public function __construct(){
36
  wp_enqueue_script( 'code-editor' );
37
  wp_enqueue_style( 'code-editor' );
38
 
39
+ wp_enqueue_script( 'jquery.lazy' );
40
+
41
+ if (function_exists('wp_enqueue_editor')) {
42
+ wp_enqueue_editor();
43
+ }
44
+
45
+
46
  }
47
 
48
  function field_template($option){
49
 
50
  $id = isset( $option['id'] ) ? $option['id'] : "";
51
+ $wraper_class = isset( $option['wraper_class'] ) ? $option['wraper_class'] : "";
52
+ $conditions = isset( $option['conditions'] ) ? $option['conditions'] : array();
53
+
54
  $is_error = isset( $option['is_error'] ) ? $option['is_error'] : false;
55
  $error_details = isset( $option['error_details'] ) ? $option['error_details'] : '';
56
 
57
+
58
+
59
+ if(!empty($conditions)):
60
+
61
+ $depends = '';
62
+
63
+ $field = isset($conditions['field']) ? $conditions['field'] :'';
64
+ $cond_value = isset($conditions['value']) ? $conditions['value']: '';
65
+ $type = isset($conditions['type']) ? $conditions['type'] : '';
66
+ $pattern = isset($conditions['pattern']) ? $conditions['pattern'] : '';
67
+ $modifier = isset($conditions['modifier']) ? $conditions['modifier'] : '';
68
+ $like = isset($conditions['like']) ? $conditions['like'] : '';
69
+ $strict = isset($conditions['strict']) ? $conditions['strict'] : '';
70
+ $empty = isset($conditions['empty']) ? $conditions['empty'] : '';
71
+ $sign = isset($conditions['sign']) ? $conditions['sign'] : '';
72
+ $min = isset($conditions['min']) ? $conditions['min'] : '';
73
+ $max = isset($conditions['max']) ? $conditions['max'] : '';
74
+
75
+ $depends .= "{'[name=$field]':";
76
+ $depends .= '{';
77
+
78
+ if(!empty($type)):
79
+ $depends .= "'type':";
80
+ $depends .= "'".$type."'";
81
+ endif;
82
+
83
+ if(!empty($modifier)):
84
+ $depends .= ",'modifier':";
85
+ $depends .= "'".$modifier."'";
86
+ endif;
87
+
88
+ if(!empty($like)):
89
+ $depends .= ",'like':";
90
+ $depends .= "'".$like."'";
91
+ endif;
92
+
93
+ if(!empty($strict)):
94
+ $depends .= ",'strict':";
95
+ $depends .= "'".$strict."'";
96
+ endif;
97
+
98
+ if(!empty($empty)):
99
+ $depends .= ",'empty':";
100
+ $depends .= "'".$empty."'";
101
+ endif;
102
+
103
+ if(!empty($sign)):
104
+ $depends .= ",'sign':";
105
+ $depends .= "'".$sign."'";
106
+ endif;
107
+
108
+ if(!empty($min)):
109
+ $depends .= ",'min':";
110
+ $depends .= "'".$min."'";
111
+ endif;
112
+
113
+ if(!empty($max)):
114
+ $depends .= ",'max':";
115
+ $depends .= "'".$max."'";
116
+ endif;
117
+ if(!empty($cond_value)):
118
+ $depends .= ",'value':";
119
+ if(is_array($cond_value)):
120
+ $count= count($cond_value);
121
+ $i = 1;
122
+ $depends .= "[";
123
+ foreach ($cond_value as $val):
124
+ $depends .= "'".$val."'";
125
+ if($i<$count)
126
+ $depends .= ",";
127
+ $i++;
128
+ endforeach;
129
+ $depends .= "]";
130
+ else:
131
+ $depends .= "[";
132
+ $depends .= "'".$cond_value."'";
133
+ $depends .= "]";
134
+ endif;
135
+ endif;
136
+ $depends .= '}}';
137
+
138
+ endif;
139
+
140
+
141
+
142
  ob_start();
143
 
144
  ?>
145
+ <div <?php if(!empty($depends)) {?> data-depends="[<?php echo $depends; ?>]" <?php } ?> class="setting-field <?php if($is_error) echo 'field-error'; ?> <?php echo $wraper_class; ?> <?php if(!empty($depends)) echo 'dependency-field'; ?>">
146
  <div class="field-lable">%s</div>
147
  <div class="field-input">%s
148
  <p class="description">%s</p>
424
  $parent = isset( $option['parent'] ) ? $option['parent'] : "";
425
  $field_template = isset( $option['field_template'] ) ? $option['field_template'] : $this->field_template($option);
426
  $title = isset( $option['title'] ) ? $option['title'] : "";
427
+ $placeholder = isset( $option['placeholder'] ) ? $option['placeholder'] : "";
428
+
429
  $details = isset( $option['details'] ) ? $option['details'] : "";
430
 
431
  $is_pro = isset( $option['is_pro'] ) ? $option['is_pro'] : false;
441
 
442
 
443
  $media_url = !empty($media_url) ? $media_url : $default;
 
 
444
  $media_url = !empty($media_url) ? $media_url : $placeholder;
445
  $media_basename = wp_basename($media_type);
446
 
449
 
450
 
451
 
 
452
  ob_start();
453
  //wp_enqueue_media();
454
 
489
  }
490
  ?>
491
  </div>
492
+ <input class="media-input-value" type="hidden" name="<?php echo esc_attr($field_name); ?>" id="media_input_<?php echo esc_attr($css_id); ?>" value="<?php echo esc_attr($value); ?>" />
493
+ <div class="media-upload button" id="media_upload_<?php echo esc_attr($css_id); ?>"><?php echo __('Upload', $this->textdomain);?></div>
494
+ <div placeholder="<?php echo esc_attr($placeholder); ?>" class="clear button" id="media_clear_<?php echo esc_attr($css_id); ?>"><?php echo __('Clear', $this->textdomain);?></div>
495
  <div class="error-mgs"></div>
496
  </div>
497
 
517
  $field_name = isset( $option['field_name'] ) ? $option['field_name'] : $id;
518
  $parent = isset( $option['parent'] ) ? $option['parent'] : "";
519
  $placeholder = isset( $option['placeholder'] ) ? $option['placeholder'] : "";
520
+ $placeholder_img = isset( $option['placeholder_img'] ) ? $option['placeholder_img'] : "";
521
+
522
  $field_template = isset( $option['field_template'] ) ? $option['field_template'] : $this->field_template($option);
523
  $title = isset( $option['title'] ) ? $option['title'] : "";
524
  $details = isset( $option['details'] ) ? $option['details'] : "";
534
  $media_type = get_post_mime_type( $value );
535
  $media_title= get_the_title( $value );
536
  $media_url = !empty($media_url) ? $media_url : '';
537
+ $media_url = !empty($media_url) ? $media_url : $placeholder_img;
538
 
539
  $field_name = !empty( $field_name ) ? $field_name : $id;
540
  $field_name = !empty($parent) ? $parent.'['.$field_name.']' : $field_name;
573
  }
574
  ?>
575
  </div>
576
+ <input type="text" placeholder="<?php echo esc_attr($placeholder); ?>" name="<?php echo esc_attr($field_name); ?>" id="media_input_<?php echo esc_attr($css_id); ?>" value="<?php echo esc_attr($value); ?>" />
577
+ <div class="media-upload button" id="media_upload_<?php echo esc_attr($css_id); ?>"><?php echo __('Upload', $this->textdomain);?></div>
578
+ <div class="clear button" id="media_clear_<?php echo esc_attr($css_id); ?>"><?php echo __('Clear','post-grid');?></div>
579
  <div class="error-mgs"></div>
580
  </div>
581
 
676
 
677
  <div id="input-wrapper-<?php echo $css_id; ?>" class=" input-wrapper field-repeatable-wrapper
678
  field-repeatable-wrapper-<?php echo $css_id; ?>">
679
+ <div add_html="<?php echo esc_attr($fieldHtml); ?>" class="add-repeat-field"><i class="far fa-plus-square"></i> <?php _e('Add','post-grid'); ?></div>
680
  <div class="repeatable-field-list sortable" id="<?php echo $css_id; ?>">
681
  <?php
682
  if(!empty($values)):
1034
 
1035
  ob_start();
1036
  ?>
1037
+ <input type="hidden" class="" name="<?php echo esc_attr($field_name); ?>" id="<?php echo esc_attr($css_id); ?>" placeholder="<?php echo esc_attr($placeholder); ?>" value="<?php echo esc_attr($value); ?>" />
1038
  <?php
1039
 
1040
  $input_html = ob_get_clean();
1071
 
1072
  ob_start();
1073
  ?>
1074
+ <input type="text" class="" name="<?php echo esc_attr($field_name); ?>" id="<?php echo esc_attr($css_id); ?>" placeholder="<?php echo esc_attr($placeholder); ?>" value="<?php echo esc_attr($value); ?>" />
1075
  <?php
1076
 
1077
  $input_html = ob_get_clean();
1108
 
1109
  $field_name = !empty($parent) ? $parent.'['.$id.']' : $id;
1110
 
1111
+ $editor_settings= isset( $option['editor_settings'] ) ? $option['editor_settings'] : array('textarea_name'=>$field_name, 'teeny' => true, 'textarea_rows' => 15, );
1112
 
1113
  ob_start();
1114
 
1115
  ?>
 
1116
  <div id="field-wrapper-<?php echo $id; ?>" class="<?php if(!empty($depends)) echo 'dependency-field'; ?> field-wrapper field-wp_editor-wrapper
1117
  field-wp_editor-wrapper-<?php echo $id; ?>">
1118
  <?php
1163
  ob_start();
1164
  ?>
1165
  <div class="text-icon">
1166
+ <span class="icon"><?php echo esc_html($option_value); ?></span><input type="text" class="" name="<?php echo esc_attr($field_name); ?>" id="<?php echo esc_attr($css_id); ?>" placeholder="<?php echo esc_attr($placeholder); ?>" value="<?php echo esc_attr($option_value); ?>" />
1167
  </div>
1168
  <style type="text/css">
1169
  .text-icon{}
1228
  ob_start();
1229
  ?>
1230
  <div class="range-input">
1231
+ <span class="range-value"><?php echo esc_html($value); ?></span><input type="range" min="<?php if($min) echo esc_attr($min); ?>" max="<?php if($max) echo esc_attr($max); ?>" step="<?php if($step) echo esc_attr($step); ?>" class="" name="<?php echo esc_attr($field_name); ?>" id="<?php echo esc_attr($css_id); ?>" value="<?php echo esc_attr($value); ?>" />
1232
  </div>
1233
 
1234
  <script>
1473
 
1474
 
1475
  ?>
1476
+ <label for='<?php echo esc_attr($for);?>'><input name='<?php echo esc_attr($field_name); ?>[]' type='checkbox' id='<?php echo esc_attr($for); ?>' value='<?php echo esc_attr($key);?>' <?php echo esc_attr($checked);?>><span><?php echo esc_html($value);?></span></label>
1477
 
1478
  <?php
1479
 
1524
  $checked = ( $key == $option_value ) ? "checked" : "";
1525
  $for = !empty($for) ? $for.'-'.$css_id."-".$key : $css_id."-".$key;
1526
  ?>
1527
+ <label for="<?php echo esc_attr($for);?>"><input name="<?php echo esc_attr($field_name); ?>" type="radio" id="<?php echo esc_attr($for); ?>" value="<?php echo esc_attr($key);?>" <?php echo esc_attr($checked);?>><span><?php echo esc_html($value);?></span></label>
1528
 
1529
  <?php
1530
  endforeach;
1548
  //$args = is_array( $args ) ? $args : $this->generate_args_from_string( $args );
1549
  $option_value = isset( $option['value'] ) ? $option['value'] : '';
1550
  $default = isset( $option['default'] ) ? $option['default'] : '';
1551
+ $lazy_load_img = isset( $option['lazy_load_img'] ) ? $option['lazy_load_img'] : '';
1552
 
1553
  $is_pro = isset( $option['is_pro'] ) ? $option['is_pro'] : false;
1554
  $pro_text = isset( $option['pro_text'] ) ? $option['pro_text'] : '';
1583
  //var_dump($checked);
1584
 
1585
  ?>
1586
+ <label style="width: <?php echo esc_attr($width); ?>;" title="<?php echo esc_attr($name); ?>" class="<?php if($checked =='checked') echo 'active';?> <?php if($disabled == true) echo 'disabled';?>">
1587
+ <input <?php if($disabled) echo 'disabled'; ?> name="<?php echo esc_attr($field_name); ?>" type="radio" id="<?php echo esc_attr($css_id); ?>-<?php echo esc_attr($key); ?>" value="<?php echo esc_attr($key); ?>" <?php echo esc_attr($checked); ?>>
1588
 
1589
  <?php
1590
  if(!empty($thumb)):
1591
+
1592
  ?>
1593
+ <img class="lazy" alt="<?php echo $name; ?>" data-src="<?php echo $thumb; ?>" src="<?php echo $lazy_load_img; ?>">
1594
+ <div style="padding: 5px;" class="name"><?php echo $name; ?></div>
1595
 
1596
  <?php
1597
  else:
1612
  endforeach;
1613
  ?>
1614
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
1615
 
1616
  <style type="text/css">
1617
  .radio-img{}
1667
  .radio-img img{
1668
 
1669
  vertical-align: top;
1670
+ width: 100%;
1671
  }
1672
 
1673
  </style>
1707
 
1708
  ob_start();
1709
  ?>
1710
+ <input type="text" autocomplete="off" name="<?php echo esc_attr($field_name); ?>" id="<?php echo esc_attr($css_id); ?>" placeholder="<?php echo esc_attr($placeholder); ?>" value="<?php echo esc_attr($value); ?>" />
1711
  <script>jQuery(document).ready(function($) { $("#<?php echo $css_id; ?>").datepicker({ dateFormat: "<?php echo $format; ?>" });});</script>
1712
  <?php
1713
 
1740
 
1741
  ob_start();
1742
  ?>
1743
+ <input colorPicker="" name="<?php echo esc_attr($field_name); ?>" id="<?php echo esc_attr($css_id); ?>" placeholder="<?php echo esc_attr($placeholder); ?>" value="<?php echo esc_attr($value); ?>" />
1744
  <?php
1745
 
1746
  $input_html = ob_get_clean();
1786
  ?>
1787
  <div class="">
1788
  <span><?php echo $arg_key; ?></span>
1789
+ <input name="<?php echo esc_attr($field_name); ?>[<?php echo esc_attr($arg_key); ?>]" id="<?php echo esc_attr($arg_key).'-'.esc_attr($css_id); ?>" value="<?php echo esc_attr($item_value); ?>" />
1790
  <script>jQuery(document).ready(function($) { $("#<?php echo $arg_key.'-'.$css_id; ?>").wpColorPicker();});</script>
1791
  </div>
1792
 
includes/class-shortcodes.php CHANGED
@@ -40,13 +40,13 @@ class class_accordions_shortcodes {
40
  ob_start();
41
 
42
  if ($view_type == 'tabs'):
43
- ?><div id="accordions-tabs-<?php echo $post_id; ?>" class="accordions-tabs-<?php echo $post_id; ?> accordions-tabs accordions">
44
  <?php
45
  do_action('accordions_tabs_main', $atts);
46
  ?>
47
  </div><?php
48
  else:
49
- ?><div id="accordions-<?php echo $post_id; ?>" class="accordions-<?php echo $post_id; ?> accordions">
50
  <?php
51
  do_action('accordions_main', $atts);
52
  ?>
@@ -71,7 +71,7 @@ class class_accordions_shortcodes {
71
  ob_start();
72
 
73
  ?>
74
- <div id="accordions-tabs-<?php echo $post_id; ?>" class="accordions-tabs-<?php echo $post_id; ?> accordions-tabs accordions">
75
  <?php
76
  do_action('accordions_tabs_main', $atts);
77
  ?>
40
  ob_start();
41
 
42
  if ($view_type == 'tabs'):
43
+ ?><div id="accordions-tabs-<?php echo esc_attr($post_id); ?>" class="accordions-tabs-<?php echo esc_attr($post_id); ?> accordions-tabs accordions">
44
  <?php
45
  do_action('accordions_tabs_main', $atts);
46
  ?>
47
  </div><?php
48
  else:
49
+ ?><div id="accordions-<?php echo esc_attr($post_id); ?>" class="accordions-<?php echo esc_attr($post_id); ?> accordions">
50
  <?php
51
  do_action('accordions_main', $atts);
52
  ?>
71
  ob_start();
72
 
73
  ?>
74
+ <div id="accordions-tabs-<?php echo esc_attr($post_id); ?>" class="accordions-tabs-<?php echo esc_attr($post_id); ?> accordions-tabs accordions">
75
  <?php
76
  do_action('accordions_tabs_main', $atts);
77
  ?>
includes/functions-wc.php CHANGED
@@ -15,7 +15,7 @@ function accordions_product_tab( $tabs ) {
15
 
16
  if(!empty($accordions_id)):
17
  $tabs['accordions_faq'] = array(
18
- 'title' => $accordions_tab_title,
19
  'priority' => 50,
20
  'callback' => 'woo_product_tab_accordions_content'
21
  );
15
 
16
  if(!empty($accordions_id)):
17
  $tabs['accordions_faq'] = array(
18
+ 'title' => esc_html($accordions_tab_title),
19
  'priority' => 50,
20
  'callback' => 'woo_product_tab_accordions_content'
21
  );
includes/functions.php CHANGED
@@ -463,8 +463,10 @@ function accordions_ajax_import_json(){
463
 
464
  foreach ($json_a as $post_id=>$post_data){
465
 
466
- $meta_fields = $post_data['meta_fields'];
467
- $title = $post_data['title'];
 
 
468
 
469
  // Create post object
470
  $my_post = array(
@@ -476,7 +478,7 @@ function accordions_ajax_import_json(){
476
 
477
  $post_inserted_id = wp_insert_post( $my_post );
478
 
479
- foreach ($meta_fields as $meta_key=>$meta_value){
480
  update_post_meta( $post_inserted_id, $meta_key, $meta_value );
481
  }
482
  }
@@ -526,7 +528,7 @@ function accordions_youtube($atts, $content = null ){
526
  $height = $atts['height'];
527
 
528
  $html = '';
529
- $html.= '<iframe width="'.$width.'" height="'.$height.'" src="https://www.youtube.com/embed/'.$video_id.'" frameborder="0" allowfullscreen></iframe>';
530
 
531
  return $html;
532
  }
@@ -551,8 +553,8 @@ add_filter( 'manage_accordions_posts_columns' , 'accordions_add_shortcode_column
551
  function accordions_posts_shortcode_display( $column, $post_id ) {
552
  if ($column == 'shortcode'){
553
  ?>
554
- <input style="background:#bfefff" type="text" onClick="this.select();" value="[accordions <?php echo 'id=&quot;'.$post_id.'&quot;';?>]" /><br />
555
- <textarea cols="50" rows="1" style="background:#bfefff" onClick="this.select();" ><?php echo '<?php echo do_shortcode("[accordions id='; echo "'".$post_id."']"; echo '"); ?>'; ?></textarea>
556
  <?php
557
 
558
  }
@@ -586,7 +588,19 @@ function accordions_paratheme_hex2rgb($hex) {
586
 
587
 
588
 
 
589
 
 
 
 
 
 
 
 
 
 
 
 
590
 
591
 
592
 
463
 
464
  foreach ($json_a as $post_id=>$post_data){
465
 
466
+ $meta_fields = accordions_recursive_sanitize_arr($post_data['meta_fields']);
467
+
468
+
469
+ $title = sanitize_text_field($post_data['title']);
470
 
471
  // Create post object
472
  $my_post = array(
478
 
479
  $post_inserted_id = wp_insert_post( $my_post );
480
 
481
+ foreach ($meta_fields as $meta_key=> $meta_value){
482
  update_post_meta( $post_inserted_id, $meta_key, $meta_value );
483
  }
484
  }
528
  $height = $atts['height'];
529
 
530
  $html = '';
531
+ $html.= '<iframe width="'.esc_attr($width).'" height="'.esc_attr($height).'" src="https://www.youtube.com/embed/'.esc_attr($video_id).'" frameborder="0" allowfullscreen></iframe>';
532
 
533
  return $html;
534
  }
553
  function accordions_posts_shortcode_display( $column, $post_id ) {
554
  if ($column == 'shortcode'){
555
  ?>
556
+ <input style="background:#bfefff" type="text" onClick="this.select();" value="[accordions <?php echo 'id=&quot;'.esc_attr($post_id).'&quot;';?>]" /><br />
557
+ <textarea cols="50" rows="1" style="background:#bfefff" onClick="this.select();" ><?php echo '<?php echo do_shortcode("[accordions id='; echo "'".esc_attr($post_id)."']"; echo '"); ?>'; ?></textarea>
558
  <?php
559
 
560
  }
588
 
589
 
590
 
591
+ function accordions_recursive_sanitize_arr($array) {
592
 
593
+ foreach ( $array as $key => &$value ) {
594
+ if ( is_array( $value ) ) {
595
+ $value = accordions_recursive_sanitize_arr($value);
596
+ }
597
+ else {
598
+ $value = wp_kses_post( $value );
599
+ }
600
+ }
601
+
602
+ return $array;
603
+ }
604
 
605
 
606
 
includes/menu/settings.php CHANGED
@@ -49,9 +49,9 @@ $accordions_settings = get_option('accordions_settings');
49
  ?>
50
  <div class="wrap">
51
  <div id="icon-tools" class="icon32"><br></div><h2><?php echo sprintf(__('%s Settings', 'accordions'), accordions_plugin_name)?></h2>
52
- <form method="post" action="<?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI']); ?>">
53
  <input type="hidden" name="accordions_hidden" value="Y">
54
- <input type="hidden" name="tab" value="<?php echo $current_tab; ?>">
55
  <?php
56
  if(!empty($_POST['accordions_hidden'])){
57
  $nonce = sanitize_text_field($_POST['_wpnonce']);
@@ -72,7 +72,7 @@ $accordions_settings = get_option('accordions_settings');
72
  $id = $tab['id'];
73
  $active = $tab['active'];
74
  ?>
75
- <div class="right-panel-content <?php if($active) echo 'active';?> right-panel-content-<?php echo $id; ?>">
76
  <?php
77
  do_action('accordions_settings_tabs_right_panel_'.$id);
78
  ?>
@@ -93,7 +93,7 @@ $accordions_settings = get_option('accordions_settings');
93
  $is_pro = isset($tab['is_pro']) ? $tab['is_pro'] : false;
94
  $pro_text = isset($tab['pro_text']) ? $tab['pro_text'] : '';
95
  ?>
96
- <li <?php if(!empty($data_visible)): ?> data_visible="<?php echo $data_visible; ?>" <?php endif; ?> class="tab-nav <?php if($hidden) echo 'hidden';?> <?php if($active) echo 'active';?>" data-id="<?php echo $id; ?>">
97
  <?php echo $title; ?>
98
  <?php
99
  if($is_pro):
@@ -112,7 +112,7 @@ $accordions_settings = get_option('accordions_settings');
112
  $title = $tab['title'];
113
  $active = $tab['active'];
114
  ?>
115
- <div class="tab-content <?php if($active) echo 'active';?>" id="<?php echo $id; ?>">
116
  <?php
117
  do_action('accordions_settings_content_'.$id, $tab);
118
  ?>
49
  ?>
50
  <div class="wrap">
51
  <div id="icon-tools" class="icon32"><br></div><h2><?php echo sprintf(__('%s Settings', 'accordions'), accordions_plugin_name)?></h2>
52
+ <form method="post" action="<?php echo str_replace( '%7E', '~', esc_url_raw($_SERVER['REQUEST_URI'])); ?>">
53
  <input type="hidden" name="accordions_hidden" value="Y">
54
+ <input type="hidden" name="tab" value="<?php echo esc_attr($current_tab); ?>">
55
  <?php
56
  if(!empty($_POST['accordions_hidden'])){
57
  $nonce = sanitize_text_field($_POST['_wpnonce']);
72
  $id = $tab['id'];
73
  $active = $tab['active'];
74
  ?>
75
+ <div class="right-panel-content <?php if($active) echo 'active';?> right-panel-content-<?php echo esc_attr($id); ?>">
76
  <?php
77
  do_action('accordions_settings_tabs_right_panel_'.$id);
78
  ?>
93
  $is_pro = isset($tab['is_pro']) ? $tab['is_pro'] : false;
94
  $pro_text = isset($tab['pro_text']) ? $tab['pro_text'] : '';
95
  ?>
96
+ <li <?php if(!empty($data_visible)): ?> data_visible="<?php echo esc_attr($data_visible); ?>" <?php endif; ?> class="tab-nav <?php if($hidden) echo 'hidden';?> <?php if($active) echo 'active';?>" data-id="<?php echo esc_attr($id); ?>">
97
  <?php echo $title; ?>
98
  <?php
99
  if($is_pro):
112
  $title = $tab['title'];
113
  $active = $tab['active'];
114
  ?>
115
+ <div class="tab-content <?php if($active) echo 'active';?>" id="<?php echo esc_attr($id); ?>">
116
  <?php
117
  do_action('accordions_settings_content_'.$id, $tab);
118
  ?>
includes/menu/upgrade-status.php CHANGED
@@ -23,7 +23,7 @@ $url = admin_url().'edit.php?post_type=accordions&page=upgrade_status';
23
 
24
  <script>
25
  setTimeout(function(){
26
- window.location.href = '<?php echo $url; ?>';
27
  }, 1000*50);
28
 
29
  </script>
@@ -77,7 +77,7 @@ $url = admin_url().'edit.php?post_type=accordions&page=upgrade_status';
77
  $accordions_id = get_the_id();
78
  $accordions_title = get_the_title();
79
  ?>
80
- <li><?php echo $accordions_title; ?> - Done</li>
81
  <?php
82
 
83
  endwhile;
@@ -93,7 +93,7 @@ $url = admin_url().'edit.php?post_type=accordions&page=upgrade_status';
93
 
94
 
95
  if($accordions_upgrade == 'done'){
96
- wp_safe_redirect(admin_url().'edit.php?post_type=accordions');
97
  }
98
 
99
 
@@ -101,7 +101,7 @@ $url = admin_url().'edit.php?post_type=accordions&page=upgrade_status';
101
 
102
 
103
 
104
- <p><a class="button" href="<?php echo admin_url().'edit.php?post_type=accordions&page=upgrade_status'; ?>">Refresh</a> to check Migration stats. <i class="fas fa-spin fa-spinner"></i></p>
105
 
106
 
107
 
23
 
24
  <script>
25
  setTimeout(function(){
26
+ window.location.href = '<?php echo esc_url_raw($url); ?>';
27
  }, 1000*50);
28
 
29
  </script>
77
  $accordions_id = get_the_id();
78
  $accordions_title = get_the_title();
79
  ?>
80
+ <li><?php echo esc_html($accordions_title); ?> - Done</li>
81
  <?php
82
 
83
  endwhile;
93
 
94
 
95
  if($accordions_upgrade == 'done'){
96
+ wp_safe_redirect(esc_url_raw(admin_url().'edit.php?post_type=accordions'));
97
  }
98
 
99
 
101
 
102
 
103
 
104
+ <p><a class="button" href="<?php echo esc_url_raw(admin_url().'edit.php?post_type=accordions&page=upgrade_status'); ?>">Refresh</a> to check Migration stats. <i class="fas fa-spin fa-spinner"></i></p>
105
 
106
 
107
 
readme.txt CHANGED
@@ -4,7 +4,7 @@
4
  Tags: accordion, tabs, FAQ, WooCommerce FAQ Tab, accordion short-code, accordions widget, tab
5
  Requires at least: 3.8
6
  Tested up to: 5.7
7
- Stable tag: 2.2.28
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -139,6 +139,20 @@ then paste this shortcode anywhere in your page to display accordions<br />
139
 
140
  == Changelog ==
141
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
142
  = 2.2.28 =
143
  * 2021-04-13 - fix - security issue fixed
144
 
4
  Tags: accordion, tabs, FAQ, WooCommerce FAQ Tab, accordion short-code, accordions widget, tab
5
  Requires at least: 3.8
6
  Tested up to: 5.7
7
+ Stable tag: 2.2.32
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
139
 
140
  == Changelog ==
141
 
142
+ = 2.2.32 =
143
+ * 2021-04-22 - fix - html output issue fixed
144
+
145
+ = 2.2.31 =
146
+ * 2021-04-22 - fix - escaping issue fixed.
147
+ * 2021-04-22 - fix - HTML saving issue fixed.
148
+
149
+ = 2.2.30 =
150
+ * 2021-04-21 - fix - sanitization issue fixed
151
+
152
+ = 2.2.29 =
153
+ * 2021-04-16 - fix - minor security issue fixed
154
+ * 2021-04-16 - remove - removed unnecessary files.
155
+
156
  = 2.2.28 =
157
  * 2021-04-13 - fix - security issue fixed
158
 
templates/accordion/accordion-hook.php CHANGED
@@ -14,15 +14,15 @@ function accordions_main_top($atts){
14
  $lazy_load_src = isset($accordions_options['lazy_load_src']) ? $accordions_options['lazy_load_src'] : '';
15
 
16
  if($lazy_load=='yes'):
17
- ?><div id="accordions-lazy-<?php echo $post_id; ?>" class="accordions-lazy">
18
  <?php if(!empty($lazy_load_src)):?>
19
- <img src="<?php echo $lazy_load_src; ?>" />
20
  <?php endif; ?>
21
  </div>
22
  <script>
23
  jQuery(window).load(function(){
24
- jQuery('#accordions-lazy-<?php echo $post_id; ?>').fadeOut();
25
- jQuery('#accordions-<?php echo $post_id; ?> .items').fadeIn();
26
  });
27
  </script><?php
28
  endif;
@@ -117,31 +117,31 @@ function accordions_main_style($atts){
117
 
118
  ?><style type='text/css'>
119
  @media only screen and (min-width: 1024px ){
120
- #accordions-<?php echo $post_id; ?> {
121
  <?php if(!empty($width_large)):?>
122
- width: <?php echo $width_large; ?>;
123
  <?php endif; ?>
124
  }
125
  }
126
  @media only screen and ( min-width: 768px ) and ( max-width: 1023px ) {
127
- #accordions-<?php echo $post_id; ?> {
128
  <?php if(!empty($width_medium)):?>
129
- width: <?php echo $width_medium; ?>;
130
  <?php endif; ?>
131
  }
132
  }
133
  @media only screen and ( min-width: 0px ) and ( max-width: 767px ){
134
- #accordions-<?php echo $post_id; ?> {
135
  <?php if(!empty($width_small)):?>
136
- width: <?php echo $width_small; ?>;
137
  <?php endif; ?>
138
  }
139
  }
140
  <?php
141
  if($lazy_load=='yes'){
142
  ?>
143
- #accordions-<?php echo $post_id; ?> .items {display: none;}
144
- #accordions-<?php echo $post_id; ?> .accordions-lazy {
145
  text-align: center;
146
  position: absolute;
147
  top: 50%;
@@ -150,106 +150,106 @@ function accordions_main_style($atts){
150
  }
151
  <?php
152
  }
153
- ?>#accordions-<?php echo $post_id; ?> {
154
  <?php if(!empty($container_text_align)):?>
155
- text-align: <?php echo $container_text_align; ?>;
156
  <?php endif; ?>
157
  <?php if(!empty($container_background_color) || !empty($container_background_img)):?>
158
- background:<?php echo $container_background_color; ?> url(<?php echo $container_background_img; ?>) repeat scroll 0 0;
159
  <?php endif; ?>
160
  <?php if(!empty($container_padding)):?>
161
- padding: <?php echo $container_padding; ?>;
162
  <?php endif; ?>
163
  position: relative;
164
  }
165
- #accordions-<?php echo $post_id; ?> .accordions-head{
166
  <?php if(!empty($header_background_color)):?>
167
- background:<?php echo $header_background_color; ?> none repeat scroll 0 0;
168
  <?php endif; ?>
169
  <?php if(!empty($header_margin)):?>
170
- margin:<?php echo $header_margin; ?>;
171
  <?php endif; ?>
172
  <?php if(!empty($header_padding)):?>
173
- padding:<?php echo $header_padding; ?>;
174
  <?php endif; ?>
175
  outline: none;
176
  }
177
- #accordions-<?php echo $post_id; ?> .accordions-head-title{
178
  <?php if(!empty($header_font_family)):?>
179
- font-family:<?php echo $header_font_family; ?>;
180
  <?php endif; ?>
181
  <?php if(!empty($header_color)):?>
182
- color:<?php echo $header_color; ?>;
183
  <?php endif; ?>
184
  <?php if(!empty($header_font_size)):?>
185
- font-size:<?php echo $header_font_size; ?>;
186
  <?php endif; ?>
187
  }
188
- #accordions-<?php echo $post_id; ?> .accordions-head-title-toggle{
189
  <?php if(!empty($header_color)):?>
190
- color:<?php echo $header_color; ?>;
191
  <?php endif; ?>
192
  <?php if(!empty($header_font_size)):?>
193
- font-size:<?php echo $header_font_size; ?>;
194
  <?php endif; ?>
195
  }
196
- #accordions-<?php echo $post_id; ?> .accordions-head:hover .accordions-head-title{
197
  <?php if(!empty($header_color_hover)):?>
198
- color:<?php echo $header_color_hover; ?>;
199
  <?php endif; ?>
200
  }
201
- #accordions-<?php echo $post_id; ?> .ui-state-active{
202
  <?php if(!empty($header_active_background_color)):?>
203
- background: <?php echo $header_active_background_color; ?>;
204
  <?php endif; ?>
205
  border: none;
206
  }
207
- #accordions-<?php echo $post_id; ?> .accordion-content{
208
  <?php if(!empty($body_font_family)):?>
209
- font-family:<?php echo $body_font_family; ?>;
210
  <?php endif; ?>
211
  <?php if(!empty($body_background_color)):?>
212
- background:<?php echo $body_background_color; ?> none repeat scroll 0 0;
213
  <?php endif; ?>
214
  <?php if(!empty($body_color)):?>
215
- color:<?php echo $body_color; ?>;
216
  <?php endif; ?>
217
  <?php if(!empty($body_font_size)):?>
218
- font-size:<?php echo $body_font_size; ?>;
219
  <?php endif; ?>
220
  <?php if(!empty($body_margin)):?>
221
- margin:<?php echo $body_margin; ?>;
222
  <?php endif; ?>
223
  <?php if(!empty($body_padding)):?>
224
- padding:<?php echo $body_padding; ?>;
225
  <?php endif; ?>
226
  border: none;
227
  }
228
- #accordions-<?php echo $post_id; ?> .accordion-icons{
229
  <?php if(!empty($icon_color)):?>
230
- color:<?php echo $icon_color; ?>;
231
  <?php endif; ?>
232
  <?php if(!empty($icon_font_size)):?>
233
- font-size:<?php echo $icon_font_size; ?>;
234
  <?php endif; ?>
235
  <?php if(!empty($icon_background_color)):?>
236
- background:<?php echo $icon_background_color; ?> none repeat scroll 0 0;
237
  <?php endif; ?>
238
  <?php if(!empty($icon_padding)):?>
239
- padding:<?php echo $icon_padding; ?>;
240
  <?php endif; ?>
241
  <?php if(!empty($icon_margin)):?>
242
- margin:<?php echo $icon_margin; ?>;
243
  <?php endif; ?>
244
  }
245
- #accordions-<?php echo $post_id; ?> .accordions-head:hover .accordion-icons span{
246
  <?php if(!empty($icon_color_hover)):?>
247
- color:<?php echo $icon_color_hover; ?>;
248
  <?php endif; ?>
249
  }
250
  <?php
251
  if(!empty($custom_css)){
252
- echo $custom_css;
253
  }
254
 
255
  if(!empty($accordions_content)){
@@ -262,7 +262,7 @@ function accordions_main_style($atts){
262
 
263
  if(!empty($bg_color_css) || !empty($header_bg_img)){
264
  ?>
265
- #accordions-<?php echo $post_id; ?> #header-<?php echo$index; ?>{background: <?php echo $bg_color_css; ?> <?php echo $header_bg_img; ?>;}
266
  <?php
267
  }
268
  }
@@ -367,32 +367,32 @@ function accordions_main_items($atts){
367
  }
368
 
369
  ?>
370
- <div post_id="<?php echo $post_id; ?>" itemcount="<?php echo $item_count; ?>" header_id="header-<?php echo $index; ?>" id="header-<?php echo $index; ?>" style="" class="accordions-head head<?php echo $index; ?> <?php echo $header_class; ?>" toggle-text="<?php echo do_shortcode(esc_attr($toggled_text)); ?>" main-text="<?php echo do_shortcode(esc_attr($accordion_header)); ?>">
371
  <?php
372
  if($icon_position == 'left'):
373
  ?>
374
- <span id="accordion-icons-<?php echo $index; ?>" class="accordion-icons">
375
  <span class="accordion-icon-active accordion-plus"><?php echo $active_icon; ?></span>
376
  <span class="accordion-icon-inactive accordion-minus"><?php echo $inactive_icon; ?></span>
377
  </span>
378
- <span id="header-text-<?php echo $index; ?>" class="accordions-head-title"><?php echo do_shortcode($accordion_header); ?></span>
379
  <?php
380
  elseif ($icon_position == 'right'):
381
  ?>
382
- <span id="header-text-<?php echo $index; ?>" class="accordions-head-title"><?php echo do_shortcode($accordion_header); ?></span>
383
- <span id="accordion-icons-<?php echo $index; ?>" class="accordion-icons">
384
  <span class="accordion-icon-active accordion-plus"><?php echo $active_icon; ?></span>
385
  <span class="accordion-icon-inactive accordion-minus"><?php echo $inactive_icon; ?></span>
386
  </span>
387
  <?php
388
  else:
389
  ?>
390
- <span id="header-text-<?php echo $index; ?>" class="accordions-head-title"><?php echo do_shortcode($accordion_header); ?></span>
391
  <?php
392
  endif;
393
  ?>
394
  </div>
395
- <div class="accordion-content content<?php echo $index; ?> <?php echo $body_class; ?>">
396
  <?php echo $accordion_body; ?>
397
  </div>
398
  <?php
@@ -407,7 +407,7 @@ function accordions_main_items($atts){
407
  <script>
408
  jQuery(document).ready(function($){<?php
409
  if(isset($_GET['active_index'])):
410
- $accordion_index = isset($_GET['active_index']) ? sanitize_text_field($_GET['active_index']) : '';
411
 
412
  //var_dump($accordion_index);
413
 
@@ -421,10 +421,10 @@ function accordions_main_items($atts){
421
  foreach ($active_index as $ind){
422
  $active_index_new[] = (int)$ind;
423
  }
424
- ?>accordions_active_index_<?php echo $accordion_id; ?> = <?php echo json_encode($active_index_new); ?>;<?php
425
  }
426
  else:
427
- ?>accordions_active_index_<?php echo $post_id; ?> = <?php echo json_encode($active_index); ?>;<?php
428
  endif;
429
  ?>
430
  })
@@ -454,15 +454,14 @@ function accordions_main_items($atts){
454
 
455
 
456
 
457
- $accordion_body = esc_attr($accordion_body);
458
 
459
 
460
  ?>{
461
  "@type": "Question",
462
- "name": "<?php echo $accordion_header; ?>",
463
  "acceptedAnswer":{
464
  "@type": "Answer",
465
- "text": "<?php echo $accordion_body; ?>"
466
  }
467
  }<?php echo ($accordions_count > $i ) ? ',' :'';
468
 
@@ -474,7 +473,7 @@ function accordions_main_items($atts){
474
  {
475
  "@context": "https://schema.org",
476
  "@type": "FAQPage",
477
- "mainEntity": [<?php echo $html; ?>]
478
  }
479
  </script><?php
480
 
@@ -516,7 +515,7 @@ function accordions_main_edit_link($atts){
516
  $accordion_edit_url = apply_filters('accordions_edit_url', ''.$admin_url.'post.php?post='.$post_id.'&action=edit', $post_id );
517
 
518
  ?>
519
- <div class="accordion-edit"><a href="<?php echo $accordion_edit_url; ?>"><?php echo __('Edit this accordion','accordions'); ?></a>, <?php echo __("Only admin can see this.",'accordions')?></div>
520
  <?php
521
 
522
  return;
@@ -597,11 +596,11 @@ function accordions_main_scripts($atts){
597
  ?>
598
  <script>
599
  jQuery(document).ready(function($){
600
- accordion_<?php echo $post_id; ?> = $("#accordions-<?php echo $post_id; ?> .items").accordion({
601
- event: "<?php echo $active_event; ?>",
602
- collapsible:<?php echo $collapsible; ?>,
603
- heightStyle: "<?php echo $height_style; ?>",
604
- animate: ("<?php echo $animate_style; ?>", <?php echo $animate_delay; ?>),
605
  navigation: true,
606
  active: 999,
607
  <?php
@@ -634,7 +633,7 @@ function accordions_main_scripts($atts){
634
  ?>
635
  <script>
636
  jQuery(document).ready(function($){
637
- <?php echo $custom_js; ?>
638
  })
639
  </script>
640
  <?php
14
  $lazy_load_src = isset($accordions_options['lazy_load_src']) ? $accordions_options['lazy_load_src'] : '';
15
 
16
  if($lazy_load=='yes'):
17
+ ?><div id="accordions-lazy-<?php echo esc_attr($post_id); ?>" class="accordions-lazy">
18
  <?php if(!empty($lazy_load_src)):?>
19
+ <img src="<?php echo esc_url_raw($lazy_load_src); ?>" />
20
  <?php endif; ?>
21
  </div>
22
  <script>
23
  jQuery(window).load(function(){
24
+ jQuery('#accordions-lazy-<?php echo esc_attr($post_id); ?>').fadeOut();
25
+ jQuery('#accordions-<?php echo esc_attr($post_id); ?> .items').fadeIn();
26
  });
27
  </script><?php
28
  endif;
117
 
118
  ?><style type='text/css'>
119
  @media only screen and (min-width: 1024px ){
120
+ #accordions-<?php echo esc_attr($post_id); ?> {
121
  <?php if(!empty($width_large)):?>
122
+ width: <?php echo esc_attr($width_large); ?>;
123
  <?php endif; ?>
124
  }
125
  }
126
  @media only screen and ( min-width: 768px ) and ( max-width: 1023px ) {
127
+ #accordions-<?php echo esc_attr($post_id); ?> {
128
  <?php if(!empty($width_medium)):?>
129
+ width: <?php echo esc_attr($width_medium); ?>;
130
  <?php endif; ?>
131
  }
132
  }
133
  @media only screen and ( min-width: 0px ) and ( max-width: 767px ){
134
+ #accordions-<?php echo esc_attr($post_id); ?> {
135
  <?php if(!empty($width_small)):?>
136
+ width: <?php echo esc_attr($width_small); ?>;
137
  <?php endif; ?>
138
  }
139
  }
140
  <?php
141
  if($lazy_load=='yes'){
142
  ?>
143
+ #accordions-<?php echo esc_attr($post_id); ?> .items {display: none;}
144
+ #accordions-<?php echo esc_attr($post_id); ?> .accordions-lazy {
145
  text-align: center;
146
  position: absolute;
147
  top: 50%;
150
  }
151
  <?php
152
  }
153
+ ?>#accordions-<?php echo esc_attr($post_id); ?> {
154
  <?php if(!empty($container_text_align)):?>
155
+ text-align: <?php echo esc_attr($container_text_align); ?>;
156
  <?php endif; ?>
157
  <?php if(!empty($container_background_color) || !empty($container_background_img)):?>
158
+ background:<?php echo esc_attr($container_background_color); ?> url(<?php echo esc_url_raw($container_background_img); ?>) repeat scroll 0 0;
159
  <?php endif; ?>
160
  <?php if(!empty($container_padding)):?>
161
+ padding: <?php echo esc_attr($container_padding); ?>;
162
  <?php endif; ?>
163
  position: relative;
164
  }
165
+ #accordions-<?php echo esc_attr($post_id); ?> .accordions-head{
166
  <?php if(!empty($header_background_color)):?>
167
+ background:<?php echo esc_attr($header_background_color); ?> none repeat scroll 0 0;
168
  <?php endif; ?>
169
  <?php if(!empty($header_margin)):?>
170
+ margin:<?php echo esc_attr($header_margin); ?>;
171
  <?php endif; ?>
172
  <?php if(!empty($header_padding)):?>
173
+ padding:<?php echo esc_attr($header_padding); ?>;
174
  <?php endif; ?>
175
  outline: none;
176
  }
177
+ #accordions-<?php echo esc_attr($post_id); ?> .accordions-head-title{
178
  <?php if(!empty($header_font_family)):?>
179
+ font-family:<?php echo esc_attr($header_font_family); ?>;
180
  <?php endif; ?>
181
  <?php if(!empty($header_color)):?>
182
+ color:<?php echo esc_attr($header_color); ?>;
183
  <?php endif; ?>
184
  <?php if(!empty($header_font_size)):?>
185
+ font-size:<?php echo esc_attr($header_font_size); ?>;
186
  <?php endif; ?>
187
  }
188
+ #accordions-<?php echo esc_attr($post_id); ?> .accordions-head-title-toggle{
189
  <?php if(!empty($header_color)):?>
190
+ color:<?php echo esc_attr($header_color); ?>;
191
  <?php endif; ?>
192
  <?php if(!empty($header_font_size)):?>
193
+ font-size:<?php echo esc_attr($header_font_size); ?>;
194
  <?php endif; ?>
195
  }
196
+ #accordions-<?php echo esc_attr($post_id); ?> .accordions-head:hover .accordions-head-title{
197
  <?php if(!empty($header_color_hover)):?>
198
+ color:<?php echo esc_attr($header_color_hover); ?>;
199
  <?php endif; ?>
200
  }
201
+ #accordions-<?php echo esc_attr($post_id); ?> .ui-state-active{
202
  <?php if(!empty($header_active_background_color)):?>
203
+ background: <?php echo esc_attr($header_active_background_color); ?>;
204
  <?php endif; ?>
205
  border: none;
206
  }
207
+ #accordions-<?php echo esc_attr($post_id); ?> .accordion-content{
208
  <?php if(!empty($body_font_family)):?>
209
+ font-family:<?php echo esc_attr($body_font_family); ?>;
210
  <?php endif; ?>
211
  <?php if(!empty($body_background_color)):?>
212
+ background:<?php echo esc_attr($body_background_color); ?> none repeat scroll 0 0;
213
  <?php endif; ?>
214
  <?php if(!empty($body_color)):?>
215
+ color:<?php echo esc_attr($body_color); ?>;
216
  <?php endif; ?>
217
  <?php if(!empty($body_font_size)):?>
218
+ font-size:<?php echo esc_attr($body_font_size); ?>;
219
  <?php endif; ?>
220
  <?php if(!empty($body_margin)):?>
221
+ margin:<?php echo esc_attr($body_margin); ?>;
222
  <?php endif; ?>
223
  <?php if(!empty($body_padding)):?>
224
+ padding:<?php echo esc_attr($body_padding); ?>;
225
  <?php endif; ?>
226
  border: none;
227
  }
228
+ #accordions-<?php echo esc_attr($post_id); ?> .accordion-icons{
229
  <?php if(!empty($icon_color)):?>
230
+ color:<?php echo esc_attr($icon_color); ?>;
231
  <?php endif; ?>
232
  <?php if(!empty($icon_font_size)):?>
233
+ font-size:<?php echo esc_attr($icon_font_size); ?>;
234
  <?php endif; ?>
235
  <?php if(!empty($icon_background_color)):?>
236
+ background:<?php echo esc_attr($icon_background_color); ?> none repeat scroll 0 0;
237
  <?php endif; ?>
238
  <?php if(!empty($icon_padding)):?>
239
+ padding:<?php echo esc_attr($icon_padding); ?>;
240
  <?php endif; ?>
241
  <?php if(!empty($icon_margin)):?>
242
+ margin:<?php echo esc_attr($icon_margin); ?>;
243
  <?php endif; ?>
244
  }
245
+ #accordions-<?php echo esc_attr($post_id); ?> .accordions-head:hover .accordion-icons span{
246
  <?php if(!empty($icon_color_hover)):?>
247
+ color:<?php echo esc_attr($icon_color_hover); ?>;
248
  <?php endif; ?>
249
  }
250
  <?php
251
  if(!empty($custom_css)){
252
+ echo esc_attr($custom_css);
253
  }
254
 
255
  if(!empty($accordions_content)){
262
 
263
  if(!empty($bg_color_css) || !empty($header_bg_img)){
264
  ?>
265
+ #accordions-<?php echo esc_attr($post_id); ?> #header-<?php echo esc_attr($index); ?>{background: <?php echo esc_attr($bg_color_css); ?> <?php echo esc_url_raw($header_bg_img); ?>;}
266
  <?php
267
  }
268
  }
367
  }
368
 
369
  ?>
370
+ <div post_id="<?php echo esc_attr($post_id); ?>" itemcount="<?php echo esc_attr($item_count); ?>" header_id="header-<?php echo esc_attr($index); ?>" id="header-<?php echo esc_attr($index); ?>" style="" class="accordions-head head<?php echo esc_attr($index); ?> <?php echo esc_attr($header_class); ?>" toggle-text="<?php echo do_shortcode(esc_attr($toggled_text)); ?>" main-text="<?php echo do_shortcode(esc_attr($accordion_header)); ?>">
371
  <?php
372
  if($icon_position == 'left'):
373
  ?>
374
+ <span id="accordion-icons-<?php echo esc_attr($index); ?>" class="accordion-icons">
375
  <span class="accordion-icon-active accordion-plus"><?php echo $active_icon; ?></span>
376
  <span class="accordion-icon-inactive accordion-minus"><?php echo $inactive_icon; ?></span>
377
  </span>
378
+ <span id="header-text-<?php echo esc_attr($index); ?>" class="accordions-head-title"><?php echo do_shortcode($accordion_header); ?></span>
379
  <?php
380
  elseif ($icon_position == 'right'):
381
  ?>
382
+ <span id="header-text-<?php echo esc_attr($index); ?>" class="accordions-head-title"><?php echo do_shortcode($accordion_header); ?></span>
383
+ <span id="accordion-icons-<?php echo esc_attr($index); ?>" class="accordion-icons">
384
  <span class="accordion-icon-active accordion-plus"><?php echo $active_icon; ?></span>
385
  <span class="accordion-icon-inactive accordion-minus"><?php echo $inactive_icon; ?></span>
386
  </span>
387
  <?php
388
  else:
389
  ?>
390
+ <span id="header-text-<?php echo esc_attr($index); ?>" class="accordions-head-title"><?php echo do_shortcode($accordion_header); ?></span>
391
  <?php
392
  endif;
393
  ?>
394
  </div>
395
+ <div class="accordion-content content<?php echo esc_attr($index); ?> <?php echo esc_attr($body_class); ?>">
396
  <?php echo $accordion_body; ?>
397
  </div>
398
  <?php
407
  <script>
408
  jQuery(document).ready(function($){<?php
409
  if(isset($_GET['active_index'])):
410
+ $accordion_index = isset($_GET['active_index']) ? esc_attr($_GET['active_index']) : '';
411
 
412
  //var_dump($accordion_index);
413
 
421
  foreach ($active_index as $ind){
422
  $active_index_new[] = (int)$ind;
423
  }
424
+ ?>accordions_active_index_<?php echo esc_attr($accordion_id); ?> = <?php echo json_encode($active_index_new); ?>;<?php
425
  }
426
  else:
427
+ ?>accordions_active_index_<?php echo esc_attr($post_id); ?> = <?php echo json_encode($active_index); ?>;<?php
428
  endif;
429
  ?>
430
  })
454
 
455
 
456
 
 
457
 
458
 
459
  ?>{
460
  "@type": "Question",
461
+ "name": "<?php echo esc_html($accordion_header); ?>",
462
  "acceptedAnswer":{
463
  "@type": "Answer",
464
+ "text": "<?php echo esc_html($accordion_body); ?>"
465
  }
466
  }<?php echo ($accordions_count > $i ) ? ',' :'';
467
 
473
  {
474
  "@context": "https://schema.org",
475
  "@type": "FAQPage",
476
+ "mainEntity": [<?php echo esc_html($html); ?>]
477
  }
478
  </script><?php
479
 
515
  $accordion_edit_url = apply_filters('accordions_edit_url', ''.$admin_url.'post.php?post='.$post_id.'&action=edit', $post_id );
516
 
517
  ?>
518
+ <div class="accordion-edit"><a href="<?php echo esc_url_raw($accordion_edit_url); ?>"><?php echo __('Edit this accordion','accordions'); ?></a>, <?php echo __("Only admin can see this.",'accordions')?></div>
519
  <?php
520
 
521
  return;
596
  ?>
597
  <script>
598
  jQuery(document).ready(function($){
599
+ accordion_<?php echo esc_attr($post_id); ?> = $("#accordions-<?php echo esc_attr($post_id); ?> .items").accordion({
600
+ event: "<?php echo esc_attr($active_event); ?>",
601
+ collapsible:<?php echo esc_attr($collapsible); ?>,
602
+ heightStyle: "<?php echo esc_attr($height_style); ?>",
603
+ animate: ("<?php echo esc_attr($animate_style); ?>", <?php echo esc_attr($animate_delay); ?>),
604
  navigation: true,
605
  active: 999,
606
  <?php
633
  ?>
634
  <script>
635
  jQuery(document).ready(function($){
636
+ <?php echo esc_js($custom_js); ?>
637
  })
638
  </script>
639
  <?php
templates/tabs/tabs-hook.php CHANGED
@@ -15,15 +15,15 @@ function accordions_tabs_main_top($atts){
15
 
16
  if($lazy_load=='yes'):
17
  ?>
18
- <div id="accordions-lazy-<?php echo $post_id; ?>" class="accordions-lazy">
19
  <?php if(!empty($lazy_load_src)):?>
20
- <img src="<?php echo $lazy_load_src; ?>" />
21
  <?php endif; ?>
22
  </div>
23
  <script>
24
  jQuery(window).load(function(){
25
- jQuery('#accordions-lazy-<?php echo $post_id; ?>').fadeOut();
26
- jQuery('#accordions-<?php echo $post_id; ?> .items').fadeIn();
27
  });
28
  </script>
29
  <?php
@@ -132,137 +132,137 @@ function accordions_tabs_main_style($atts){
132
  ?>
133
  <style type='text/css'>
134
  @media only screen and (min-width: 1024px ){
135
- #accordions-tabs-<?php echo $post_id; ?> {
136
  <?php if(!empty($width_large)):?>
137
- width: <?php echo $width_large; ?>;
138
  <?php endif; ?>
139
  }
140
  }
141
  @media only screen and ( min-width: 768px ) and ( max-width: 1023px ) {
142
- #accordions-tabs-<?php echo $post_id; ?> {
143
  <?php if(!empty($width_medium)):?>
144
- width: <?php echo $width_medium; ?>;
145
  <?php endif; ?>
146
  }
147
  }
148
  @media only screen and ( min-width: 0px ) and ( max-width: 767px ){
149
- #accordions-tabs-<?php echo $post_id; ?> {
150
  <?php if(!empty($width_small)):?>
151
- width: <?php echo $width_small; ?>;
152
  <?php endif; ?>
153
  }
154
  }
155
- #accordions-tabs-<?php echo $post_id; ?>{
156
  <?php if(!empty($container_text_align)):?>
157
- text-align: <?php echo $container_text_align; ?>;
158
  <?php endif; ?>
159
  }
160
- #accordions-tabs-<?php echo $post_id; ?>{
161
  <?php if(!empty($container_background_color)):?>
162
- background-color:<?php echo $container_background_color; ?>;
163
  <?php endif; ?>
164
  <?php if(!empty($container_background_img)):?>
165
- background-image: url(<?php echo $container_background_img; ?>);
166
  <?php endif; ?>
167
 
168
  <?php if(!empty($container_padding)):?>
169
- padding: <?php echo $container_padding; ?>;
170
  <?php endif; ?>
171
  }
172
- #accordions-tabs-<?php echo $post_id; ?> .tabs-nav{
173
  <?php if(!empty($header_background_color)):?>
174
- background-color:<?php echo $header_background_color; ?>;
175
  <?php endif; ?>
176
  <?php if(!empty($header_margin)):?>
177
- margin:<?php echo $header_margin; ?> !important;
178
  <?php endif; ?>
179
  <?php if(!empty($header_padding)):?>
180
- padding:<?php echo $header_padding; ?> !important;
181
  <?php endif; ?>
182
  <?php if(!empty($navs_alignment)):?>
183
- float:<?php echo $navs_alignment; ?> !important;
184
  <?php endif; ?>
185
  border: none;
186
  }
187
- #accordions-tabs-<?php echo $post_id; ?> .tabs-nav:hover{
188
  <?php if(!empty($header_active_background_color)):?>
189
- background-color: <?php echo $header_active_background_color; ?>;
190
  <?php else:?>
191
  background-color: rgba(0,0,0,0);
192
  <?php endif; ?>
193
  }
194
- #accordions-tabs-<?php echo $post_id; ?> .ui-tabs-anchor{
195
  <?php if(!empty($header_color)):?>
196
- color:<?php echo $header_color; ?>;
197
  <?php endif; ?>
198
  <?php if(!empty($header_font_size)):?>
199
- font-size:<?php echo $header_font_size; ?>;
200
  <?php endif; ?>
201
  margin:0px !important;
202
  padding:0px !important;
203
  }
204
- #accordions-tabs-<?php echo $post_id; ?> .accordions-head-title{
205
  <?php if(!empty($header_color)):?>
206
- color:<?php echo $header_color; ?>;
207
  <?php endif; ?>
208
  }
209
- #accordions-tabs-<?php echo $post_id; ?> .ui-tabs-active{
210
  <?php if(!empty($header_active_background_color)):?>
211
- background-color: <?php echo $header_active_background_color; ?>;
212
  <?php else:?>
213
  background-color: rgba(0,0,0,0);
214
  <?php endif; ?>
215
  }
216
- #accordions-tabs-<?php echo $post_id; ?> .accordion-icons{
217
  <?php if(!empty($icon_color)):?>
218
- color:<?php echo $icon_color; ?>;
219
  <?php endif; ?>
220
  <?php if(!empty($icon_font_size)):?>
221
- font-size:<?php echo $icon_font_size; ?>;
222
  <?php endif; ?>
223
  <?php if(!empty($icon_background_color)):?>
224
- background:<?php echo $icon_background_color; ?> none repeat scroll 0 0;
225
  <?php endif; ?>
226
  <?php if(!empty($icon_padding)):?>
227
- padding:<?php echo $icon_padding; ?>;
228
  <?php endif; ?>
229
  <?php if(!empty($icon_margin)):?>
230
- margin:<?php echo $icon_margin; ?>;
231
  <?php endif; ?>
232
  }
233
- #accordions-tabs-<?php echo $post_id; ?> .tabs-nav:hover .accordion-icons span{
234
  <?php if(!empty($icon_color_hover)):?>
235
- color:<?php echo $icon_color_hover; ?>;
236
  <?php endif; ?>
237
  }
238
- #accordions-tabs-<?php echo $post_id; ?> .tabs-content{
239
  <?php if(!empty($body_background_color)):?>
240
- background-color:<?php echo $body_background_color; ?>;
241
  <?php endif; ?>
242
  <?php if(!empty($body_color)):?>
243
- color:<?php echo $body_color; ?>;
244
  <?php endif; ?>
245
  <?php if(!empty($body_font_size)):?>
246
- font-size:<?php echo $body_font_size; ?>;
247
  <?php endif; ?>
248
  <?php if(!empty($body_margin)):?>
249
- margin:<?php echo $body_margin; ?>;
250
  <?php endif; ?>
251
  <?php if(!empty($body_padding)):?>
252
- padding:<?php echo $body_padding; ?>;
253
  <?php endif; ?>
254
  }
255
- #accordions-tabs-<?php echo $post_id; ?> .accordion-icons span{
256
  <?php if(!empty($icon_color)):?>
257
- color:<?php echo $icon_color; ?>;
258
  <?php endif; ?>
259
  <?php if(!empty($icon_font_size)):?>
260
- font-size:<?php echo $icon_font_size; ?>;
261
  <?php endif; ?>
262
  }
263
  <?php
264
  if(!empty($accordions_custom_css)){
265
- echo $accordions_custom_css;
266
  }
267
  if($tabs_icon_toggle=='yes'){
268
  ?>
@@ -281,9 +281,9 @@ function accordions_tabs_main_style($atts){
281
 
282
 
283
  ?>
284
- .ui-tabs-vertical .ui-tabs-nav { float: left; width: <?php echo $navs_width_ratio; ?>%;overflow: hidden; }
285
  .ui-tabs-vertical .ui-tabs-nav li { clear: left; width: 100%; }
286
- .ui-tabs-vertical .ui-tabs-panel { padding: 1em; float: left; width: <?php echo $panel_width_ratio; ?>%;}
287
  <?php
288
  }
289
  ?>
@@ -458,7 +458,7 @@ function accordions_tabs_main_items($atts){
458
  jQuery(document).ready(function($){
459
  <?php
460
  if(isset($_GET['active_index'])):
461
- $accordion_index = isset($_GET['active_index']) ? sanitize_text_field($_GET['active_index']) : '';
462
  $accordion_index = explode('-', $accordion_index);
463
  foreach ($accordion_index as $args){
464
  $args_arr = explode('|', $args);
@@ -526,7 +526,7 @@ function accordions_tabs_main_scripts($atts){
526
  $custom_scripts = isset($accordions_options['custom_scripts']) ? $accordions_options['custom_scripts'] : array();
527
  $custom_js = isset($custom_scripts['custom_js']) ? $custom_scripts['custom_js'] : '';
528
 
529
- $active_tab = isset($_GET['id']) ? (int)sanitize_text_field($_GET['id']) : 1;
530
 
531
  $tabs = isset($accordions_options['tabs']) ? $accordions_options['tabs'] : array();
532
  $collapsible = !empty($tabs['collapsible']) ? $tabs['collapsible'] : 'true';
15
 
16
  if($lazy_load=='yes'):
17
  ?>
18
+ <div id="accordions-lazy-<?php echo esc_attr($post_id); ?>" class="accordions-lazy">
19
  <?php if(!empty($lazy_load_src)):?>
20
+ <img src="<?php echo esc_url_raw($lazy_load_src); ?>" />
21
  <?php endif; ?>
22
  </div>
23
  <script>
24
  jQuery(window).load(function(){
25
+ jQuery('#accordions-lazy-<?php echo esc_attr($post_id); ?>').fadeOut();
26
+ jQuery('#accordions-<?php echo esc_attr($post_id); ?> .items').fadeIn();
27
  });
28
  </script>
29
  <?php
132
  ?>
133
  <style type='text/css'>
134
  @media only screen and (min-width: 1024px ){
135
+ #accordions-tabs-<?php echo esc_attr($post_id); ?> {
136
  <?php if(!empty($width_large)):?>
137
+ width: <?php echo esc_attr($width_large); ?>;
138
  <?php endif; ?>
139
  }
140
  }
141
  @media only screen and ( min-width: 768px ) and ( max-width: 1023px ) {
142
+ #accordions-tabs-<?php echo esc_attr($post_id); ?> {
143
  <?php if(!empty($width_medium)):?>
144
+ width: <?php echo esc_attr($width_medium); ?>;
145
  <?php endif; ?>
146
  }
147
  }
148
  @media only screen and ( min-width: 0px ) and ( max-width: 767px ){
149
+ #accordions-tabs-<?php echo esc_attr($post_id); ?> {
150
  <?php if(!empty($width_small)):?>
151
+ width: <?php echo esc_attr($width_small); ?>;
152
  <?php endif; ?>
153
  }
154
  }
155
+ #accordions-tabs-<?php echo esc_attr($post_id); ?>{
156
  <?php if(!empty($container_text_align)):?>
157
+ text-align: <?php echo esc_attr($container_text_align); ?>;
158
  <?php endif; ?>
159
  }
160
+ #accordions-tabs-<?php echo esc_attr($post_id); ?>{
161
  <?php if(!empty($container_background_color)):?>
162
+ background-color:<?php echo esc_attr($container_background_color); ?>;
163
  <?php endif; ?>
164
  <?php if(!empty($container_background_img)):?>
165
+ background-image: url(<?php echo esc_attr($container_background_img); ?>);
166
  <?php endif; ?>
167
 
168
  <?php if(!empty($container_padding)):?>
169
+ padding: <?php echo esc_attr($container_padding); ?>;
170
  <?php endif; ?>
171
  }
172
+ #accordions-tabs-<?php echo esc_attr($post_id); ?> .tabs-nav{
173
  <?php if(!empty($header_background_color)):?>
174
+ background-color:<?php echo esc_attr($header_background_color); ?>;
175
  <?php endif; ?>
176
  <?php if(!empty($header_margin)):?>
177
+ margin:<?php echo esc_attr($header_margin); ?> !important;
178
  <?php endif; ?>
179
  <?php if(!empty($header_padding)):?>
180
+ padding:<?php echo esc_attr($header_padding); ?> !important;
181
  <?php endif; ?>
182
  <?php if(!empty($navs_alignment)):?>
183
+ float:<?php echo esc_attr($navs_alignment); ?> !important;
184
  <?php endif; ?>
185
  border: none;
186
  }
187
+ #accordions-tabs-<?php echo esc_attr($post_id); ?> .tabs-nav:hover{
188
  <?php if(!empty($header_active_background_color)):?>
189
+ background-color: <?php echo esc_attr($header_active_background_color); ?>;
190
  <?php else:?>
191
  background-color: rgba(0,0,0,0);
192
  <?php endif; ?>
193
  }
194
+ #accordions-tabs-<?php echo esc_attr($post_id); ?> .ui-tabs-anchor{
195
  <?php if(!empty($header_color)):?>
196
+ color:<?php echo esc_attr($header_color); ?>;
197
  <?php endif; ?>
198
  <?php if(!empty($header_font_size)):?>
199
+ font-size:<?php echo esc_attr($header_font_size); ?>;
200
  <?php endif; ?>
201
  margin:0px !important;
202
  padding:0px !important;
203
  }
204
+ #accordions-tabs-<?php echo esc_attr($post_id); ?> .accordions-head-title{
205
  <?php if(!empty($header_color)):?>
206
+ color:<?php echo esc_attr($header_color); ?>;
207
  <?php endif; ?>
208
  }
209
+ #accordions-tabs-<?php echo esc_attr($post_id); ?> .ui-tabs-active{
210
  <?php if(!empty($header_active_background_color)):?>
211
+ background-color: <?php echo esc_attr($header_active_background_color); ?>;
212
  <?php else:?>
213
  background-color: rgba(0,0,0,0);
214
  <?php endif; ?>
215
  }
216
+ #accordions-tabs-<?php echo esc_attr($post_id); ?> .accordion-icons{
217
  <?php if(!empty($icon_color)):?>
218
+ color:<?php echo esc_attr($icon_color); ?>;
219
  <?php endif; ?>
220
  <?php if(!empty($icon_font_size)):?>
221
+ font-size:<?php echo esc_attr($icon_font_size); ?>;
222
  <?php endif; ?>
223
  <?php if(!empty($icon_background_color)):?>
224
+ background:<?php echo esc_attr($icon_background_color); ?> none repeat scroll 0 0;
225
  <?php endif; ?>
226
  <?php if(!empty($icon_padding)):?>
227
+ padding:<?php echo esc_attr($icon_padding); ?>;
228
  <?php endif; ?>
229
  <?php if(!empty($icon_margin)):?>
230
+ margin:<?php echo esc_attr($icon_margin); ?>;
231
  <?php endif; ?>
232
  }
233
+ #accordions-tabs-<?php echo esc_attr($post_id); ?> .tabs-nav:hover .accordion-icons span{
234
  <?php if(!empty($icon_color_hover)):?>
235
+ color:<?php echo esc_attr($icon_color_hover); ?>;
236
  <?php endif; ?>
237
  }
238
+ #accordions-tabs-<?php echo esc_attr($post_id); ?> .tabs-content{
239
  <?php if(!empty($body_background_color)):?>
240
+ background-color:<?php echo esc_attr($body_background_color); ?>;
241
  <?php endif; ?>
242
  <?php if(!empty($body_color)):?>
243
+ color:<?php echo esc_attr($body_color); ?>;
244
  <?php endif; ?>
245
  <?php if(!empty($body_font_size)):?>
246
+ font-size:<?php echo esc_attr($body_font_size); ?>;
247
  <?php endif; ?>
248
  <?php if(!empty($body_margin)):?>
249
+ margin:<?php echo esc_attr($body_margin); ?>;
250
  <?php endif; ?>
251
  <?php if(!empty($body_padding)):?>
252
+ padding:<?php echo esc_attr($body_padding); ?>;
253
  <?php endif; ?>
254
  }
255
+ #accordions-tabs-<?php echo esc_attr($post_id); ?> .accordion-icons span{
256
  <?php if(!empty($icon_color)):?>
257
+ color:<?php echo esc_attr($icon_color); ?>;
258
  <?php endif; ?>
259
  <?php if(!empty($icon_font_size)):?>
260
+ font-size:<?php echo esc_attr($icon_font_size); ?>;
261
  <?php endif; ?>
262
  }
263
  <?php
264
  if(!empty($accordions_custom_css)){
265
+ echo esc_attr($accordions_custom_css);
266
  }
267
  if($tabs_icon_toggle=='yes'){
268
  ?>
281
 
282
 
283
  ?>
284
+ .ui-tabs-vertical .ui-tabs-nav { float: left; width: <?php echo esc_attr($navs_width_ratio); ?>%;overflow: hidden; }
285
  .ui-tabs-vertical .ui-tabs-nav li { clear: left; width: 100%; }
286
+ .ui-tabs-vertical .ui-tabs-panel { padding: 1em; float: left; width: <?php echo esc_attr($panel_width_ratio); ?>%;}
287
  <?php
288
  }
289
  ?>
458
  jQuery(document).ready(function($){
459
  <?php
460
  if(isset($_GET['active_index'])):
461
+ $accordion_index = isset($_GET['active_index']) ? esc_attr($_GET['active_index']) : '';
462
  $accordion_index = explode('-', $accordion_index);
463
  foreach ($accordion_index as $args){
464
  $args_arr = explode('|', $args);
526
  $custom_scripts = isset($accordions_options['custom_scripts']) ? $accordions_options['custom_scripts'] : array();
527
  $custom_js = isset($custom_scripts['custom_js']) ? $custom_scripts['custom_js'] : '';
528
 
529
+ $active_tab = isset($_GET['id']) ? (int)$_GET['id'] : 1;
530
 
531
  $tabs = isset($accordions_options['tabs']) ? $accordions_options['tabs'] : array();
532
  $collapsible = !empty($tabs['collapsible']) ? $tabs['collapsible'] : 'true';