Changeset 7999 for trunk/wp-settings.php
- Timestamp:
- 05/27/2008 05:55:24 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/wp-settings.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-settings.php
r7998 r7999 101 101 } 102 102 103 if ( !extension_loaded('mysql') && !file_exists(ABSPATH . 'wp-content/db.php') ) 103 if ( !defined('WP_CONTENT_DIR') ) 104 define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' ); // no trailing slash, full paths only - WP_CONTENT_URL is defined further down 105 106 if ( !extension_loaded('mysql') && !file_exists(WP_CONTENT_DIR . '/db.php') ) 104 107 die( 'Your PHP installation appears to be missing the MySQL extension which is required by WordPress.' ); 105 108 … … 167 170 // For an advanced caching plugin to use, static because you would only want one 168 171 if ( defined('WP_CACHE') ) 169 @include ABSPATH . 'wp-content/advanced-cache.php';172 @include WP_CONTENT_DIR . '/advanced-cache.php'; 170 173 171 174 /** … … 176 179 define('WPINC', 'wp-includes'); 177 180 178 if ( !defined(' LANGDIR') ) {181 if ( !defined('WP_LANG_DIR') ) { 179 182 /** 180 * Stores the location of the language directory. First looks for language folder in wp-content183 * Stores the location of the language directory. First looks for language folder in WP_CONTENT_DIR 181 184 * and uses that folder if it exists. Or it uses the "languages" folder in WPINC. 182 185 * 183 186 * @since 2.1.0 184 187 */ 185 if ( file_exists(ABSPATH . 'wp-content/languages') && @is_dir(ABSPATH . 'wp-content/languages') ) 186 define('LANGDIR', 'wp-content/languages'); // no leading slash, no trailing slash 187 else 188 define('LANGDIR', WPINC . '/languages'); // no leading slash, no trailing slash 189 } 190 191 /** 192 * Allows for the plugins directory to be moved from the default location. 193 * 194 * This isn't used everywhere. Constant is not used in plugin_basename() 195 * which might cause conflicts with changing this. 196 * 197 * @since 2.1 198 */ 199 if ( !defined('PLUGINDIR') ) 200 define('PLUGINDIR', 'wp-content/plugins'); // no leading slash, no trailing slash 188 if ( file_exists(WP_CONTENT_DIR . '/languages') && @is_dir(WP_CONTENT_DIR . '/languages') ) { 189 define('WP_LANG_DIR', WP_CONTENT_DIR . '/languages'); // no leading slash, no trailing slash, full path, not relative to ABSPATH 190 if (!defined('LANGDIR')) { 191 // Old static relative path maintained for limited backwards compatibility - won't work in some cases 192 define('LANGDIR', 'wp-content/languages'); 193 } 194 } else { 195 define('WP_LANG_DIR', ABSPATH . WPINC . '/languages'); // no leading slash, no trailing slash, full path, not relative to ABSPATH 196 if (!defined('LANGDIR')) { 197 // Old relative path maintained for backwards compatibility 198 define('LANGDIR', WPINC . '/languages'); 199 } 200 } 201 } 201 202 202 203 require (ABSPATH . WPINC . '/compat.php'); … … 214 215 wp_die('<strong>ERROR</strong>: <code>$table_prefix</code> in <code>wp-config.php</code> can only contain numbers, letters, and underscores.'); 215 216 216 if ( file_exists( ABSPATH . 'wp-content/object-cache.php') )217 require_once ( ABSPATH . 'wp-content/object-cache.php');217 if ( file_exists(WP_CONTENT_DIR . '/object-cache.php') ) 218 require_once (WP_CONTENT_DIR . '/object-cache.php'); 218 219 else 219 220 require_once (ABSPATH . WPINC . '/cache.php'); … … 273 274 require (ABSPATH . WPINC . '/media.php'); 274 275 276 if ( !defined('WP_CONTENT_URL') ) 277 define( 'WP_CONTENT_URL', get_option('home') . '/wp-content'); // full url - WP_CONTENT_DIR is defined further up 278 279 /** 280 * Allows for the plugins directory to be moved from the default location. 281 * 282 * @since 2.6 283 */ 284 if ( !defined('WP_PLUGIN_DIR') ) 285 define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' ); // full path, no trailing slash 286 if ( !defined('WP_PLUGIN_URL') ) 287 define( 'WP_PLUGIN_URL', WP_CONTENT_URL . '/plugins' ); // full url, no trailing slash 288 if ( !defined('PLUGINDIR') ) 289 define( 'PLUGINDIR', 'wp-content/plugins' ); // Relative to ABSPATH. For back compat. 290 275 291 if ( ! defined('WP_INSTALLING') ) { 276 292 // Used to guarantee unique hash cookies … … 365 381 if ( is_array($current_plugins) ) { 366 382 foreach ($current_plugins as $plugin) { 367 if ('' != $plugin && file_exists( ABSPATH . PLUGINDIR . '/' . $plugin))368 include_once( ABSPATH . PLUGINDIR . '/' . $plugin);383 if ('' != $plugin && file_exists(WP_PLUGIN_DIR . '/' . $plugin)) 384 include_once(WP_PLUGIN_DIR . '/' . $plugin); 369 385 } 370 386 } … … 459 475 */ 460 476 $locale = get_locale(); 461 $locale_file = ABSPATH . LANGDIR . "/$locale.php";477 $locale_file = WP_LANG_DIR . "/$locale.php"; 462 478 if ( is_readable($locale_file) ) 463 479 require_once($locale_file);
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)