wp/wp-includes/default-constants.php
changeset 22 8c2e4d02f4ef
parent 21 48c4eec2b7e6
equal deleted inserted replaced
21:48c4eec2b7e6 22:8c2e4d02f4ef
    54 	}
    54 	}
    55 
    55 
    56 	if ( ! defined( 'WP_MAX_MEMORY_LIMIT' ) ) {
    56 	if ( ! defined( 'WP_MAX_MEMORY_LIMIT' ) ) {
    57 		if ( false === wp_is_ini_value_changeable( 'memory_limit' ) ) {
    57 		if ( false === wp_is_ini_value_changeable( 'memory_limit' ) ) {
    58 			define( 'WP_MAX_MEMORY_LIMIT', $current_limit );
    58 			define( 'WP_MAX_MEMORY_LIMIT', $current_limit );
    59 		} elseif ( -1 === $current_limit_int || $current_limit_int > 268435456 /* = 256M */ ) {
    59 		} elseif ( -1 === $current_limit_int || $current_limit_int > 256 * MB_IN_BYTES ) {
    60 			define( 'WP_MAX_MEMORY_LIMIT', $current_limit );
    60 			define( 'WP_MAX_MEMORY_LIMIT', $current_limit );
       
    61 		} elseif ( wp_convert_hr_to_bytes( WP_MEMORY_LIMIT ) > 256 * MB_IN_BYTES ) {
       
    62 			define( 'WP_MAX_MEMORY_LIMIT', WP_MEMORY_LIMIT );
    61 		} else {
    63 		} else {
    62 			define( 'WP_MAX_MEMORY_LIMIT', '256M' );
    64 			define( 'WP_MAX_MEMORY_LIMIT', '256M' );
    63 		}
    65 		}
    64 	}
    66 	}
    65 
    67 
   430 	 * @since 3.0.0
   432 	 * @since 3.0.0
   431 	 *
   433 	 *
   432 	 * @see WP_Theme::get_core_default_theme()
   434 	 * @see WP_Theme::get_core_default_theme()
   433 	 */
   435 	 */
   434 	if ( ! defined( 'WP_DEFAULT_THEME' ) ) {
   436 	if ( ! defined( 'WP_DEFAULT_THEME' ) ) {
   435 		define( 'WP_DEFAULT_THEME', 'twentytwentyfour' );
   437 		define( 'WP_DEFAULT_THEME', 'twentytwentyfive' );
   436 	}
   438 	}
   437 }
   439 }