[wp-hackers] The great and powerful query hook
fil at fortes.com
Thu Jan 11 03:14:53 GMT 2007
I've dealt with this before -- check line 684 of wp-includes/classes.php --
the sytem is checking for the read_post cap if you're looking at the single
view of a post without post_status of publish or static (a page).
Note that if the user isn't logged in, you're out of luck, the system clears
the posts array if the user isn't logged in. One (hacky) workaround would be
to save your queries in the query hook and use it to requery during the
the_posts filter ...
On 1/10/07, Ryan Boren <ryan at boren.nu> wrote:
> On 1/10/07, Kaf Oseo <kaf at szub.net> wrote:
> > I seem to be missing something.
> > I'm playing around with the new 'query' hook, using a regex to remove
> > the current date/time check that occurs so as to display future-dated
> > posts.
> And it works pretty well (even list_cats is cooperating) except when
> > displaying a post in single query mode. At that point it fails, though
> > I can take the query generated, as is, and call the post manually.
> I'm not sure. Maybe something is tripping up the paging queries?
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers