Version Description
- Replaced serialize with JSON when saving terms order
- New filter to/get_terms_orderby/ignore to allow sort ignore when Autosort is turned On
- Addon code to ignore term_order sorting when Co-Authors plugin term query
Download this release
Release Info
Developer | nsp-code |
Plugin | Category Order and Taxonomy Terms Order |
Version | 1.5.4 |
Comparing to | |
See all releases |
Code changes from version 1.5.3.2 to 1.5.4
- include/addons.php +21 -0
- languages/taxonomy-terms-order.mo +0 -0
- languages/taxonomy-terms-order.po +11 -11
- readme.txt +7 -2
- taxonomy-terms-order.php +11 -4
include/addons.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
//Co-Authors Plus fix
|
4 |
+
add_action ('to/get_terms_orderby/ignore', 'to__get_terms_orderby__ignore', 10, 3);
|
5 |
+
function to__get_terms_orderby__ignore( $ignore, $orderby, $args )
|
6 |
+
{
|
7 |
+
if( !function_exists('is_plugin_active') )
|
8 |
+
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
9 |
+
|
10 |
+
if( ! is_plugin_active( 'co-authors-plus/co-authors-plus.php' ))
|
11 |
+
return $ignore;
|
12 |
+
|
13 |
+
if ( ! isset($args['taxonomy']) || count($args['taxonomy']) !== 1 || array_search('author', $args['taxonomy']) === FALSE )
|
14 |
+
return $ignore;
|
15 |
+
|
16 |
+
return TRUE;
|
17 |
+
|
18 |
+
}
|
19 |
+
|
20 |
+
|
21 |
+
?>
|
languages/taxonomy-terms-order.mo
CHANGED
Binary file
|
languages/taxonomy-terms-order.po
CHANGED
@@ -2,8 +2,8 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Category Order and Taxonomy Terms Order\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2018-
|
6 |
-
"PO-Revision-Date: 2018-
|
7 |
"Last-Translator: NspCode <contact@nsp-code.com>\n"
|
8 |
"Language-Team: nsp-code <electronice_delphi@yahoo.com>\n"
|
9 |
"Language: en\n"
|
@@ -15,40 +15,40 @@ msgstr ""
|
|
15 |
"X-Generator: Poedit 1.5.5\n"
|
16 |
"X-Poedit-SearchPath-0: .\n"
|
17 |
|
18 |
-
#: taxonomy-terms-order.php:
|
19 |
msgid "Taxonomy Terms Order"
|
20 |
msgstr ""
|
21 |
|
22 |
-
#: taxonomy-terms-order.php:
|
23 |
-
#: taxonomy-terms-order.php:
|
24 |
msgid "Taxonomy Order"
|
25 |
msgstr ""
|
26 |
|
27 |
-
#: include/functions.php:
|
28 |
msgid ""
|
29 |
"Did you find this plugin useful? Please support our work with a donation or "
|
30 |
"write an article about this plugin in your blog with a link to our site"
|
31 |
msgstr ""
|
32 |
|
33 |
-
#: include/functions.php:
|
34 |
msgid "Did you know there is available an advanced version of this plug-in?"
|
35 |
msgstr ""
|
36 |
|
37 |
-
#: include/functions.php:
|
38 |
msgid "Read more"
|
39 |
msgstr ""
|
40 |
|
41 |
-
#: include/functions.php:
|
42 |
msgid "Check our"
|
43 |
msgstr ""
|
44 |
|
45 |
-
#: include/functions.php:
|
46 |
msgid ""
|
47 |
"plugin which allow to custom sort categories and custom taxonomies terms per "
|
48 |
"post basis"
|
49 |
msgstr ""
|
50 |
|
51 |
-
#: include/functions.php:
|
52 |
msgid "plugin which allow to custom sort all posts, pages, custom post types"
|
53 |
msgstr ""
|
54 |
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Category Order and Taxonomy Terms Order\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2018-06-07 21:24+0200\n"
|
6 |
+
"PO-Revision-Date: 2018-06-07 21:24+0200\n"
|
7 |
"Last-Translator: NspCode <contact@nsp-code.com>\n"
|
8 |
"Language-Team: nsp-code <electronice_delphi@yahoo.com>\n"
|
9 |
"Language: en\n"
|
15 |
"X-Generator: Poedit 1.5.5\n"
|
16 |
"X-Poedit-SearchPath-0: .\n"
|
17 |
|
18 |
+
#: taxonomy-terms-order.php:81
|
19 |
msgid "Taxonomy Terms Order"
|
20 |
msgstr ""
|
21 |
|
22 |
+
#: taxonomy-terms-order.php:116 taxonomy-terms-order.php:118
|
23 |
+
#: taxonomy-terms-order.php:120 include/interface.php:38
|
24 |
msgid "Taxonomy Order"
|
25 |
msgstr ""
|
26 |
|
27 |
+
#: include/functions.php:80
|
28 |
msgid ""
|
29 |
"Did you find this plugin useful? Please support our work with a donation or "
|
30 |
"write an article about this plugin in your blog with a link to our site"
|
31 |
msgstr ""
|
32 |
|
33 |
+
#: include/functions.php:81
|
34 |
msgid "Did you know there is available an advanced version of this plug-in?"
|
35 |
msgstr ""
|
36 |
|
37 |
+
#: include/functions.php:81
|
38 |
msgid "Read more"
|
39 |
msgstr ""
|
40 |
|
41 |
+
#: include/functions.php:82 include/functions.php:83
|
42 |
msgid "Check our"
|
43 |
msgstr ""
|
44 |
|
45 |
+
#: include/functions.php:82
|
46 |
msgid ""
|
47 |
"plugin which allow to custom sort categories and custom taxonomies terms per "
|
48 |
"post basis"
|
49 |
msgstr ""
|
50 |
|
51 |
+
#: include/functions.php:83
|
52 |
msgid "plugin which allow to custom sort all posts, pages, custom post types"
|
53 |
msgstr ""
|
54 |
|
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,11 @@ Consider upgrading to our advanced version of this plugin at a very resonable pr
|
|
59 |
|
60 |
== Change Log ==
|
61 |
|
|
|
|
|
|
|
|
|
|
|
62 |
= 1.5.3.2 =
|
63 |
- Add nonce field for AJAX sort update
|
64 |
|
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.6
|
7 |
+
Stable tag: 1.5.4
|
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.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
|
65 |
+
- Addon code to ignore term_order sorting when Co-Authors plugin term query
|
66 |
+
|
67 |
= 1.5.3.2 =
|
68 |
- Add nonce field for AJAX sort update
|
69 |
|
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
|
@@ -40,7 +40,8 @@ Domain Path: /languages/
|
|
40 |
|
41 |
}
|
42 |
|
43 |
-
include_once(TOPATH . '/include/functions.php');
|
|
|
44 |
|
45 |
add_action( 'plugins_loaded', 'to_load_textdomain');
|
46 |
function to_load_textdomain()
|
@@ -122,7 +123,10 @@ Domain Path: /languages/
|
|
122 |
|
123 |
function TO_applyorderfilter($orderby, $args)
|
124 |
{
|
125 |
-
|
|
|
|
|
|
|
126 |
|
127 |
//if admin make sure use the admin setting
|
128 |
if (is_admin())
|
@@ -147,6 +151,9 @@ Domain Path: /languages/
|
|
147 |
add_filter('get_terms_orderby', 'TO_get_terms_orderby', 1, 2);
|
148 |
function TO_get_terms_orderby($orderby, $args)
|
149 |
{
|
|
|
|
|
|
|
150 |
if (isset($args['orderby']) && $args['orderby'] == "term_order" && $orderby != "term_order")
|
151 |
return "t.term_order";
|
152 |
|
@@ -159,7 +166,7 @@ Domain Path: /languages/
|
|
159 |
global $wpdb;
|
160 |
|
161 |
if ( ! wp_verify_nonce( $_POST['nonce'], 'update-taxonomy-order' ) )
|
162 |
-
die(
|
163 |
|
164 |
$data = stripslashes($_POST['order']);
|
165 |
$unserialised_data = json_decode($data, TRUE);
|
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.4
|
7 |
Author: Nsp-Code
|
8 |
Author URI: http://www.nsp-code.com
|
9 |
Author Email: electronice_delphi@yahoo.com
|
40 |
|
41 |
}
|
42 |
|
43 |
+
include_once ( TOPATH . '/include/functions.php' );
|
44 |
+
include_once ( TOPATH . '/include/addons.php' );
|
45 |
|
46 |
add_action( 'plugins_loaded', 'to_load_textdomain');
|
47 |
function to_load_textdomain()
|
123 |
|
124 |
function TO_applyorderfilter($orderby, $args)
|
125 |
{
|
126 |
+
if ( apply_filters('to/get_terms_orderby/ignore', FALSE, $orderby, $args) )
|
127 |
+
return $orderby;
|
128 |
+
|
129 |
+
$options = tto_get_settings();
|
130 |
|
131 |
//if admin make sure use the admin setting
|
132 |
if (is_admin())
|
151 |
add_filter('get_terms_orderby', 'TO_get_terms_orderby', 1, 2);
|
152 |
function TO_get_terms_orderby($orderby, $args)
|
153 |
{
|
154 |
+
if ( apply_filters('to/get_terms_orderby/ignore', FALSE, $orderby, $args) )
|
155 |
+
return $orderby;
|
156 |
+
|
157 |
if (isset($args['orderby']) && $args['orderby'] == "term_order" && $orderby != "term_order")
|
158 |
return "t.term_order";
|
159 |
|
166 |
global $wpdb;
|
167 |
|
168 |
if ( ! wp_verify_nonce( $_POST['nonce'], 'update-taxonomy-order' ) )
|
169 |
+
die();
|
170 |
|
171 |
$data = stripslashes($_POST['order']);
|
172 |
$unserialised_data = json_decode($data, TRUE);
|