[wp-trac] [WordPress Trac] #58332: Replace require with require_once in wp-settings.php
WordPress Trac
noreply at wordpress.org
Tue May 16 19:14:11 UTC 2023
#58332: Replace require with require_once in wp-settings.php
----------------------------+-----------------------------
Reporter: beardcat | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Bootstrap/Load | Version: trunk
Severity: normal | Keywords:
Focuses: |
----------------------------+-----------------------------
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!
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58332>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list