[wp-hackers] $cache_categories
Alex King
lists at alexking.org
Wed Jan 4 00:17:07 GMT 2006
Could we make categories an array property of the post object so they
are be easily accessed?
$post->categories
The post queries can pull the categories from the cache into each
$post, then regardless of the cache used, all the theme and plugin
folks need to do is access $post->categories.
Cheers,
--Alex
http://www.alexking.org/
On Jan 3, 2006, at 4:19 PM, Ryan Boren wrote:
> On Tue, 2006-01-03 at 15:11 -0500, Austin Matzko wrote:
>> On 1/3/06, Kaf Oseo <kaf at szub.net> wrote:
>>> I'm pulling category data from
>>> the wp_object_cache object available through $GLOBALS* now:
>>>
>>> $GLOBALS['wp_object_cache']->cache['category'][$cat]
>>
>> Thanks, Kaf. That's exactly what I needed to know.
>
> Please don't do this. If someone is using a replacement cache, this
> won't work. Plus, these are the sort of things that make plugins so
> fragile to core changes. If we need to add API, let's add API instead
> of digging in the guts of WP.
>
> What method was being used in 1.5 that is no longer working? Can you
> not use get_queried_object_id() or get_query_var('cat')?
>
> Ryan
More information about the wp-hackers
mailing list