[wp-trac] [WordPress Trac] #12526: Introduce has_term() to the tax API

WordPress Trac wp-trac at lists.automattic.com
Fri Oct 1 22:08:37 UTC 2010


#12526: Introduce has_term() to the tax API
-------------------------------------+--------------------------------------
 Reporter:  ptahdunbar               |        Owner:          
     Type:  enhancement              |       Status:  reopened
 Priority:  normal                   |    Milestone:  3.1     
Component:  Taxonomy                 |      Version:  3.0     
 Severity:  normal                   |   Resolution:          
 Keywords:  has-patch needs-refresh  |  
-------------------------------------+--------------------------------------
Changes (by hakre):

  * status:  closed => reopened
  * resolution:  fixed =>


Comment:

 Please improve the function argument order, first $taxonomy, then $term.
 Looks more natural to me.

 Example:

 {{{
 function has_term( $term = '', $taxonomy = '', $post = null ) {
 }}}

 to:

 {{{
 function has_term( $taxonomy = '', $term = '', $post = null ) { }
 }}}

 Next to that, those arguments are not optional, in this implementation
 they are. That's probably a mistake.

 I don't see any necessity to introduce optional arguments here. The
 post->id can be generated in the deprecated function.

 I check if I can make a useful patch, reopening so far.

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


More information about the wp-trac mailing list