[wp-trac] [WordPress Trac] #14495: Why was is_term() deprecated?

WordPress Trac wp-trac at lists.automattic.com
Sun Aug 1 05:14:33 UTC 2010


#14495: Why was is_term() deprecated?
-------------------------+--------------------------------------------------
 Reporter:  acondiff     |        Owner:         
     Type:  enhancement  |       Status:  closed 
 Priority:  normal       |    Milestone:         
Component:  Taxonomy     |      Version:  3.0.1  
 Severity:  normal       |   Resolution:  invalid
 Keywords:  is_term()    |  
-------------------------+--------------------------------------------------
Changes (by nacin):

  * status:  new => closed
  * resolution:  => invalid
  * milestone:  Awaiting Review =>


Comment:

 is_term() was not a conditional statement. It was a check to see whether a
 term existed. Thus, it was renamed to term_exists().

 The same goes for is_post_type() and is_taxonomy(). They were not
 conditionals, and were renamed post_type_exists() and taxonomy_exists().

 For conditional statements, you'll want `is_singular( $post_type )` and
 `is_tax( $taxonomy, $term = optional )`.

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


More information about the wp-trac mailing list