[wp-trac] [WordPress Trac] #33161: Create a standard for defining and identifying site environment
WordPress Trac
noreply at wordpress.org
Fri May 15 15:12:35 UTC 2020
#33161: Create a standard for defining and identifying site environment
--------------------------------+-----------------------------
Reporter: krogsgard | Owner: SergeyBiryukov
Type: enhancement | Status: accepted
Priority: normal | Milestone: 5.5
Component: Options, Meta APIs | Version: 4.2
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
--------------------------------+-----------------------------
Comment (by tabrisrp):
We have this need too in WP Rocket since recently.
A use case is for example our RocketCDN service integration. Users are
able to subscribe to the service from the plugin itself, but we don't want
them to do that when it's a local or staging site.
Right now we have our own function to check for that [https://github.com
/wp-media/wp-
rocket/blob/c7a020448d6639ca3cb4cddf72195f9d9c18fbec/inc/functions/api.php#L85]
but a core solution would make it unnecessary, as we could rely on the
hosts/local solutions to provide that information to WP for the most part
instead.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33161#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list