[wp-hackers] New proposed function: in_loop() to determine "in the loop" status

Mark Jaquith mark.wordpress at txfx.net
Sat Jul 16 23:14:42 GMT 2005


Kaf Oseo wrote:

> Do want to highlight this:
>
> Mark Jaquith wrote:
>
>> 3) unset the global $post object.  Normally this is left filled to 
>> the end of the page, and that's bloody useless.  The loop is over, 
>> this transient object needs to leave.
>
>
> I agree with that, but we're going to fins code out there that relies on
> it. For example, the default template displays archive year/month/day in
> the sidebar by using the_time(), when it really should be collecting it
> rom the query vars.

Bah... yeah, we may have to lay off that.  That's okay, it wasn't really 
essential.  But still, we should fix that... the_time() is an 
"in-the-loop" function.

-- 
Mark Jaquith
http://txfx.net/
MCincubus @ #wordpress



More information about the wp-hackers mailing list