[wp-hackers] term_exists() too fuzzy, checks slug first; bug?

Adam Backstrom adam at sixohthree.com
Sun Sep 26 02:34:01 UTC 2010

Starting with 2.6.1, WordPress has first checked the indexed slug field
before the full term name inside term_exists().


Good for speed, but bad for terms that evaluate to the same slug, ie. tags
of "C#" and "C++". Since both have a sanitize_title() slug of "c" they will
both match the same term, assuming one term retained its original default
slug of "c." (In this specific case you could change the slugs to csharp and
cpp, which would work until you add the tag for the "C" language.)

So: bug, or necessary evil? Original discussion in this ticket:


Adam Backstrom
adam at sixohthree.com

More information about the wp-hackers mailing list