Allow force_ssl_admin() to properly accept false as a value. Props nbachiyski. fixes #10706
git-svn-id: http://svn.automattic.com/wordpress/trunk@11903 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
02c7c0e38e
commit
9d1f82b406
|
@ -3081,10 +3081,10 @@ function is_ssl() {
|
|||
* @param string|bool $force Optional.
|
||||
* @return bool True if forced, false if not forced.
|
||||
*/
|
||||
function force_ssl_login($force = '') {
|
||||
static $forced;
|
||||
function force_ssl_login( $force = null ) {
|
||||
static $forced = false;
|
||||
|
||||
if ( '' != $force ) {
|
||||
if ( !is_null( $force ) ) {
|
||||
$old_forced = $forced;
|
||||
$forced = $force;
|
||||
return $old_forced;
|
||||
|
@ -3101,10 +3101,10 @@ function force_ssl_login($force = '') {
|
|||
* @param string|bool $force
|
||||
* @return bool True if forced, false if not forced.
|
||||
*/
|
||||
function force_ssl_admin($force = '') {
|
||||
static $forced;
|
||||
function force_ssl_admin( $force = null ) {
|
||||
static $forced = false;
|
||||
|
||||
if ( '' != $force ) {
|
||||
if ( !is_null( $force ) ) {
|
||||
$old_forced = $forced;
|
||||
$forced = $force;
|
||||
return $old_forced;
|
||||
|
|
Loading…
Reference in New Issue