[wp-trac] [WordPress Trac] #62490: doing_action wrong in shutdown
WordPress Trac
noreply at wordpress.org
Wed Nov 20 18:29:47 UTC 2024
#62490: doing_action wrong in shutdown
-------------------------------------------------+-------------------------
Reporter: kkmuffme | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting
| Review
Component: General | Version:
Severity: minor | Resolution:
Keywords: has-patch has-unit-tests reporter- | Focuses:
feedback |
-------------------------------------------------+-------------------------
Comment (by johnbillion):
Replying to [comment:3 kkmuffme]:
> "doing_action" implies that the hook is currently being executed, which
means you could add an action on it.
> But with shutdown this will never happen.
This does work but the reason "foo" doesn't get output in your example is
because `wp_die()` has called `exit` on an earlier priority, therefore
preventing further callbacks from firing. I don't think that has anything
to do with the `shutdown` hook.
These examples are a bit contrived though - what was it you were trying to
do?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62490#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list