[wp-trac] [WordPress Trac] #33161: Create a standard for defining and identifying site environment
WordPress Trac
noreply at wordpress.org
Sun Jul 26 15:56:18 UTC 2020
#33161: Create a standard for defining and identifying site environment
--------------------------------------+-----------------------------
Reporter: krogsgard | Owner: SergeyBiryukov
Type: task (blessed) | Status: reopened
Priority: normal | Milestone: 5.5
Component: Options, Meta APIs | Version: 4.2
Severity: normal | Resolution:
Keywords: needs-dev-note has-patch | Focuses:
--------------------------------------+-----------------------------
Changes (by SergeyBiryukov):
* status: closed => reopened
* resolution: fixed =>
Comment:
Since the function runs too early for plugins to hook into the
`wp_environment_types` or `wp_get_environment_type` filters here, and the
result is then cached in a static variable and cannot be changed later, it
seems that the filters are not that useful.
Even having them documented as:
> This filter runs before it can be used by plugins. It is designed for
non-web runtimes.
it still might be confusing. At a glance, I don't recall any other filters
in core that are not designed to be used by plugins in a "normal" way.
Any objections to removing the `wp_environment_types` and
`wp_get_environment_type` filters? The environment variables and the
constants seem enough for now. See [attachment:"33161.2.diff"].
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33161#comment:58>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list