[wp-trac] [WordPress Trac] #34936: Reconcile wp-settings-cli.php with wp-settings.php
WordPress Trac
noreply at wordpress.org
Mon Apr 18 00:48:29 UTC 2016
#34936: Reconcile wp-settings-cli.php with wp-settings.php
---------------------------------+------------------
Reporter: danielbachhuber | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 4.6
Component: Bootstrap/Load | Version:
Severity: normal | Resolution:
Keywords: dev-feedback wp-cli | Focuses:
---------------------------------+------------------
Comment (by rmccue):
Replying to [comment:3 danielbachhuber]:
> It could be worth trying the filtering approach. It looks like WordPress
is smart enough not to stomp `$wp_filter` if it's already defined before
`wp-includes/plugin.php`, so WP-CLI could inject its callbacks on the
global.
This is how `test_add_filter` works in the unit testing harness, so it
should be pretty reliable.
----
Generally speaking, I think we should have more hooks more early. Given
that `plugin.php` is almost entirely self-contained (we could split the
file if needed), I'd be in favour of loading it earlier than it currently,
moving it up to the first block of includes (`load.php` and `default-
constants.php`). We could then add an action to `wp_debug_mode` for that,
filter `wp_maintenance`, etc. It would result in a small amount more code
loaded before advanced-cache kicks in (I imagine negligible in any case),
but be super helpful for edge cases and advanced tooling.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34936#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list