Version Description
- Include ASC / DESC if there is a query order argument
- Avada fix 'product_orderby' ignore
Download this release
Release Info
Developer | nsp-code |
Plugin | Post Types Order |
Version | 1.9.3.2 |
Comparing to | |
See all releases |
Code changes from version 1.9.3.1 to 1.9.3.2
- include/class.cpto.php +10 -2
- include/class.functions.php +2 -1
- include/class.options.php +1 -0
- include/class.walkers.php +2 -0
- post-types-order.php +1 -1
- readme.txt +6 -2
include/class.cpto.php
CHANGED
@@ -1,5 +1,7 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
3 |
class CPTO
|
4 |
{
|
5 |
var $current_post_type = null;
|
@@ -131,6 +133,10 @@
|
|
131 |
//check for orderby GET paramether in which case return default data
|
132 |
if (isset($_GET['orderby']) && $_GET['orderby'] != 'menu_order')
|
133 |
return $orderBy;
|
|
|
|
|
|
|
|
|
134 |
|
135 |
//check to ignore
|
136 |
/**
|
@@ -169,12 +175,14 @@
|
|
169 |
if($query->is_search())
|
170 |
return($orderBy);
|
171 |
|
|
|
|
|
172 |
if ($options['autosort'] == "1")
|
173 |
{
|
174 |
if(trim($orderBy) == '')
|
175 |
-
$orderBy = "{$wpdb->posts}.menu_order ";
|
176 |
else
|
177 |
-
$orderBy = "{$wpdb->posts}.menu_order, " . $orderBy;
|
178 |
}
|
179 |
}
|
180 |
|
1 |
<?php
|
2 |
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
4 |
+
|
5 |
class CPTO
|
6 |
{
|
7 |
var $current_post_type = null;
|
133 |
//check for orderby GET paramether in which case return default data
|
134 |
if (isset($_GET['orderby']) && $_GET['orderby'] != 'menu_order')
|
135 |
return $orderBy;
|
136 |
+
|
137 |
+
//Avada orderby
|
138 |
+
if (isset($_GET['product_orderby']) && $_GET['product_orderby'] != 'default')
|
139 |
+
return $orderBy;
|
140 |
|
141 |
//check to ignore
|
142 |
/**
|
175 |
if($query->is_search())
|
176 |
return($orderBy);
|
177 |
|
178 |
+
$order = isset($query->query_vars['order']) ? " " . $query->query_vars['order'] : '';
|
179 |
+
|
180 |
if ($options['autosort'] == "1")
|
181 |
{
|
182 |
if(trim($orderBy) == '')
|
183 |
+
$orderBy = "{$wpdb->posts}.menu_order " . $order;
|
184 |
else
|
185 |
+
$orderBy = "{$wpdb->posts}.menu_order". $order .", " . $orderBy;
|
186 |
}
|
187 |
}
|
188 |
|
include/class.functions.php
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
|
|
4 |
class CptoFunctions
|
5 |
{
|
6 |
|
1 |
<?php
|
2 |
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
4 |
+
|
5 |
class CptoFunctions
|
6 |
{
|
7 |
|
include/class.options.php
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
<?php
|
2 |
|
|
|
3 |
|
4 |
class CptoOptionsInterface
|
5 |
{
|
1 |
<?php
|
2 |
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
4 |
|
5 |
class CptoOptionsInterface
|
6 |
{
|
include/class.walkers.php
CHANGED
@@ -1,5 +1,7 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
3 |
class Post_Types_Order_Walker extends Walker
|
4 |
{
|
5 |
|
1 |
<?php
|
2 |
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
4 |
+
|
5 |
class Post_Types_Order_Walker extends Walker
|
6 |
{
|
7 |
|
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.3.
|
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.3.2
|
9 |
Text Domain: post-types-order
|
10 |
Domain Path: /languages/
|
11 |
*/
|
readme.txt
CHANGED
@@ -4,13 +4,13 @@ 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: 4.8
|
7 |
-
Stable tag: 1.9.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 2.
|
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.
|
@@ -93,6 +93,10 @@ Consider upgrading to our advanced version of this plugin at a very resonable pr
|
|
93 |
|
94 |
== Change Log ==
|
95 |
|
|
|
|
|
|
|
|
|
96 |
= 1.9.3.1 =
|
97 |
- WordPress 4.8 compatibility notice
|
98 |
- Slight code changes, remove unused activate / deactivate hooks
|
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: 4.8
|
7 |
+
Stable tag: 1.9.3.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 2.5 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.
|
93 |
|
94 |
== Change Log ==
|
95 |
|
96 |
+
= 1.9.3.2 =
|
97 |
+
- Include ASC / DESC if there is a query order argument
|
98 |
+
- Avada fix 'product_orderby' ignore
|
99 |
+
|
100 |
= 1.9.3.1 =
|
101 |
- WordPress 4.8 compatibility notice
|
102 |
- Slight code changes, remove unused activate / deactivate hooks
|