#58332 closed enhancement (wontfix)
Replace require with require_once in wp-settings.php
Reported by: | beardcat | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 6.3 |
Component: | Bootstrap/Load | Keywords: | has-patch |
Focuses: | Cc: |
Description
It would be nice for users/plugin-devs to be able to load certain core files before the core actually bootstraps them.
This may sound a bit weird but hear me out: In the case of the plugin https://github.com/stayallive/wp-sentry its about a error tracking plugin which registers a custom exception handler via set_exception_handler
This plugin needs to be loaded/bootstraped as early as possible to register that exception handler to send possible exceptions in the wordpress bootstrapping process to wherever it is needed.
To make this possible nothing to major has to happen in the wordpress core. Its just about the difference between require
and require_once
.
I'll provide a PR which replaces all the require
with require_once
in the wp-settings.php
Looking forward to your feedback!
Attachments (1)
Change History (5)
This ticket was mentioned in PR #4462 on WordPress/wordpress-develop by LordSimal.
21 months ago
#1
- Keywords has-patch added
#2
@
21 months ago
Hi there, welcome to WordPress Trac! Thanks for the ticket.
Just noting that this was previously discussed in #19921 and #20298.
This comment specifically explains why it has not been implemented: comment:4:ticket:20298.
On a related note, making it possible for plugins to override core files was also a concern when discussing an autoloader implementation, for example in comment:117:ticket:36335.
#3
@
21 months ago
- Resolution set to wontfix
- Status changed from new to closed
Thanks @SergeyBiryukov for the quick reply!
I expected this was probably already discussed but couldn't find any related tickets myself.
Anyways I will close this ticket as this clearly won't change from WordPress and we will find another solution on our side.
Trac ticket: https://core.trac.wordpress.org/ticket/58332#ticket