Force SSL admin when siteurl is explicitly configured with HTTPS.

see #27954.

Built from https://develop.svn.wordpress.org/trunk@28674


git-svn-id: http://core.svn.wordpress.org/trunk@28492 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2014-06-05 14:09:18 +00:00
parent 26d0ad5e12
commit f769530af3

View File

@ -247,8 +247,13 @@ function wp_ssl_constants() {
/**
* @since 2.6.0
*/
if ( !defined( 'FORCE_SSL_ADMIN' ) )
define( 'FORCE_SSL_ADMIN', false );
if ( !defined( 'FORCE_SSL_ADMIN' ) ) {
if ( 'https' === parse_url( get_option( 'siteurl' ), PHP_URL_SCHEME ) ) {
define( 'FORCE_SSL_ADMIN', true );
} else {
define( 'FORCE_SSL_ADMIN', false );
}
}
force_ssl_admin( FORCE_SSL_ADMIN );
/**