Advertisements

wp_initial_constants

Definition:
function wp_initial_constants( ) {}

Defines initial WordPress constants

Source code

function wp_initial_constants( ) {

	global $blog_id;



	// set memory limits

	if ( !defined('WP_MEMORY_LIMIT') ) {

		if( is_multisite() ) {

			define('WP_MEMORY_LIMIT', '64M');

		} else {

			define('WP_MEMORY_LIMIT', '32M');

		}

	}



	if ( ! defined( 'WP_MAX_MEMORY_LIMIT' ) ) {

		define( 'WP_MAX_MEMORY_LIMIT', '256M' );

	}



	/**

	 * The $blog_id global, which you can change in the config allows you to create a simple

	 * multiple blog installation using just one WordPress and changing $blog_id around.

	 *

	 * @global int $blog_id

	 * @since 2.0.0

	 */

	if ( ! isset($blog_id) )

		$blog_id = 1;



	// set memory limits.

	if ( function_exists('memory_get_usage') && ( (int) @ini_get('memory_limit') < abs(intval(WP_MEMORY_LIMIT)) ) )

		@ini_set('memory_limit', WP_MEMORY_LIMIT);



	if ( !defined('WP_CONTENT_DIR') )

		define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' ); // no trailing slash, full paths only - WP_CONTENT_URL is defined further down



	// Add define('WP_DEBUG', true); to wp-config.php to enable display of notices during development.

	if ( !defined('WP_DEBUG') )

		define( 'WP_DEBUG', false );



	// Add define('WP_DEBUG_DISPLAY', null); to wp-config.php use the globally configured setting for

	// display_errors and not force errors to be displayed. Use false to force display_errors off.

	if ( !defined('WP_DEBUG_DISPLAY') )

		define( 'WP_DEBUG_DISPLAY', true );



	// Add define('WP_DEBUG_LOG', true); to enable error logging to wp-content/debug.log.

	if ( !defined('WP_DEBUG_LOG') )

		define('WP_DEBUG_LOG', false);



	if ( !defined('WP_CACHE') )

		define('WP_CACHE', false);



	/**

	 * Private

	 */

	if ( !defined('MEDIA_TRASH') )

		define('MEDIA_TRASH', false);



	if ( !defined('SHORTINIT') )

		define('SHORTINIT', false);

}

3781

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: