Custom Taxonomy Order NE - Version 2.8.2

Version Description

  • 2016-10-19
  • Only skip one sort for tags on frontend, not admin.
Download this release

Release Info

Developer mpol
Plugin Icon 128x128 Custom Taxonomy Order NE
Version 2.8.2
Comparing to
See all releases

Code changes from version 2.8.1 to 2.8.2

Files changed (2) hide show
  1. customtaxorder.php +10 -7
  2. readme.txt +6 -2
customtaxorder.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Custom Taxonomy Order NE
4
  Plugin URI: http://products.zenoweb.nl/free-wordpress-plugins/custom-taxonomy-order-ne/
5
  Description: Allows for the ordering of categories and custom taxonomy terms through a simple drag-and-drop interface.
6
- Version: 2.8.1
7
  Author: Marcel Pol
8
  Author URI: http://zenoweb.nl/
9
  License: GPLv2 or later
@@ -36,7 +36,7 @@ Domain Path: /lang/
36
 
37
 
38
  // Plugin Version
39
- define('CUSTOMTAXORDER_VER', '2.8.1');
40
 
41
 
42
  function customtaxorder_register_settings() {
@@ -304,16 +304,18 @@ function customtaxorder_wp_get_object_terms_order_filter( $terms ) {
304
  $options[$taxonomy] = 0; // default if not set in options yet
305
  }
306
  if ( $options[$taxonomy] == 1 && !isset($_GET['orderby']) ) {
307
- if (current_filter() == 'get_terms' ) {
 
 
 
 
 
308
  $customtaxorder_exclude_taxonomies = array('post_tag', 'product_tag');
309
  if ( in_array($taxonomy, apply_filters( 'customtaxorder_exclude_taxonomies', $customtaxorder_exclude_taxonomies )) ) {
310
- // no filtering so the test in wp_generate_tag_cloud() works out right for us
311
- // filtering will happen in the tag_cloud_sort filter sometime later
312
- // post_tag = default tags
313
- // product_tag = woocommerce product tags
314
  return $terms;
315
  }
316
  }
 
317
  // Sort children after the ancestor, by using a float with "ancestor.child".
318
  foreach ($terms as $term) {
319
  if ( ! $term->parent == 0 ) {
@@ -328,6 +330,7 @@ function customtaxorder_wp_get_object_terms_order_filter( $terms ) {
328
  }
329
  }
330
  }
 
331
  usort($terms, 'customtax_cmp');
332
  return $terms;
333
  }
3
  Plugin Name: Custom Taxonomy Order NE
4
  Plugin URI: http://products.zenoweb.nl/free-wordpress-plugins/custom-taxonomy-order-ne/
5
  Description: Allows for the ordering of categories and custom taxonomy terms through a simple drag-and-drop interface.
6
+ Version: 2.8.2
7
  Author: Marcel Pol
8
  Author URI: http://zenoweb.nl/
9
  License: GPLv2 or later
36
 
37
 
38
  // Plugin Version
39
+ define('CUSTOMTAXORDER_VER', '2.8.2');
40
 
41
 
42
  function customtaxorder_register_settings() {
304
  $options[$taxonomy] = 0; // default if not set in options yet
305
  }
306
  if ( $options[$taxonomy] == 1 && !isset($_GET['orderby']) ) {
307
+
308
+ // no filtering so the test in wp_generate_tag_cloud() works out right for us
309
+ // filtering will happen in the tag_cloud_sort filter sometime later
310
+ // post_tag = default tags
311
+ // product_tag = woocommerce product tags
312
+ if (current_filter() == 'get_terms' && !is_admin() ) {
313
  $customtaxorder_exclude_taxonomies = array('post_tag', 'product_tag');
314
  if ( in_array($taxonomy, apply_filters( 'customtaxorder_exclude_taxonomies', $customtaxorder_exclude_taxonomies )) ) {
 
 
 
 
315
  return $terms;
316
  }
317
  }
318
+
319
  // Sort children after the ancestor, by using a float with "ancestor.child".
320
  foreach ($terms as $term) {
321
  if ( ! $term->parent == 0 ) {
330
  }
331
  }
332
  }
333
+
334
  usort($terms, 'customtax_cmp');
335
  return $terms;
336
  }
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: mpol
3
  Tags: order, ordering, sorting, terms, term order, term ordering, terms order, terms ordering, categories, category order, category ordering, categories order, categories ordering, custom taxonomies, taxonomy order, taxonomy ordering, taxonomies order, taxonomies ordering
4
  Requires at least: 3.7
5
- Tested up to: 4.6
6
- Stable tag: 2.8.1
7
  License: GPLv2 or later
8
 
9
 
@@ -134,6 +134,10 @@ The left metabox lists the toplevel terms. Right (or below) are the sub-terms.
134
 
135
  == Changelog ==
136
 
 
 
 
 
137
  = 2.8.1 =
138
  * 2016-10-06
139
  * Sort children with a float as ancestor.child when set to term_order.
2
  Contributors: mpol
3
  Tags: order, ordering, sorting, terms, term order, term ordering, terms order, terms ordering, categories, category order, category ordering, categories order, categories ordering, custom taxonomies, taxonomy order, taxonomy ordering, taxonomies order, taxonomies ordering
4
  Requires at least: 3.7
5
+ Tested up to: 4.7
6
+ Stable tag: 2.8.2
7
  License: GPLv2 or later
8
 
9
 
134
 
135
  == Changelog ==
136
 
137
+ = 2.8.2 =
138
+ * 2016-10-19
139
+ * Only skip one sort for tags on frontend, not admin.
140
+
141
  = 2.8.1 =
142
  * 2016-10-06
143
  * Sort children with a float as ancestor.child when set to term_order.