[wp-trac] [WordPress Trac] #35925: Filter for wp_get_object_terms() arguments

WordPress Trac noreply at wordpress.org
Wed Jan 25 18:32:09 UTC 2017


#35925: Filter for wp_get_object_terms() arguments
--------------------------------------+-----------------------------
 Reporter:  enrico.sorcinelli         |       Owner:
     Type:  enhancement               |      Status:  new
 Priority:  normal                    |   Milestone:  Future Release
Component:  Taxonomy                  |     Version:  4.6
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+-----------------------------

Comment (by Chouby):

 Since WP 4.7, there is a workaround. Use the filter `get_terms_args` and
 test `$args['object_ids']` to know if `get_terms()` has been called
 directly or through `wp_get_object_terms()`. Of course, this is a
 workaround and a dedicated filter as proposed here would offer a more
 robust solution.

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


More information about the wp-trac mailing list