Post Types Order - Version 1.9.4.3

Version Description

  • Option text translation update
    • Changed the posts class to to wp-list-table when applying sortable for better compatibility
    • Compatibility tag update for WordPress 5.4
Download this release

Release Info

Developer nsp-code
Plugin Icon 128x128 Post Types Order
Version 1.9.4.3
Comparing to
See all releases

Code changes from version 1.9.4.2 to 1.9.4.3

Files changed (4) hide show
  1. include/class.cpto.php +5 -4
  2. js/cpt.js +2 -2
  3. post-types-order.php +1 -1
  4. readme.txt +8 -3
include/class.cpto.php CHANGED
@@ -258,11 +258,11 @@
258
  $screen = get_current_screen();
259
 
260
  //check if the right interface
261
- if(!isset($screen->post_type) || empty($screen->post_type))
262
  return;
263
 
264
  //check if post type is sortable
265
- if(isset($options['show_reorder_interfaces'][$screen->post_type]) && $options['show_reorder_interfaces'][$screen->post_type] != 'show')
266
  return;
267
 
268
  //if is taxonomy term filter return
@@ -292,7 +292,8 @@
292
 
293
  // Localize the script with new data
294
  $CPTO_variables = array(
295
- 'archive_sort_nonce' => wp_create_nonce( 'CPTO_archive_sort_nonce_' . $userdata->ID)
 
296
  );
297
  wp_localize_script( 'cpto', 'CPTO', $CPTO_variables );
298
 
@@ -424,7 +425,7 @@
424
 
425
  //retrieve a list of all objects
426
  $mysql_query = $wpdb->prepare("SELECT ID FROM ". $wpdb->posts ."
427
- WHERE post_type = %s AND post_status IN ('publish', 'pending', 'draft', 'private', 'future')
428
  ORDER BY menu_order, post_date DESC", $post_type);
429
  $results = $wpdb->get_results($mysql_query);
430
 
258
  $screen = get_current_screen();
259
 
260
  //check if the right interface
261
+ if( !isset( $screen->post_type ) || empty($screen->post_type))
262
  return;
263
 
264
  //check if post type is sortable
265
+ if(isset($options['show_reorder_interfaces'][$screen->post_type]) && $options['show_reorder_interfaces'][ $screen->post_type ] != 'show')
266
  return;
267
 
268
  //if is taxonomy term filter return
292
 
293
  // Localize the script with new data
294
  $CPTO_variables = array(
295
+ 'post_type' => $screen->post_type,
296
+ 'archive_sort_nonce' => wp_create_nonce( 'CPTO_archive_sort_nonce_' . $userdata->ID)
297
  );
298
  wp_localize_script( 'cpto', 'CPTO', $CPTO_variables );
299
 
425
 
426
  //retrieve a list of all objects
427
  $mysql_query = $wpdb->prepare("SELECT ID FROM ". $wpdb->posts ."
428
+ WHERE post_type = %s AND post_status IN ('publish', 'pending', 'draft', 'private', 'future', 'inherit')
429
  ORDER BY menu_order, post_date DESC", $post_type);
430
  $results = $wpdb->get_results($mysql_query);
431
 
js/cpt.js CHANGED
@@ -19,12 +19,12 @@
19
  jQuery(document).ready(function()
20
  {
21
 
22
- jQuery('table.posts #the-list').sortable({
23
  'items': 'tr',
24
  'axis': 'y',
25
  'update' : function(e, ui) {
26
 
27
- var post_type = jQuery('input[name="post_type"]').val();
28
  var order = jQuery('#the-list').sortable('serialize');
29
 
30
  var paged = getUrlParameter('paged');
19
  jQuery(document).ready(function()
20
  {
21
 
22
+ jQuery('table.wp-list-table #the-list').sortable({
23
  'items': 'tr',
24
  'axis': 'y',
25
  'update' : function(e, ui) {
26
 
27
+ var post_type = CPTO.post_type;
28
  var order = jQuery('#the-list').sortable('serialize');
29
 
30
  var paged = getUrlParameter('paged');
post-types-order.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://www.nsp-code.com
5
  Description: Posts Order and Post Types Objects Order using a Drag and Drop Sortable javascript capability
6
  Author: Nsp Code
7
  Author URI: http://www.nsp-code.com
8
- Version: 1.9.4.2
9
  Text Domain: post-types-order
10
  Domain Path: /languages/
11
  */
5
  Description: Posts Order and Post Types Objects Order using a Drag and Drop Sortable javascript capability
6
  Author: Nsp Code
7
  Author URI: http://www.nsp-code.com
8
+ Version: 1.9.4.3
9
  Text Domain: post-types-order
10
  Domain Path: /languages/
11
  */
readme.txt CHANGED
@@ -3,14 +3,14 @@ Contributors: nsp-code, tdgu
3
  Donate link: http://www.nsp-code.com/donate.php
4
  Tags: post order, posts order, sort, post sort, posts sort, post type order, custom order, admin posts order
5
  Requires at least: 2.8
6
- Tested up to: 5.3
7
- Stable tag: 1.9.4.2
8
 
9
  Post Order and custom Post Type Objects (custom post types) using a Drag and Drop Sortable JavaScript AJAX interface or default WordPress dashboard.
10
 
11
  == Description ==
12
 
13
- <strong>Over 3.2 MILLIONS DOWNLOADS and near PERFECT rating out of 200 REVIEWS</strong>. <br />
14
  A powerful plugin, Order Posts and Post Types Objects using a Drag and Drop Sortable JavaScript capability.
15
 
16
  The order can be customized within **default WordPress post type archive list page** or **a separate Re-Order interface** which display all objects.
@@ -94,6 +94,11 @@ Consider upgrading to our advanced version of this plugin at a very resonable pr
94
 
95
  == Change Log ==
96
 
 
 
 
 
 
97
  = 1.9.4.2 =
98
  - Compatibility tag update for WordPress 5.3
99
 
3
  Donate link: http://www.nsp-code.com/donate.php
4
  Tags: post order, posts order, sort, post sort, posts sort, post type order, custom order, admin posts order
5
  Requires at least: 2.8
6
+ Tested up to: 5.4
7
+ Stable tag: 1.9.4.3
8
 
9
  Post Order and custom Post Type Objects (custom post types) using a Drag and Drop Sortable JavaScript AJAX interface or default WordPress dashboard.
10
 
11
  == Description ==
12
 
13
+ <strong>Over 4 MILLIONS DOWNLOADS and near PERFECT rating out of 200 REVIEWS</strong>. <br />
14
  A powerful plugin, Order Posts and Post Types Objects using a Drag and Drop Sortable JavaScript capability.
15
 
16
  The order can be customized within **default WordPress post type archive list page** or **a separate Re-Order interface** which display all objects.
94
 
95
  == Change Log ==
96
 
97
+ = 1.9.4.3 =
98
+ - Option text translation update
99
+ - Changed the posts class to to wp-list-table when applying sortable for better compatibility
100
+ - Compatibility tag update for WordPress 5.4
101
+
102
  = 1.9.4.2 =
103
  - Compatibility tag update for WordPress 5.3
104