[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().

http://core.trac.wordpress.org/changeset/8433

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:

http://core.trac.wordpress.org/ticket/6593

-- 
Adam Backstrom
adam at sixohthree.com


More information about the wp-hackers mailing list