[wp-trac] [WordPress Trac] #23109: Inconsistent returned value

WordPress Trac noreply at wordpress.org
Thu Jan 3 19:28:09 UTC 2013


#23109: Inconsistent returned value
--------------------------+------------------------------
 Reporter:  fp2x          |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Taxonomy      |     Version:  3.5
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+------------------------------

Comment (by ocean90):

 You shouldn't mix up the ''slug'' of the cat and the ''name'' of the
 category.

 `get_cat_ID()` returns the ID from the category name, not the slug. If you
 want the ID from a category slug you have to use `get_category_by_slug()`.

 Also I couldn't reproduce the issue you have described. Even it's the slug
 `get_cat_ID()` returns the correct ID, tested in 3.4 and 3.5.

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


More information about the wp-trac mailing list