Make WordPress Core


Ignore:
Timestamp:
09/08/2009 02:46:06 PM (15 years ago)
Author:
ryan
Message:

Allow force_ssl_admin() to properly accept false as a value. Props nbachiyski. fixes #10706

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r11902 r11903  
    30823082 * @return bool True if forced, false if not forced.
    30833083 */
    3084 function force_ssl_login($force = '') {
    3085     static $forced;
    3086 
    3087     if ( '' != $force ) {
     3084function force_ssl_login( $force = null ) {
     3085    static $forced = false;
     3086
     3087    if ( !is_null( $force ) ) {
    30883088        $old_forced = $forced;
    30893089        $forced = $force;
     
    31023102 * @return bool True if forced, false if not forced.
    31033103 */
    3104 function force_ssl_admin($force = '') {
    3105     static $forced;
    3106 
    3107     if ( '' != $force ) {
     3104function force_ssl_admin( $force = null ) {
     3105    static $forced = false;
     3106
     3107    if ( !is_null( $force ) ) {
    31083108        $old_forced = $forced;
    31093109        $forced = $force;
Note: See TracChangeset for help on using the changeset viewer.