Version Description
- Admin Post / Page Gallery items order fix
- New filter pto/posts_orderby to ignore sort apply
Download this release
Release Info
Developer | nsp-code |
Plugin | Post Types Order |
Version | 1.8.7 |
Comparing to | |
See all releases |
Code changes from version 1.8.6 to 1.8.7
- include/functions.php +1 -0
- post-types-order.php +8 -1
- readme.txt +11 -3
include/functions.php
CHANGED
@@ -86,6 +86,7 @@
|
|
86 |
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
|
87 |
<input type="hidden" name="cmd" value="_s-xclick">
|
88 |
<input type="hidden" name="hosted_button_id" value="CU22TFDKJMLAE">
|
|
|
89 |
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
|
90 |
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
|
91 |
</form>
|
86 |
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
|
87 |
<input type="hidden" name="cmd" value="_s-xclick">
|
88 |
<input type="hidden" name="hosted_button_id" value="CU22TFDKJMLAE">
|
89 |
+
<input type="hidden" name="custom" value="PostTypesOrder">
|
90 |
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
|
91 |
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
|
92 |
</form>
|
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.8.
|
9 |
Text Domain: post-types-order
|
10 |
Domain Path: /languages/
|
11 |
*/
|
@@ -93,6 +93,10 @@ Domain Path: /languages/
|
|
93 |
if (isset($_GET['orderby']) && $_GET['orderby'] != 'menu_order')
|
94 |
return $orderBy;
|
95 |
|
|
|
|
|
|
|
|
|
96 |
if (is_admin())
|
97 |
{
|
98 |
|
@@ -109,6 +113,9 @@ Domain Path: /languages/
|
|
109 |
|| (defined('DOING_AJAX') && isset($_REQUEST['action']) && strpos($_REQUEST['action'], 'acf/') === 0))
|
110 |
return $orderBy;
|
111 |
|
|
|
|
|
|
|
112 |
$orderBy = "{$wpdb->posts}.menu_order, {$wpdb->posts}.post_date DESC";
|
113 |
}
|
114 |
}
|
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.8.7
|
9 |
Text Domain: post-types-order
|
10 |
Domain Path: /languages/
|
11 |
*/
|
93 |
if (isset($_GET['orderby']) && $_GET['orderby'] != 'menu_order')
|
94 |
return $orderBy;
|
95 |
|
96 |
+
//check to ignore
|
97 |
+
if(apply_filters('pto/posts_orderby', $orderBy, $query) === FALSE)
|
98 |
+
return $orderBy;
|
99 |
+
|
100 |
if (is_admin())
|
101 |
{
|
102 |
|
113 |
|| (defined('DOING_AJAX') && isset($_REQUEST['action']) && strpos($_REQUEST['action'], 'acf/') === 0))
|
114 |
return $orderBy;
|
115 |
|
116 |
+
if(isset($_POST['query']) && isset($_POST['query']['post__in']) && is_array($_POST['query']['post__in']) && count($_POST['query']['post__in']) > 0)
|
117 |
+
return $orderBy;
|
118 |
+
|
119 |
$orderBy = "{$wpdb->posts}.menu_order, {$wpdb->posts}.post_date DESC";
|
120 |
}
|
121 |
}
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: nsp-code
|
|
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: 4.
|
7 |
-
Stable tag: 1.8.
|
8 |
|
9 |
Post Order and custom Post Type Objects (posts, any custom post types) using a Drag and Drop Sortable JavaScript AJAX interface.
|
10 |
|
@@ -70,7 +70,11 @@ All ideas are welcome and i put them on my list to be implemented into the new v
|
|
70 |
|
71 |
= Can i make certain queries to ignore the custom sort when Autosort is turned On? =
|
72 |
|
73 |
-
This can be
|
|
|
|
|
|
|
|
|
74 |
|
75 |
= I still need more features like front sorting interface, shortcodes, filters, conditionals, advanced queries, taxonomy/ category sorting etc =
|
76 |
|
@@ -78,6 +82,10 @@ Consider upgrading to our advanced version of this plugin at a very resonable pr
|
|
78 |
|
79 |
|
80 |
== Change Log ==
|
|
|
|
|
|
|
|
|
81 |
= 1.8.6 =
|
82 |
- PHP 7 deprecated nottice fix Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP;
|
83 |
- Fix: $_REQUEST['action'] comparison evaluate as Identical instead equal
|
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: 4.5
|
7 |
+
Stable tag: 1.8.7
|
8 |
|
9 |
Post Order and custom Post Type Objects (posts, any custom post types) using a Drag and Drop Sortable JavaScript AJAX interface.
|
10 |
|
70 |
|
71 |
= Can i make certain queries to ignore the custom sort when Autosort is turned On? =
|
72 |
|
73 |
+
This can be done by including the ignore_custom_sort within custom query arguments. An example can be found at http://www.nsp-code.com/advanced-post-types-order-api/sample-usage/
|
74 |
+
|
75 |
+
= How can i force sort apply for certain queries when Autosort is turned On? =
|
76 |
+
|
77 |
+
A filter can be used to achieve that pto/posts_orderby. An example can be found at http://www.nsp-code.com/ignore-sort-apply-for-certain-query-on-post-types-order/
|
78 |
|
79 |
= I still need more features like front sorting interface, shortcodes, filters, conditionals, advanced queries, taxonomy/ category sorting etc =
|
80 |
|
82 |
|
83 |
|
84 |
== Change Log ==
|
85 |
+
= 1.8.7 =
|
86 |
+
- Admin Post / Page Gallery items order fix
|
87 |
+
- New filter pto/posts_orderby to ignore sort apply
|
88 |
+
|
89 |
= 1.8.6 =
|
90 |
- PHP 7 deprecated nottice fix Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP;
|
91 |
- Fix: $_REQUEST['action'] comparison evaluate as Identical instead equal
|