[wp-trac] [WordPress Trac] #35844: Move is_ssl() to load.php for use in advanced-cache.php
WordPress Trac
noreply at wordpress.org
Tue Feb 16 17:03:12 UTC 2016
#35844: Move is_ssl() to load.php for use in advanced-cache.php
-----------------------------+------------------------------
Reporter: johnjamesjacoby | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Bootstrap/Load | Version: 2.6
Severity: normal | Resolution:
Keywords: 2nd-opinion | Focuses:
-----------------------------+------------------------------
Description changed by johnjamesjacoby:
Old description:
> The `is_ssl()` function is currently in `functions.php` making it
> unavailable to `advanced-cache.php`.
>
> Batcache and other similar plugins end up copying `is_ssl()` verbatim for
> their own use.
>
> I think this is a safe move for a few reasons:
> * Other common `is_` functions are there
> * It's a highly useful utility function that developers should safely
> assume is always available inside of WordPress, no matter how early
> * Traditional plugins and themes cannot load early enough to need to
> manually include it
> * WordPress does not `require_once` the `functions.php` file, meaning
> anyone trying to pre-include it in their own `advanced-cache.php`
> implementation would encounter fatal errors
>
> Patch imminent.
New description:
The `is_ssl()` function is currently in `functions.php` making it
unavailable to `advanced-cache.php`.
Batcache and other similar plugins end up copying `is_ssl()` verbatim for
their own use.
I think this is a safe move because:
* Traditional plugins and themes cannot load early enough to need to
manually include it
* WordPress does not `require_once` the `functions.php` file, meaning
anyone trying to pre-include it in their own `advanced-cache.php`
implementation would encounter fatal errors
I think this is a good move because:
* Other common `is_` functions are there already (`is_multisite()`, et
all)
* It's a highly useful utility function that developers should feel safe
assuming is always available inside of WordPress's runtime, no matter how
early
Patch imminent.
--
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35844#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list