Simple Custom Post Order - Version 2.5.2

Version Description

Download this release

Release Info

Developer giucu91
Plugin Icon wp plugin Simple Custom Post Order
Version 2.5.2
Comparing to
See all releases

Code changes from version 2.5.1 to 2.5.2

assets/scporder.js CHANGED
@@ -31,7 +31,7 @@
31
  /****
32
  * Fix for table breaking
33
  */
34
- jQuery(window).load(function () {
35
 
36
  // make the array for the sizes
37
  var td_array = new Array();
31
  /****
32
  * Fix for table breaking
33
  */
34
+ jQuery(window).on( 'load', function () {
35
 
36
  // make the array for the sizes
37
  var td_array = new Array();
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: custom post order, post order, js post order, page order, posts order, cat
4
  Requires at least: 4.6
5
  Requires PHP: 5.6
6
  Tested up to: 5.5
7
- Stable tag: 2.5.1
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -36,6 +36,10 @@ An answer to that question.
36
 
37
  == Changelog ==
38
 
 
 
 
 
39
  = Version 2.5.1 =
40
  * Improve fix for post list table width when sorting is enabled ( thanks to gedeminas )
41
  * Fix for admin ajax overriding queries ( thanks to igritsay )
4
  Requires at least: 4.6
5
  Requires PHP: 5.6
6
  Tested up to: 5.5
7
+ Stable tag: 2.5.2
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
36
 
37
  == Changelog ==
38
 
39
+ = Version 2.5.2 =
40
+ * Modified deprecated JQuery function to improve compatibility with Wordpress 5.5
41
+ * Fixed an issue where posts would be in reverse order after resetting the order
42
+
43
  = Version 2.5.1 =
44
  * Improve fix for post list table width when sorting is enabled ( thanks to gedeminas )
45
  * Fix for admin ajax overriding queries ( thanks to igritsay )
settings.php CHANGED
@@ -390,6 +390,9 @@ $advanced_view = isset($scporder_options['show_advanced_view']) ? $scporder_opti
390
  $.post("<?php echo admin_url('admin-ajax.php'); ?>", data, function (response) {
391
  if (response) {
392
  btn.next('.scpo-reset-response').text(response);
 
 
 
393
  }
394
  });
395
  }
390
  $.post("<?php echo admin_url('admin-ajax.php'); ?>", data, function (response) {
391
  if (response) {
392
  btn.next('.scpo-reset-response').text(response);
393
+ setTimeout(function(){
394
+ location.reload(true);
395
+ },1500);
396
  }
397
  });
398
  }
simple-custom-post-order.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Simple Custom Post Order
4
  * Plugin URI: https://wordpress.org/plugins-wp/simple-custom-post-order/
5
  * Description: Order Items (Posts, Pages, and Custom Post Types) using a Drag and Drop Sortable JavaScript.
6
- * Version: 2.5.1
7
  * Author: Colorlib
8
  * Author URI: https://colorlib.com/
9
  * Tested up to: 5.5
@@ -36,7 +36,7 @@
36
 
37
  define('SCPORDER_URL', plugins_url('', __FILE__));
38
  define('SCPORDER_DIR', plugin_dir_path(__FILE__));
39
- define('SCPORDER_VERSION', '2.5.1');
40
 
41
  $scporder = new SCPO_Engine();
42
 
@@ -641,6 +641,14 @@ class SCPO_Engine {
641
 
642
  $result = $wpdb->query($prep_posts_query);
643
 
 
 
 
 
 
 
 
 
644
  if ($result) {
645
  echo 'Items have been reset';
646
  } else {
3
  * Plugin Name: Simple Custom Post Order
4
  * Plugin URI: https://wordpress.org/plugins-wp/simple-custom-post-order/
5
  * Description: Order Items (Posts, Pages, and Custom Post Types) using a Drag and Drop Sortable JavaScript.
6
+ * Version: 2.5.2
7
  * Author: Colorlib
8
  * Author URI: https://colorlib.com/
9
  * Tested up to: 5.5
36
 
37
  define('SCPORDER_URL', plugins_url('', __FILE__));
38
  define('SCPORDER_DIR', plugin_dir_path(__FILE__));
39
+ define('SCPORDER_VERSION', '2.5.2');
40
 
41
  $scporder = new SCPO_Engine();
42
 
641
 
642
  $result = $wpdb->query($prep_posts_query);
643
 
644
+ $scpo_options = get_option( 'scporder_options' );
645
+
646
+ if ( !false == $scpo_options ) {
647
+
648
+ $scpo_options['objects'] = array_diff( $scpo_options['objects'], $items );
649
+ update_option( 'scporder_options', $scpo_options );
650
+ }
651
+
652
  if ($result) {
653
  echo 'Items have been reset';
654
  } else {