[wp-trac] [WordPress Trac] #11312: Add 'handle_404' hook to allow plugins to route URLs
WordPress Trac
wp-trac at lists.automattic.com
Thu Jul 8 13:43:11 UTC 2010
#11312: Add 'handle_404' hook to allow plugins to route URLs
--------------------------------------+-------------------------------------
Reporter: mikeschinkel | Owner: ryan
Type: enhancement | Status: reopened
Priority: normal | Milestone:
Component: Rewrite Rules | Version:
Severity: normal | Resolution:
Keywords: needs-patch dev-feedback |
--------------------------------------+-------------------------------------
Comment(by simonwheatley):
Replying to [comment:14 filosofo]:
> <snip>
> Currently, it's a jumbled mix: `handle_404` both controls state ("let's
see...looks like a 404 situation, so let's toggle `$wp_query`'s 404
property to `true`") and acts on the state by printing headers. Instead,
one method should determine the current state, and another (with a filter
or pass-by-reference action hook at the top) should do the header
printing. Then we could hold off on the headers until much closer to the
time the templates get included and print them all at once.
That would certainly make my use case simpler, and I'm selfish enough to
think that's important. ;) Seems like a `nocache` flag would be needed,
would that be stored on `$wp_query` too?
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11312#comment:15>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list