[wp-testers] post_class() function now returning IDs instead of
slugs?
Matt Martz
matt at sivel.net
Fri May 22 11:01:48 GMT 2009
On Fri, May 22, 2009 at 6:47 AM, Dean Robinson
<dean.j.robinson at gmail.com> wrote:
> Just installed a copy of 2.8 beta1 locally for some dev work and noticed
> that a bunch of styles in my current theme no longer worked.
>
> A bit of investigation tracked it back to the post_class() function, which
> previously returned something like "category-article" etc (using the
> category slug), but now appears to have been changed to return classes based
> on the ID of the category instead, eg "category-107".
>
> Did a quick search and couldn't find anything around why this might of been
> changed, or if its a bug or not.
>
> Personally I prefer "category-slug" to "category-ID" it seems more logical
> and easier to make use of, but perhaps it was changed for a good reason, can
> anyone shed some light on this?
>
> Looks like this was first changed in revision 11300 (10 days ago)
I believe that change actually happened in 11306
(http://core.trac.wordpress.org/changeset/11306).
The commit message was "Use IDs instead of slugs in CSS classes ro
avoid invalid class names. Props hakre. fixes #8446"
The referenced ticket is http://core.trac.wordpress.org/ticket/8446
--
Matt Martz
matt at sivel.net
http://sivel.net/
More information about the wp-testers
mailing list