[wp-trac] [WordPress Trac] #10663: Category name handling wrong function is_category

WordPress Trac wp-trac at lists.automattic.com
Sat Nov 28 20:59:59 UTC 2009


#10663: Category name handling wrong function is_category
----------------------------+-----------------------------------------------
 Reporter:  Azaroth         |        Type:  defect (bug)
   Status:  new             |    Priority:  normal      
Milestone:  Future Release  |   Component:  Template    
  Version:  2.8.4           |    Severity:  normal      
 Keywords:  dev-feedback    |  
----------------------------+-----------------------------------------------

Comment(by azaozz):

 Perhaps the fix would be to do a strict comparison
 {{{
 in_array( $cat_obj->term_id, $category, true )
 }}}
 although checking for category ID and using a string would then fail:
 `is_category(3)` will work, `is_category('3')` will not.

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


More information about the wp-trac mailing list