#35844 closed enhancement (fixed)
Move is_ssl() to load.php for use in advanced-cache.php
Reported by: | johnjamesjacoby | Owned by: | DrewAPicture |
---|---|---|---|
Milestone: | 4.6 | Priority: | normal |
Severity: | normal | Version: | 2.6 |
Component: | Bootstrap/Load | Keywords: | has-patch |
Focuses: | Cc: |
Description (last modified by )
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
thefunctions.php
file, meaning anyone trying to pre-include it in their ownadvanced-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.
Attachments (1)
Change History (15)
#1
@
9 years ago
Link to Batcache's duplicated function here:
https://plugins.trac.wordpress.org/browser/batcache/trunk/advanced-cache.php#L82
This ticket was mentioned in Slack in #core by ocean90. View the logs.
8 years ago
#9
@
8 years ago
- Keywords 2nd-opinion removed
- Owner set to DrewAPicture
- Status changed from new to assigned
Let's add some missing brackets in 35844.1.patch and then it can go in.
#12
@
8 years ago
- Keywords needs-dev-note added
Wouldn't hurt to write up a little dev-note for this, especially if anybody has been audacious enough redefine is_ssl()
in a drop-in without a function_exists()
check.
Note: See
TracTickets for help on using
tickets.
Relocate
is_ssl()
with added@since
note