Simple Custom Post Order - Version 2.5.6

Version Description

Download this release

Release Info

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

Code changes from version 2.5.5 to 2.5.6

Files changed (2) hide show
  1. readme.txt +4 -2
  2. simple-custom-post-order.php +5 -3
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: silkalns
3
  Tags: custom post order, post order, js post order, page order, posts order, category order, sort posts, sort pages, sort custom posts
4
  Requires at least: 4.6
5
  Requires PHP: 5.6
6
- Tested up to: 5.7
7
- Stable tag: 2.5.5
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -35,6 +35,8 @@ An answer to that question.
35
  3. Settings
36
 
37
  == Changelog ==
 
 
38
 
39
  = Version 2.5.5 - 11.05.2021 =
40
  Changed : Code Cleaning
3
  Tags: custom post order, post order, js post order, page order, posts order, category order, sort posts, sort pages, sort custom posts
4
  Requires at least: 4.6
5
  Requires PHP: 5.6
6
+ Tested up to: 5.8
7
+ Stable tag: 2.5.6
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
35
  3. Settings
36
 
37
  == Changelog ==
38
+ = Version 2.5.6 - 27.05.2021 =
39
+ Changed : Revert to 2.5.4
40
 
41
  = Version 2.5.5 - 11.05.2021 =
42
  Changed : Code Cleaning
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.5
7
  * Author: Colorlib
8
  * Author URI: https://colorlib.com/
9
  * Tested up to: 5.6
@@ -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.5' );
40
 
41
  $scporder = new SCPO_Engine();
42
 
@@ -531,9 +531,10 @@ class SCPO_Engine {
531
  if ( empty( $objects ) ) {
532
  return false;
533
  }
 
534
  if ( is_admin() && ! wp_doing_ajax() ) {
535
 
536
- if ( isset( $wp_query->query['post_type'] ) && ! isset( $wp_query->query['orderby'] ) ) {
537
  if ( in_array( $wp_query->query['post_type'], $objects ) ) {
538
  if ( ! $wp_query->get( 'orderby' ) ) {
539
  $wp_query->set( 'orderby', 'menu_order' );
@@ -543,6 +544,7 @@ class SCPO_Engine {
543
  }
544
  }
545
  }
 
546
  } else {
547
 
548
  $active = false;
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.6
7
  * Author: Colorlib
8
  * Author URI: https://colorlib.com/
9
  * Tested up to: 5.6
36
 
37
  define( 'SCPORDER_URL', plugins_url( '', __FILE__ ) );
38
  define( 'SCPORDER_DIR', plugin_dir_path( __FILE__ ) );
39
+ define( 'SCPORDER_VERSION', '2.5.6' );
40
 
41
  $scporder = new SCPO_Engine();
42
 
531
  if ( empty( $objects ) ) {
532
  return false;
533
  }
534
+
535
  if ( is_admin() && ! wp_doing_ajax() ) {
536
 
537
+ if ( isset( $wp_query->query['post_type'] ) && ! isset( $_GET['orderby'] ) ) {
538
  if ( in_array( $wp_query->query['post_type'], $objects ) ) {
539
  if ( ! $wp_query->get( 'orderby' ) ) {
540
  $wp_query->set( 'orderby', 'menu_order' );
544
  }
545
  }
546
  }
547
+
548
  } else {
549
 
550
  $active = false;