[wp-testers] post_class() function now returning IDs instead of slugs?

Matt Martz matt at sivel.net
Fri May 22 17:26:32 GMT 2009


On Fri, May 22, 2009 at 1:08 PM, Peter Westwood
<peter.westwood at ftwr.co.uk> wrote:
>
> On 22 May 2009, at 12:15, Dean Robinson wrote:
>
>> thanks Matt,
>>
>> don't particularly like the change, but I can now see why it was changed
>>
>> My issue was:
>>
>> slug for "Category A" in production == slug for "Category A" in
>> development
>> ID for "Category A" in production != ID for "Category A" in development
>>  (in most cases)
>
> Personally, I feel that the IDs are pretty useless there for exactly that
> reason.
>
> I have been meaning to change it back with some suitable sanitisation.

I tend to use get_cat_ID or get_category_by_slug in these cases.  In
case any one is interested in how to make due with ID's instead of
slugs.
-- 
Matt Martz
matt at sivel.net
http://sivel.net/


More information about the wp-testers mailing list