Make WordPress Core

Changeset 28674


Ignore:
Timestamp:
06/05/2014 02:08:11 PM (10 years ago)
Author:
nacin
Message:

Force SSL admin when siteurl is explicitly configured with HTTPS.

see #27954.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/default-constants.php

    r28609 r28674  
    248248     * @since 2.6.0
    249249     */
    250     if ( !defined( 'FORCE_SSL_ADMIN' ) )
    251         define( 'FORCE_SSL_ADMIN', false );
     250    if ( !defined( 'FORCE_SSL_ADMIN' ) ) {
     251        if ( 'https' === parse_url( get_option( 'siteurl' ), PHP_URL_SCHEME ) ) {
     252            define( 'FORCE_SSL_ADMIN', true );
     253        } else {
     254            define( 'FORCE_SSL_ADMIN', false );
     255        }
     256    }
    252257    force_ssl_admin( FORCE_SSL_ADMIN );
    253258
Note: See TracChangeset for help on using the changeset viewer.