[wp-trac] [WordPress Trac] #40335: using 'pre_get_terms' is confusing when it comes to ordering by meta

WordPress Trac noreply at wordpress.org
Mon Feb 5 09:26:44 UTC 2018


#40335: using 'pre_get_terms' is confusing when it comes to ordering by meta
--------------------------+------------------------------
 Reporter:  wujek_bogdan  |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Query         |     Version:  4.7.3
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by geminorum):

 I've found no sane way to change the `WP_Terms_List_Table` default or
 custom ordering. This could be avoided if the `pre_get_terms` hook made by
 reference, much like `pre_get_posts`:

 so: `do_action( 'pre_get_terms', $this );`
 to: `do_action_ref_array( 'pre_get_terms', array( &$this ) );`

 then we can override `meta_query` with new `WP_Meta_Query` for custom
 ordering.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40335#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list