[wp-trac] [WordPress Trac] #32373: Allow For execution of code before login processing
WordPress Trac
noreply at wordpress.org
Thu May 21 13:46:57 UTC 2015
#32373: Allow For execution of code before login processing
-------------------------+----------------------
Reporter: Another Guy | Owner:
Type: enhancement | Status: closed
Priority: normal | Milestone:
Component: Security | Version: trunk
Severity: normal | Resolution: invalid
Keywords: | Focuses:
-------------------------+----------------------
Changes (by chriscct7):
* keywords: dev-feedback 2nd-opinion close =>
* status: new => closed
* resolution: => invalid
* milestone: Awaiting Review =>
Comment:
Forget about Cloudflare. Forget about why you even want a hook there. It
doesn't matter.
For the purpose of this ticket, what Cloudflare does and does not offer,
and what they do with htaccess files is irrelevant.
Please focus on the actual issue with your proposal which I pointed out in
comment:1 and comment:3.
What are you asking for is simply impossible.
Replying to [comment:5 Another Guy]:
> chriscct7: The point is that the code would be executed before any part
of wordpress is loaded. I put it (as an exmaple) at line 10 in wp-
login.php. That is before the bootstrap is called.
Think about what this means. You want a hook '''before''' WordPress's
bootstrap is loaded.
Before the bootstrap is loaded, WordPress's Actions and Hook APIs are not
available. Which means we can add all the do_actions and add_filter's you
want there, but they cannot be used (in fact they will fatal error because
the function for both of those haven't been defined). In reading your
responses, I'm not convinced you've grasped the problem with your proposal
on this subject, and this is the reason your proposal cannot work.
The only way for you to do what you're seeking to do is exactly what DD32
suggested, because the wp-config file is loaded before the bootstrap and
is not overridden on WordPress updates. That is your one, and your only
option here.
What you've asked for, a hook before the bootstrap, simply cannot be done,
and for that reason closing as suggested as invalid.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32373#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list