[wp-trac] [WordPress Trac] #18828: function wp_get_object_terms() passes sql data into `wp_get_object_terms` filter for $taxonomies

WordPress Trac noreply at wordpress.org
Fri Dec 6 15:49:19 UTC 2013


#18828: function wp_get_object_terms() passes sql data into `wp_get_object_terms`
filter for $taxonomies
----------------------------+-----------------------------
 Reporter:  postpostmodern  |       Owner:
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  Future Release
Component:  Taxonomy        |     Version:  2.8
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |
----------------------------+-----------------------------

Comment (by postpostmodern):

 Replying to [comment:4 nacin]:
 > We need to figure out:
 >  * If any plugins are using the wp_get_object_terms filter, and what
 they do when they handle $taxonomies.
 >  * When we broke this, or if it was always like this.

 As far as I can tell, this affects two plugins in the plugins directory.

 [http://wordpress.org/plugins/custom-taxonomy-sort/ Custom Taxonomy Sort]
 This plugin has not been updated in over two years.  The method
 {{{get_terms}}} in [http://plugins.trac.wordpress.org/browser/custom-
 taxonomy-sort/trunk/custom-taxonomy-sort.php] uses this as the $taxonomy
 argument and ignores it.

 The other plugin that uses this is [http://wordpress.org/plugins/co-
 authors-plus/ Co-Authors Plus].  The method
 {{{filter_wp_get_object_terms}}} in
 [http://plugins.trac.wordpress.org/browser/co-authors-plus/trunk/co-
 authors-plus.php] uses this data in the way WordPress is currently built,
 directly inserted into a manual sql query.  However, this plugin is
 authored by Core contributors and could easily be updated, and as it is
 only tested to 3.5.2 it is due to be checked for compatibility anyways.

 I would argue that using $taxonomies as an array in this filter is still
 better and more flexible to work with, a use case would be pulling or
 inserting specific taxonomies into this data.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/18828#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list