diff --git wp-includes/default-constants.php wp-includes/default-constants.php
index 47b9cd7..2774615 100644
|
|
|
function wp_initial_constants( ) {
|
| 35 | 35 | $blog_id = 1; |
| 36 | 36 | |
| 37 | 37 | // set memory limits. |
| 38 | | if ( function_exists('memory_get_usage') && ( (int) @ini_get('memory_limit') < abs(intval(WP_MEMORY_LIMIT)) ) ) |
| 39 | | @ini_set('memory_limit', WP_MEMORY_LIMIT); |
| | 38 | if ( function_exists( 'memory_get_usage' ) ) { |
| | 39 | $memory_limit = @ini_get( 'memory_limit' ); |
| | 40 | switch( substr( $memory_limit, -1 ) ) { |
| | 41 | case 'M': case 'm': |
| | 42 | $memory_limit = (int) $memory_limit; |
| | 43 | break; |
| | 44 | case 'G': case 'g': |
| | 45 | $memory_limit = (int) $memory_limit * 1024; |
| | 46 | break; |
| | 47 | case 'K': case 'k': |
| | 48 | $memory_limit = (int) $memory_limit / 1024; |
| | 49 | break; |
| | 50 | default: |
| | 51 | $memory_limit = (int) $memory_limit / 1048576; |
| | 52 | } |
| | 53 | |
| | 54 | if ( $memory_limit < abs( intval( WP_MEMORY_LIMIT ) ) ) |
| | 55 | @ini_set( 'memory_limit', WP_MEMORY_LIMIT ); |
| | 56 | } |
| 40 | 57 | |
| 41 | 58 | if ( !defined('WP_CONTENT_DIR') ) |
| 42 | 59 | define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' ); // no trailing slash, full paths only - WP_CONTENT_URL is defined further down |