[wp-trac] Re: [WordPress Trac] #4189: Taxonomy Schema and API

WordPress Trac wp-trac at lists.automattic.com
Thu May 17 01:39:43 GMT 2007


#4189: Taxonomy Schema and API
-------------------------------------------+--------------------------------
 Reporter:  ryan                           |        Owner:  anonymous
     Type:  defect                         |       Status:  new      
 Priority:  normal                         |    Milestone:  2.3      
Component:  General                        |      Version:  2.2      
 Severity:  normal                         |   Resolution:           
 Keywords:  term taxonomy tags categories  |  
-------------------------------------------+--------------------------------
Comment (by majelbstoat):

 You might be right about that, though it is possible we could avoid having
 it.  To not get link_categories for a post, don't request link_categories
 in combination with a post object_id (reply 11).  In the end though, it
 might be better to have it in the long term, to avoid ambiguity so we can
 avoid similar issues to "I can't get link cats without post cats" (even if
 it's possible).

 That said, just adding version 2 here, which adds the basis of
 get_object_terms.  It can take an array of objects and taxonomies (or
 singles of each) and does one query to get it all out in one go.  The
 return structure will vary on what combination of object and taxonomy
 counts were passed.  Should be fairly easy to follow - still obviously
 quite fluid at this point - we might want to do more work on cleaning up
 the data before we return it, so we don't return the object_id and
 taxonomy back with it, but it might be quite useful.

 I've also removed the taxonomies table and changed taxonomy back to a
 string everywhere.  There's a couple more function skeletons in there too.
 I've left the tag length at 55 for now, with the extended slug length of
 200.  Parent is left as a single column for now, though still keen to hear
 people's thoughts on using two columns and potentially moving to InnoDB
 for these new tables (as per the thread on the hackers list).

-- 
Ticket URL: <http://trac.wordpress.org/ticket/4189#comment:15>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list