Category Order and Taxonomy Terms Order - Version 1.5.3.2

Version Description

  • Add nonce field for AJAX sort update
Download this release

Release Info

Developer nsp-code
Plugin Icon 128x128 Category Order and Taxonomy Terms Order
Version 1.5.3.2
Comparing to
See all releases

Code changes from version 1.5.3.1 to 1.5.3.2

Files changed (3) hide show
  1. include/interface.php +1 -1
  2. readme.txt +5 -2
  3. taxonomy-terms-order.php +6 -2
include/interface.php CHANGED
@@ -199,7 +199,7 @@
199
  //serialize the array
200
  var serialize_data = JSON.stringify( convArrToObj(mySortable));
201
 
202
- jQuery.post( ajaxurl, { action:'update-taxonomy-order', order: serialize_data }, function() {
203
  jQuery("#ajax-response").html('<div class="message updated fade"><p><?php _e( "Items Order Updated", 'taxonomy-terms-order' ) ?></p></div>');
204
  jQuery("#ajax-response div").delay(3000).hide("slow");
205
  });
199
  //serialize the array
200
  var serialize_data = JSON.stringify( convArrToObj(mySortable));
201
 
202
+ jQuery.post( ajaxurl, { action:'update-taxonomy-order', order: serialize_data, nonce : '<?php echo wp_create_nonce( 'update-taxonomy-order' ); ?>' }, function() {
203
  jQuery("#ajax-response").html('<div class="message updated fade"><p><?php _e( "Items Order Updated", 'taxonomy-terms-order' ) ?></p></div>');
204
  jQuery("#ajax-response div").delay(3000).hide("slow");
205
  });
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.nsp-code.com/donate.php
4
  Tags: category order,terms order, taxonomy order, admin order, categories sort, order category
5
  Requires at least: 2.8
6
  Tested up to: 4.9.4
7
- Stable tag: 1.5.3.1
8
 
9
  Order Categories and all custom taxonomies terms (hierarchically) and child terms using a Drag and Drop Sortable javascript capability.
10
 
@@ -59,8 +59,11 @@ Consider upgrading to our advanced version of this plugin at a very resonable pr
59
 
60
  == Change Log ==
61
 
 
 
 
62
  = 1.5.3.1 =
63
- - Removed Google Plus share button
64
 
65
  = 1.5.3 =
66
  - Use JSON instead serialize method when sending order through AJAX
4
  Tags: category order,terms order, taxonomy order, admin order, categories sort, order category
5
  Requires at least: 2.8
6
  Tested up to: 4.9.4
7
+ Stable tag: 1.5.3.2
8
 
9
  Order Categories and all custom taxonomies terms (hierarchically) and child terms using a Drag and Drop Sortable javascript capability.
10
 
59
 
60
  == Change Log ==
61
 
62
+ = 1.5.3.2 =
63
+ - Add nonce field for AJAX sort update
64
+
65
  = 1.5.3.1 =
66
+ - Removed Google Plus share button which triggered some JavaScript errors
67
 
68
  = 1.5.3 =
69
  - Use JSON instead serialize method when sending order through AJAX
taxonomy-terms-order.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Category Order and Taxonomy Terms Order
4
  Plugin URI: http://www.nsp-code.com
5
  Description: Order Categories and all custom taxonomies terms (hierarchically) and child terms using a Drag and Drop Sortable javascript capability.
6
- Version: 1.5.3.1
7
  Author: Nsp-Code
8
  Author URI: http://www.nsp-code.com
9
  Author Email: electronice_delphi@yahoo.com
@@ -156,7 +156,11 @@ Domain Path: /languages/
156
  add_action( 'wp_ajax_update-taxonomy-order', 'TOsaveAjaxOrder' );
157
  function TOsaveAjaxOrder()
158
  {
159
- global $wpdb;
 
 
 
 
160
  $data = stripslashes($_POST['order']);
161
  $unserialised_data = json_decode($data, TRUE);
162
 
3
  Plugin Name: Category Order and Taxonomy Terms Order
4
  Plugin URI: http://www.nsp-code.com
5
  Description: Order Categories and all custom taxonomies terms (hierarchically) and child terms using a Drag and Drop Sortable javascript capability.
6
+ Version: 1.5.3.2
7
  Author: Nsp-Code
8
  Author URI: http://www.nsp-code.com
9
  Author Email: electronice_delphi@yahoo.com
156
  add_action( 'wp_ajax_update-taxonomy-order', 'TOsaveAjaxOrder' );
157
  function TOsaveAjaxOrder()
158
  {
159
+ global $wpdb;
160
+
161
+ if ( ! wp_verify_nonce( $_POST['nonce'], 'update-taxonomy-order' ) )
162
+ die('wrong');
163
+
164
  $data = stripslashes($_POST['order']);
165
  $unserialised_data = json_decode($data, TRUE);
166