Changes between Version 30 and Version 31 of Ticket #57262, comment 3
- Timestamp:
- 12/14/2022 11:15:55 PM (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #57262, comment 3
v30 v31 41 41 42 42 I'm with preference to adding explicit bool cast for the six uses of force_ssl_admin in core, feel free to comment ( without BC) 43 Otherwise, to improve performance, I'd set the default to true and is_null. Although with certificate expiration exceptions (hence short term) the majority is https for modern times. In both cases the manual must clarify if the value is different from the first call a second call is needed to retrieve the expected value. 44 {{{#!php 45 <?php 46 function force_ssl_admin( $force = null ) { 47 static $forced = true; 48 49 if ( is_null( $force ) ) { 50 return $forced; 51 } 52 53 $forced = (bool) $force; 54 return $forced; 55 } 56 ?> 57 }}} 58