Version Description
- Ignore admin sort when using columns order within Taxonomy interface
Download this release
Release Info
Developer | nsp-code |
Plugin | Category Order and Taxonomy Terms Order |
Version | 1.5.5 |
Comparing to | |
See all releases |
Code changes from version 1.5.4 to 1.5.5
- readme.txt +5 -2
- taxonomy-terms-order.php +8 -3
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: nsp-code
|
|
3 |
Donate link: http://www.nsp-code.com/donate.php
|
4 |
Tags: category order,terms order, taxonomy order, admin order, categories sort, order category
|
5 |
Requires at least: 2.8
|
6 |
-
Tested up to: 4.9.
|
7 |
-
Stable tag: 1.5.
|
8 |
|
9 |
Order Categories and all custom taxonomies terms (hierarchically) and child terms using a Drag and Drop Sortable javascript capability.
|
10 |
|
@@ -59,6 +59,9 @@ Consider upgrading to our advanced version of this plugin at a very resonable pr
|
|
59 |
|
60 |
== Change Log ==
|
61 |
|
|
|
|
|
|
|
62 |
= 1.5.4 =
|
63 |
- Replaced serialize with JSON when saving terms order
|
64 |
- New filter to/get_terms_orderby/ignore to allow sort ignore when Autosort is turned On
|
3 |
Donate link: http://www.nsp-code.com/donate.php
|
4 |
Tags: category order,terms order, taxonomy order, admin order, categories sort, order category
|
5 |
Requires at least: 2.8
|
6 |
+
Tested up to: 4.9.8
|
7 |
+
Stable tag: 1.5.5
|
8 |
|
9 |
Order Categories and all custom taxonomies terms (hierarchically) and child terms using a Drag and Drop Sortable javascript capability.
|
10 |
|
59 |
|
60 |
== Change Log ==
|
61 |
|
62 |
+
= 1.5.5 =
|
63 |
+
- Ignore admin sort when using columns order within Taxonomy interface
|
64 |
+
|
65 |
= 1.5.4 =
|
66 |
- Replaced serialize with JSON when saving terms order
|
67 |
- New filter to/get_terms_orderby/ignore to allow sort ignore when Autosort is turned On
|
taxonomy-terms-order.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Category Order and Taxonomy Terms Order
|
4 |
Plugin URI: http://www.nsp-code.com
|
5 |
Description: Order Categories and all custom taxonomies terms (hierarchically) and child terms using a Drag and Drop Sortable javascript capability.
|
6 |
-
Version: 1.5.
|
7 |
Author: Nsp-Code
|
8 |
Author URI: http://www.nsp-code.com
|
9 |
Author Email: electronice_delphi@yahoo.com
|
@@ -121,7 +121,7 @@ Domain Path: /languages/
|
|
121 |
}
|
122 |
}
|
123 |
|
124 |
-
function
|
125 |
{
|
126 |
if ( apply_filters('to/get_terms_orderby/ignore', FALSE, $orderby, $args) )
|
127 |
return $orderby;
|
@@ -131,6 +131,11 @@ Domain Path: /languages/
|
|
131 |
//if admin make sure use the admin setting
|
132 |
if (is_admin())
|
133 |
{
|
|
|
|
|
|
|
|
|
|
|
134 |
if ($options['adminsort'] == "1")
|
135 |
return 't.term_order';
|
136 |
|
@@ -146,7 +151,7 @@ Domain Path: /languages/
|
|
146 |
return $orderby;
|
147 |
}
|
148 |
|
149 |
-
add_filter('get_terms_orderby', '
|
150 |
|
151 |
add_filter('get_terms_orderby', 'TO_get_terms_orderby', 1, 2);
|
152 |
function TO_get_terms_orderby($orderby, $args)
|
3 |
Plugin Name: Category Order and Taxonomy Terms Order
|
4 |
Plugin URI: http://www.nsp-code.com
|
5 |
Description: Order Categories and all custom taxonomies terms (hierarchically) and child terms using a Drag and Drop Sortable javascript capability.
|
6 |
+
Version: 1.5.5
|
7 |
Author: Nsp-Code
|
8 |
Author URI: http://www.nsp-code.com
|
9 |
Author Email: electronice_delphi@yahoo.com
|
121 |
}
|
122 |
}
|
123 |
|
124 |
+
function TO_apply_order_filter($orderby, $args)
|
125 |
{
|
126 |
if ( apply_filters('to/get_terms_orderby/ignore', FALSE, $orderby, $args) )
|
127 |
return $orderby;
|
131 |
//if admin make sure use the admin setting
|
132 |
if (is_admin())
|
133 |
{
|
134 |
+
|
135 |
+
//return if use orderby columns
|
136 |
+
if (isset($_GET['orderby']) && $_GET['orderby'] != 'term_order')
|
137 |
+
return $orderby;
|
138 |
+
|
139 |
if ($options['adminsort'] == "1")
|
140 |
return 't.term_order';
|
141 |
|
151 |
return $orderby;
|
152 |
}
|
153 |
|
154 |
+
add_filter('get_terms_orderby', 'TO_apply_order_filter', 10, 2);
|
155 |
|
156 |
add_filter('get_terms_orderby', 'TO_get_terms_orderby', 1, 2);
|
157 |
function TO_get_terms_orderby($orderby, $args)
|