Get_terms_args filter broken
-
Pre-4.7, this worked to order categories (and other taxonomies) in admin views (at post.php, post-new.php, and the admin ‘Categories’ page, itself):
// Order list of categories in admin views function my_sort_terms( $args ) { $args['taxonomies'] = array( 'category' ); $args['order'] = 'DESC'; $args['orderby'] = 'ID'; return $args; } add_filter( 'get_terms_args', 'my_sort_terms', 10, 2 );However, when I upgraded to WP 4.7, it stopped working.
I’ve deactivated plugins. I tested on a stripped-down test site on 4.6 and 4.7 – same result. 4.7 stops this from working. Neither ‘add_filter’ nor ‘apply_filters’ works.How to fix? OR, in 4.7, how can I order categories/taxonomies by id on the admin side?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
The topic ‘Get_terms_args filter broken’ is closed to new replies.