Accordion - Version 2.2.35

Version Description

  • 2021-12-15 - fix - SQL security issue fixed.
Download this release

Release Info

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

Code changes from version 2.2.33 to 2.2.35

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.33
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.33' );
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.35
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.35' );
25
  define('accordions_plugin_name', 'Accordions' );
26
  define('accordions_plugin_basename', plugin_basename( __FILE__ ) );
27
 
includes/duplicate-post.php CHANGED
@@ -75,18 +75,13 @@ function accordions_duplicate_post_as_draft(){
75
  /*
76
  * duplicate all post meta just in two SQL queries
77
  */
78
- $post_meta_infos = $wpdb->get_results("SELECT meta_key, meta_value FROM $wpdb->postmeta WHERE post_id=$post_id");
79
- if (count($post_meta_infos)!=0) {
80
- $sql_query = "INSERT INTO $wpdb->postmeta (post_id, meta_key, meta_value) ";
81
- foreach ($post_meta_infos as $meta_info) {
82
- $meta_key = $meta_info->meta_key;
83
- if( $meta_key == '_wp_old_slug' ) continue;
84
- $meta_value = addslashes($meta_info->meta_value);
85
- $sql_query_sel[]= "SELECT $new_post_id, '$meta_key', '$meta_value'";
86
  }
87
- $sql_query.= implode(" UNION ALL ", $sql_query_sel);
88
- $wpdb->query($sql_query);
89
- }
90
 
91
 
92
  /*
75
  /*
76
  * duplicate all post meta just in two SQL queries
77
  */
78
+ // Copy post metadata
79
+ $data = get_post_custom($post_id);
80
+ foreach ( $data as $key => $values) {
81
+ foreach ($values as $value) {
82
+ add_post_meta( $new_post_id, $key, maybe_unserialize( $value ) );// it is important to unserialize data to avoid conflicts.
83
+ }
 
 
84
  }
 
 
 
85
 
86
 
87
  /*
readme.txt CHANGED
@@ -3,8 +3,8 @@
3
  Donate link: https://www.pickplugins.com/item/accordions-html-css3-responsive-accordion-grid-for-wordpress/?ref=dashboard
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.33
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -139,6 +139,13 @@ then paste this shortcode anywhere in your page to display accordions<br />
139
 
140
  == Changelog ==
141
 
 
 
 
 
 
 
 
142
  = 2.2.33 =
143
  * 2021-05-05 - fix - jsson format issue for FAQpage
144
 
3
  Donate link: https://www.pickplugins.com/item/accordions-html-css3-responsive-accordion-grid-for-wordpress/?ref=dashboard
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.8
7
+ Stable tag: 2.2.35
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.35 =
143
+ * 2021-12-15 - fix - SQL security issue fixed.
144
+
145
+ = 2.2.34 =
146
+ * 2021-05-05 - fix - Custom JS output issue fixed.
147
+
148
+
149
  = 2.2.33 =
150
  * 2021-05-05 - fix - jsson format issue for FAQpage
151
 
templates/accordion/accordion-hook.php CHANGED
@@ -633,7 +633,7 @@ function accordions_main_scripts($atts){
633
  ?>
634
  <script>
635
  jQuery(document).ready(function($){
636
- <?php echo esc_js($custom_js); ?>
637
  })
638
  </script>
639
  <?php
633
  ?>
634
  <script>
635
  jQuery(document).ready(function($){
636
+ <?php echo ($custom_js); ?>
637
  })
638
  </script>
639
  <?php