wp/wp-includes/default-constants.php
changeset 5 5e2f62d02dcd
parent 0 d970ebf37754
child 7 cf61fcea0001
equal deleted inserted replaced
4:346c88efed21 5:5e2f62d02dcd
   152 }
   152 }
   153 
   153 
   154 /**
   154 /**
   155  * Defines cookie related WordPress constants
   155  * Defines cookie related WordPress constants
   156  *
   156  *
   157  * Defines constants after multisite is loaded. Cookie-related constants may be overridden in ms_network_cookies().
   157  * Defines constants after multisite is loaded.
   158  * @since 3.0.0
   158  * @since 3.0.0
   159  */
   159  */
   160 function wp_cookie_constants() {
   160 function wp_cookie_constants() {
   161 	/**
   161 	/**
   162 	 * Used to guarantee unique hash cookies
   162 	 * Used to guarantee unique hash cookies
   163 	 * @since 1.5
   163 	 *
       
   164 	 * @since 1.5.0
   164 	 */
   165 	 */
   165 	if ( !defined( 'COOKIEHASH' ) ) {
   166 	if ( !defined( 'COOKIEHASH' ) ) {
   166 		$siteurl = get_site_option( 'siteurl' );
   167 		$siteurl = get_site_option( 'siteurl' );
   167 		if ( $siteurl )
   168 		if ( $siteurl )
   168 			define( 'COOKIEHASH', md5( $siteurl ) );
   169 			define( 'COOKIEHASH', md5( $siteurl ) );
   244  */
   245  */
   245 function wp_ssl_constants() {
   246 function wp_ssl_constants() {
   246 	/**
   247 	/**
   247 	 * @since 2.6.0
   248 	 * @since 2.6.0
   248 	 */
   249 	 */
   249 	if ( !defined('FORCE_SSL_ADMIN') )
   250 	if ( !defined( 'FORCE_SSL_ADMIN' ) ) {
   250 		define('FORCE_SSL_ADMIN', false);
   251 		if ( 'https' === parse_url( get_option( 'siteurl' ), PHP_URL_SCHEME ) ) {
   251 	force_ssl_admin(FORCE_SSL_ADMIN);
   252 			define( 'FORCE_SSL_ADMIN', true );
   252 
   253 		} else {
   253 	/**
   254 			define( 'FORCE_SSL_ADMIN', false );
   254 	 * @since 2.6.0
   255 		}
   255 	 */
   256 	}
   256 	if ( !defined('FORCE_SSL_LOGIN') )
   257 	force_ssl_admin( FORCE_SSL_ADMIN );
   257 		define('FORCE_SSL_LOGIN', false);
   258 
   258 	force_ssl_login(FORCE_SSL_LOGIN);
   259 	/**
       
   260 	 * @since 2.6.0
       
   261 	 * @deprecated 4.0.0
       
   262 	 */
       
   263 	if ( defined( 'FORCE_SSL_LOGIN' ) && FORCE_SSL_LOGIN ) {
       
   264 		force_ssl_admin( true );
       
   265 	}
   259 }
   266 }
   260 
   267 
   261 /**
   268 /**
   262  * Defines functionality related WordPress constants
   269  * Defines functionality related WordPress constants
   263  *
   270  *
   309 	 * Used as the default theme when installing new sites.
   316 	 * Used as the default theme when installing new sites.
   310 	 * Will be used as the fallback if the current theme doesn't exist.
   317 	 * Will be used as the fallback if the current theme doesn't exist.
   311 	 * @since 3.0.0
   318 	 * @since 3.0.0
   312 	 */
   319 	 */
   313 	if ( !defined('WP_DEFAULT_THEME') )
   320 	if ( !defined('WP_DEFAULT_THEME') )
   314 		define( 'WP_DEFAULT_THEME', 'twentythirteen' );
   321 		define( 'WP_DEFAULT_THEME', 'twentyfifteen' );
   315 
   322 
   316 }
   323 }