+if ( !defined('WP_LANG_DIR') ) {
+ /**
+ * Stores the location of the language directory. First looks for language folder in WP_CONTENT_DIR
+ * and uses that folder if it exists. Or it uses the "languages" folder in WPINC.
+ *
+ * @since 2.1.0
+ */
+ if ( file_exists(WP_CONTENT_DIR . '/languages') && @is_dir(WP_CONTENT_DIR . '/languages') ) {
+ define('WP_LANG_DIR', WP_CONTENT_DIR . '/languages'); // no leading slash, no trailing slash, full path, not relative to ABSPATH
+ if (!defined('LANGDIR')) {
+ // Old static relative path maintained for limited backwards compatibility - won't work in some cases
+ define('LANGDIR', 'wp-content/languages');
+ }
+ } else {
+ define('WP_LANG_DIR', ABSPATH . WPINC . '/languages'); // no leading slash, no trailing slash, full path, not relative to ABSPATH
+ if (!defined('LANGDIR')) {
+ // Old relative path maintained for backwards compatibility
+ define('LANGDIR', WPINC . '/languages');
+ }
+ }
+}
+
+require (ABSPATH . WPINC . '/compat.php');
+require (ABSPATH . WPINC . '/functions.php');
+require (ABSPATH . WPINC . '/classes.php');
+
+require_wp_db();
+
+if ( !empty($wpdb->error) )
+ dead_db();
+
+$prefix = $wpdb->set_prefix($table_prefix);
+
+if ( is_wp_error($prefix) )
+ wp_die(/*WP_I18N_BAD_PREFIX*/'<strong>ERROR</strong>: <code>$table_prefix</code> in <code>wp-config.php</code> can only contain numbers, letters, and underscores.'/*/WP_I18N_BAD_PREFIX*/);
+
+if ( file_exists(WP_CONTENT_DIR . '/object-cache.php') )
+ require_once (WP_CONTENT_DIR . '/object-cache.php');
+else
+ require_once (ABSPATH . WPINC . '/cache.php');