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

WordPress Trac wp-trac at lists.automattic.com
Wed May 2 23:59:05 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):

 Both of those statements are correct.  object_id is not unique.  However,
 the tuple of object_id and term_taxonomy_id will be unique.  And
 term_taxonomy_id is associated with a tuple of term_id and taxonomy which
 again will be unique.  How you interpret the object_id is down to how you
 query the data.  If you're looking for the categories of post 3, you'd
 choose get_term_relationships(3, 'post-category'), which would return all
 the terms associated with post 3 as a category.  If you're looking for the
 categories of link 3, you'd choose get_term_relationships(3, 'link-
 category'), which would return all the terms associated with link 3 as a
 link-category.  Sure, it is possible to add link-category taxonomy to a
 post, but why would you?  The core certainly won't be doing that.
 Providing sufficient API for adding and querying will help to eliminate
 basic mis-classifying errors, whilst allowing more complex usage for those
 who need it.

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


More information about the wp-trac mailing list