-
+ 19DD70F6AC65B5AD7DFC48A0C2A55FECF8FF4F70217095DB18D034E3335C4D41EA39DFACAD2C7B56FE0333F018DE94A33035A6ECE3FA7E38ED4F653EF6C395E3
mp-wp/wp-settings.php
(0 . 0)(1 . 595)
160562 <?php
160563 /**
160564 * Used to setup and fix common variables and include
160565 * the WordPress procedural and class library.
160566 *
160567 * You should not have to change this file and allows
160568 * for some configuration in wp-config.php.
160569 *
160570 * @package WordPress
160571 */
160572
160573 if ( !defined('WP_MEMORY_LIMIT') )
160574 define('WP_MEMORY_LIMIT', '32M');
160575
160576 if ( function_exists('memory_get_usage') && ( (int) @ini_get('memory_limit') < abs(intval(WP_MEMORY_LIMIT)) ) )
160577 @ini_set('memory_limit', WP_MEMORY_LIMIT);
160578
160579
160580 /**
160581 * Turn register globals off.
160582 *
160583 * @access private
160584 * @since 2.1.0
160585 * @return null Will return null if register_globals PHP directive was disabled
160586 */
160587 function wp_unregister_GLOBALS() {
160588 if ( !ini_get('register_globals') )
160589 return;
160590
160591 if ( isset($_REQUEST['GLOBALS']) )
160592 die('GLOBALS overwrite attempt detected');
160593
160594 // Variables that shouldn't be unset
160595 $noUnset = array('GLOBALS', '_GET', '_POST', '_COOKIE', '_REQUEST', '_SERVER', '_ENV', '_FILES', 'table_prefix');
160596
160597 $input = array_merge($_GET, $_POST, $_COOKIE, $_SERVER, $_ENV, $_FILES, isset($_SESSION) && is_array($_SESSION) ? $_SESSION : array());
160598 foreach ( $input as $k => $v )
160599 if ( !in_array($k, $noUnset) && isset($GLOBALS[$k]) ) {
160600 $GLOBALS[$k] = NULL;
160601 unset($GLOBALS[$k]);
160602 }
160603 }
160604
160605 wp_unregister_GLOBALS();
160606
160607 unset( $wp_filter, $cache_lastcommentmodified, $cache_lastpostdate );
160608
160609 /**
160610 * The $blog_id global, which you can change in the config allows you to create a simple
160611 * multiple blog installation using just one WordPress and changing $blog_id around.
160612 *
160613 * @global int $blog_id
160614 * @since 2.0.0
160615 */
160616 if ( ! isset($blog_id) )
160617 $blog_id = 1;
160618
160619 // Fix for IIS, which doesn't set REQUEST_URI
160620 if ( empty( $_SERVER['REQUEST_URI'] ) ) {
160621
160622 // IIS Mod-Rewrite
160623 if (isset($_SERVER['HTTP_X_ORIGINAL_URL'])) {
160624 $_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_ORIGINAL_URL'];
160625 }
160626 // IIS Isapi_Rewrite
160627 else if (isset($_SERVER['HTTP_X_REWRITE_URL'])) {
160628 $_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_REWRITE_URL'];
160629 }
160630 else
160631 {
160632 // Use ORIG_PATH_INFO if there is no PATH_INFO
160633 if ( !isset($_SERVER['PATH_INFO']) && isset($_SERVER['ORIG_PATH_INFO']) )
160634 $_SERVER['PATH_INFO'] = $_SERVER['ORIG_PATH_INFO'];
160635
160636 // Some IIS + PHP configurations puts the script-name in the path-info (No need to append it twice)
160637 if ( isset($_SERVER['PATH_INFO']) ) {
160638 if ( $_SERVER['PATH_INFO'] == $_SERVER['SCRIPT_NAME'] )
160639 $_SERVER['REQUEST_URI'] = $_SERVER['PATH_INFO'];
160640 else
160641 $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] . $_SERVER['PATH_INFO'];
160642 }
160643
160644 // Append the query string if it exists and isn't null
160645 if (isset($_SERVER['QUERY_STRING']) && !empty($_SERVER['QUERY_STRING'])) {
160646 $_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
160647 }
160648 }
160649 }
160650
160651 // Fix for PHP as CGI hosts that set SCRIPT_FILENAME to something ending in php.cgi for all requests
160652 if ( isset($_SERVER['SCRIPT_FILENAME']) && ( strpos($_SERVER['SCRIPT_FILENAME'], 'php.cgi') == strlen($_SERVER['SCRIPT_FILENAME']) - 7 ) )
160653 $_SERVER['SCRIPT_FILENAME'] = $_SERVER['PATH_TRANSLATED'];
160654
160655 // Fix for Dreamhost and other PHP as CGI hosts
160656 if (strpos($_SERVER['SCRIPT_NAME'], 'php.cgi') !== false)
160657 unset($_SERVER['PATH_INFO']);
160658
160659 // Fix empty PHP_SELF
160660 $PHP_SELF = $_SERVER['PHP_SELF'];
160661 if ( empty($PHP_SELF) )
160662 $_SERVER['PHP_SELF'] = $PHP_SELF = preg_replace("/(\?.*)?$/",'',$_SERVER["REQUEST_URI"]);
160663
160664 if ( version_compare( '4.3', phpversion(), '>' ) ) {
160665 die( sprintf( /*WP_I18N_OLD_PHP*/'Your server is running PHP version %s but WordPress requires at least 4.3.'/*/WP_I18N_OLD_PHP*/, phpversion() ) );
160666 }
160667
160668 if ( !defined('WP_CONTENT_DIR') )
160669 define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' ); // no trailing slash, full paths only - WP_CONTENT_URL is defined further down
160670
160671 if ( file_exists(ABSPATH . '.maintenance') && !defined('WP_INSTALLING') ) {
160672 include(ABSPATH . '.maintenance');
160673 // If the $upgrading timestamp is older than 10 minutes, don't die.
160674 if ( ( time() - $upgrading ) < 600 ) {
160675 if ( file_exists( WP_CONTENT_DIR . '/maintenance.php' ) ) {
160676 require_once( WP_CONTENT_DIR . '/maintenance.php' );
160677 die();
160678 }
160679
160680 $protocol = $_SERVER["SERVER_PROTOCOL"];
160681 if ( 'HTTP/1.1' != $protocol && 'HTTP/1.0' != $protocol )
160682 $protocol = 'HTTP/1.0';
160683 header( "$protocol 503 Service Unavailable", true, 503 );
160684 header( 'Content-Type: text/html; charset=utf-8' );
160685 ?>
160686 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
160687 <html xmlns="http://www.w3.org/1999/xhtml">
160688 <head>
160689 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
160690 <title>Maintenance</title>
160691
160692 </head>
160693 <body>
160694 <h1>Briefly unavailable for scheduled maintenance. Check back in a minute.</h1>
160695 </body>
160696 </html>
160697 <?php
160698 die();
160699 }
160700 }
160701
160702 if ( !extension_loaded('mysql') && !file_exists(WP_CONTENT_DIR . '/db.php') )
160703 die( /*WP_I18N_OLD_MYSQL*/'Your PHP installation appears to be missing the MySQL extension which is required by WordPress.'/*/WP_I18N_OLD_MYSQL*/ );
160704
160705 /**
160706 * PHP 4 standard microtime start capture.
160707 *
160708 * @access private
160709 * @since 0.71
160710 * @global int $timestart Seconds and Microseconds added together from when function is called.
160711 * @return bool Always returns true.
160712 */
160713 function timer_start() {
160714 global $timestart;
160715 $mtime = explode(' ', microtime() );
160716 $mtime = $mtime[1] + $mtime[0];
160717 $timestart = $mtime;
160718 return true;
160719 }
160720
160721 /**
160722 * Return and/or display the time from the page start to when function is called.
160723 *
160724 * You can get the results and print them by doing:
160725 * <code>
160726 * $nTimePageTookToExecute = timer_stop();
160727 * echo $nTimePageTookToExecute;
160728 * </code>
160729 *
160730 * Or instead, you can do:
160731 * <code>
160732 * timer_stop(1);
160733 * </code>
160734 * which will do what the above does. If you need the result, you can assign it to a variable, but
160735 * most cases, you only need to echo it.
160736 *
160737 * @since 0.71
160738 * @global int $timestart Seconds and Microseconds added together from when timer_start() is called
160739 * @global int $timeend Seconds and Microseconds added together from when function is called
160740 *
160741 * @param int $display Use '0' or null to not echo anything and 1 to echo the total time
160742 * @param int $precision The amount of digits from the right of the decimal to display. Default is 3.
160743 * @return float The "second.microsecond" finished time calculation
160744 */
160745 function timer_stop($display = 0, $precision = 3) { //if called like timer_stop(1), will echo $timetotal
160746 global $timestart, $timeend;
160747 $mtime = microtime();
160748 $mtime = explode(' ',$mtime);
160749 $mtime = $mtime[1] + $mtime[0];
160750 $timeend = $mtime;
160751 $timetotal = $timeend-$timestart;
160752 $r = ( function_exists('number_format_i18n') ) ? number_format_i18n($timetotal, $precision) : number_format($timetotal, $precision);
160753 if ( $display )
160754 echo $r;
160755 return $r;
160756 }
160757 timer_start();
160758
160759 // Add define('WP_DEBUG',true); to wp-config.php to enable display of notices during development.
160760 if (defined('WP_DEBUG') and WP_DEBUG == true) {
160761 error_reporting(E_ALL);
160762 } else {
160763 error_reporting(E_ALL ^ E_NOTICE ^ E_USER_NOTICE);
160764 }
160765
160766 // For an advanced caching plugin to use, static because you would only want one
160767 if ( defined('WP_CACHE') )
160768 @include WP_CONTENT_DIR . '/advanced-cache.php';
160769
160770 /**
160771 * Stores the location of the WordPress directory of functions, classes, and core content.
160772 *
160773 * @since 1.0.0
160774 */
160775 define('WPINC', 'wp-includes');
160776
160777 if ( !defined('WP_LANG_DIR') ) {
160778 /**
160779 * Stores the location of the language directory. First looks for language folder in WP_CONTENT_DIR
160780 * and uses that folder if it exists. Or it uses the "languages" folder in WPINC.
160781 *
160782 * @since 2.1.0
160783 */
160784 if ( file_exists(WP_CONTENT_DIR . '/languages') && @is_dir(WP_CONTENT_DIR . '/languages') ) {
160785 define('WP_LANG_DIR', WP_CONTENT_DIR . '/languages'); // no leading slash, no trailing slash, full path, not relative to ABSPATH
160786 if (!defined('LANGDIR')) {
160787 // Old static relative path maintained for limited backwards compatibility - won't work in some cases
160788 define('LANGDIR', 'wp-content/languages');
160789 }
160790 } else {
160791 define('WP_LANG_DIR', ABSPATH . WPINC . '/languages'); // no leading slash, no trailing slash, full path, not relative to ABSPATH
160792 if (!defined('LANGDIR')) {
160793 // Old relative path maintained for backwards compatibility
160794 define('LANGDIR', WPINC . '/languages');
160795 }
160796 }
160797 }
160798
160799 require (ABSPATH . WPINC . '/compat.php');
160800 require (ABSPATH . WPINC . '/functions.php');
160801 require (ABSPATH . WPINC . '/classes.php');
160802
160803 require_wp_db();
160804
160805 if ( !empty($wpdb->error) )
160806 dead_db();
160807
160808 $prefix = $wpdb->set_prefix($table_prefix);
160809
160810 if ( is_wp_error($prefix) )
160811 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*/);
160812
160813 if ( file_exists(WP_CONTENT_DIR . '/object-cache.php') )
160814 require_once (WP_CONTENT_DIR . '/object-cache.php');
160815 else
160816 require_once (ABSPATH . WPINC . '/cache.php');
160817
160818 wp_cache_init();
160819 if ( function_exists('wp_cache_add_global_groups') ) {
160820 wp_cache_add_global_groups(array ('users', 'userlogins', 'usermeta'));
160821 wp_cache_add_non_persistent_groups(array( 'comment', 'counts', 'plugins' ));
160822 }
160823
160824 require (ABSPATH . WPINC . '/plugin.php');
160825 require (ABSPATH . WPINC . '/default-filters.php');
160826 include_once(ABSPATH . WPINC . '/streams.php');
160827 include_once(ABSPATH . WPINC . '/gettext.php');
160828 require_once (ABSPATH . WPINC . '/l10n.php');
160829
160830 if ( !is_blog_installed() && (strpos($_SERVER['PHP_SELF'], 'install.php') === false && !defined('WP_INSTALLING')) ) {
160831 if ( defined('WP_SITEURL') )
160832 $link = WP_SITEURL . '/wp-admin/install.php';
160833 elseif (strpos($_SERVER['PHP_SELF'], 'wp-admin') !== false)
160834 $link = preg_replace('|/wp-admin/?.*?$|', '/', $_SERVER['PHP_SELF']) . 'wp-admin/install.php';
160835 else
160836 $link = preg_replace('|/[^/]+?$|', '/', $_SERVER['PHP_SELF']) . 'wp-admin/install.php';
160837 require_once(ABSPATH . WPINC . '/kses.php');
160838 require_once(ABSPATH . WPINC . '/pluggable.php');
160839 wp_redirect($link);
160840 die(); // have to die here ~ Mark
160841 }
160842
160843 require (ABSPATH . WPINC . '/formatting.php');
160844 require (ABSPATH . WPINC . '/capabilities.php');
160845 require (ABSPATH . WPINC . '/query.php');
160846 require (ABSPATH . WPINC . '/theme.php');
160847 require (ABSPATH . WPINC . '/user.php');
160848 require (ABSPATH . WPINC . '/general-template.php');
160849 require (ABSPATH . WPINC . '/link-template.php');
160850 require (ABSPATH . WPINC . '/author-template.php');
160851 require (ABSPATH . WPINC . '/post.php');
160852 require (ABSPATH . WPINC . '/post-template.php');
160853 require (ABSPATH . WPINC . '/category.php');
160854 require (ABSPATH . WPINC . '/category-template.php');
160855 require (ABSPATH . WPINC . '/comment.php');
160856 require (ABSPATH . WPINC . '/comment-template.php');
160857 require (ABSPATH . WPINC . '/rewrite.php');
160858 require (ABSPATH . WPINC . '/feed.php');
160859 require (ABSPATH . WPINC . '/bookmark.php');
160860 require (ABSPATH . WPINC . '/bookmark-template.php');
160861 require (ABSPATH . WPINC . '/kses.php');
160862 require (ABSPATH . WPINC . '/cron.php');
160863 require (ABSPATH . WPINC . '/version.php');
160864 require (ABSPATH . WPINC . '/deprecated.php');
160865 require (ABSPATH . WPINC . '/script-loader.php');
160866 require (ABSPATH . WPINC . '/taxonomy.php');
160867 require (ABSPATH . WPINC . '/update.php');
160868 require (ABSPATH . WPINC . '/canonical.php');
160869 require (ABSPATH . WPINC . '/shortcodes.php');
160870 require (ABSPATH . WPINC . '/media.php');
160871 require (ABSPATH . WPINC . '/http.php');
160872
160873 if ( !defined('WP_CONTENT_URL') )
160874 define( 'WP_CONTENT_URL', get_option('siteurl') . '/wp-content'); // full url - WP_CONTENT_DIR is defined further up
160875
160876 /**
160877 * Allows for the plugins directory to be moved from the default location.
160878 *
160879 * @since 2.6.0
160880 */
160881 if ( !defined('WP_PLUGIN_DIR') )
160882 define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' ); // full path, no trailing slash
160883
160884 /**
160885 * Allows for the plugins directory to be moved from the default location.
160886 *
160887 * @since 2.6.0
160888 */
160889 if ( !defined('WP_PLUGIN_URL') )
160890 define( 'WP_PLUGIN_URL', WP_CONTENT_URL . '/plugins' ); // full url, no trailing slash
160891
160892 /**
160893 * Allows for the plugins directory to be moved from the default location.
160894 *
160895 * @since 2.1.0
160896 */
160897 if ( !defined('PLUGINDIR') )
160898 define( 'PLUGINDIR', 'wp-content/plugins' ); // Relative to ABSPATH. For back compat.
160899
160900 /**
160901 * Used to guarantee unique hash cookies
160902 * @since 1.5
160903 */
160904 define('COOKIEHASH', md5(get_option('siteurl')));
160905
160906 /**
160907 * Should be exactly the same as the default value of SECRET_KEY in wp-config-sample.php
160908 * @since 2.5.0
160909 */
160910 $wp_default_secret_key = 'put your unique phrase here';
160911
160912 /**
160913 * It is possible to define this in wp-config.php
160914 * @since 2.0.0
160915 */
160916 if ( !defined('USER_COOKIE') )
160917 define('USER_COOKIE', 'wordpressuser_' . COOKIEHASH);
160918
160919 /**
160920 * It is possible to define this in wp-config.php
160921 * @since 2.0.0
160922 */
160923 if ( !defined('PASS_COOKIE') )
160924 define('PASS_COOKIE', 'wordpresspass_' . COOKIEHASH);
160925
160926 /**
160927 * It is possible to define this in wp-config.php
160928 * @since 2.5.0
160929 */
160930 if ( !defined('AUTH_COOKIE') )
160931 define('AUTH_COOKIE', 'wordpress_' . COOKIEHASH);
160932
160933 /**
160934 * It is possible to define this in wp-config.php
160935 * @since 2.6.0
160936 */
160937 if ( !defined('SECURE_AUTH_COOKIE') )
160938 define('SECURE_AUTH_COOKIE', 'wordpress_sec_' . COOKIEHASH);
160939
160940 /**
160941 * It is possible to define this in wp-config.php
160942 * @since 2.6.0
160943 */
160944 if ( !defined('LOGGED_IN_COOKIE') )
160945 define('LOGGED_IN_COOKIE', 'wordpress_logged_in_' . COOKIEHASH);
160946
160947 /**
160948 * It is possible to define this in wp-config.php
160949 * @since 2.3.0
160950 */
160951 if ( !defined('TEST_COOKIE') )
160952 define('TEST_COOKIE', 'wordpress_test_cookie');
160953
160954 /**
160955 * It is possible to define this in wp-config.php
160956 * @since 1.2.0
160957 */
160958 if ( !defined('COOKIEPATH') )
160959 define('COOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_option('home') . '/' ) );
160960
160961 /**
160962 * It is possible to define this in wp-config.php
160963 * @since 1.5.0
160964 */
160965 if ( !defined('SITECOOKIEPATH') )
160966 define('SITECOOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_option('siteurl') . '/' ) );
160967
160968 /**
160969 * It is possible to define this in wp-config.php
160970 * @since 2.6.0
160971 */
160972 if ( !defined('ADMIN_COOKIE_PATH') )
160973 define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH . 'wp-admin' );
160974
160975 /**
160976 * It is possible to define this in wp-config.php
160977 * @since 2.6.0
160978 */
160979 if ( !defined('PLUGINS_COOKIE_PATH') )
160980 define( 'PLUGINS_COOKIE_PATH', preg_replace('|https?://[^/]+|i', '', WP_PLUGIN_URL) );
160981
160982 /**
160983 * It is possible to define this in wp-config.php
160984 * @since 2.0.0
160985 */
160986 if ( !defined('COOKIE_DOMAIN') )
160987 define('COOKIE_DOMAIN', false);
160988
160989 /**
160990 * It is possible to define this in wp-config.php
160991 * @since 2.6.0
160992 */
160993 if ( !defined('FORCE_SSL_ADMIN') )
160994 define('FORCE_SSL_ADMIN', false);
160995 force_ssl_admin(FORCE_SSL_ADMIN);
160996
160997 /**
160998 * It is possible to define this in wp-config.php
160999 * @since 2.6.0
161000 */
161001 if ( !defined('FORCE_SSL_LOGIN') )
161002 define('FORCE_SSL_LOGIN', false);
161003 force_ssl_login(FORCE_SSL_LOGIN);
161004
161005 /**
161006 * It is possible to define this in wp-config.php
161007 * @since 2.5.0
161008 */
161009 if ( !defined( 'AUTOSAVE_INTERVAL' ) )
161010 define( 'AUTOSAVE_INTERVAL', 60 );
161011
161012
161013 require (ABSPATH . WPINC . '/vars.php');
161014
161015 // Check for hacks file if the option is enabled
161016 if (get_option('hack_file')) {
161017 if (file_exists(ABSPATH . 'my-hacks.php'))
161018 require(ABSPATH . 'my-hacks.php');
161019 }
161020
161021 if ( get_option('active_plugins') && !defined('WP_INSTALLING') ) {
161022 $current_plugins = get_option('active_plugins');
161023 if ( is_array($current_plugins) ) {
161024 foreach ($current_plugins as $plugin) {
161025 if ( '' != $plugin && 0 == validate_file($plugin) && file_exists(WP_PLUGIN_DIR . '/' . $plugin) )
161026 include_once(WP_PLUGIN_DIR . '/' . $plugin);
161027 }
161028 }
161029 }
161030
161031 require (ABSPATH . WPINC . '/pluggable.php');
161032
161033 /*
161034 * In most cases the default internal encoding is latin1, which is of no use,
161035 * since we want to use the mb_ functions for utf-8 strings
161036 */
161037 if (function_exists('mb_internal_encoding')) {
161038 if (!@mb_internal_encoding(get_option('blog_charset')))
161039 mb_internal_encoding('UTF-8');
161040 }
161041
161042
161043 if ( defined('WP_CACHE') && function_exists('wp_cache_postload') )
161044 wp_cache_postload();
161045
161046 do_action('plugins_loaded');
161047
161048 $default_constants = array( 'WP_POST_REVISIONS' => true );
161049 foreach ( $default_constants as $c => $v )
161050 @define( $c, $v ); // will fail if the constant is already defined
161051 unset($default_constants, $c, $v);
161052
161053 // If already slashed, strip.
161054 if ( get_magic_quotes_gpc() ) {
161055 $_GET = stripslashes_deep($_GET );
161056 $_POST = stripslashes_deep($_POST );
161057 $_COOKIE = stripslashes_deep($_COOKIE);
161058 }
161059
161060 // Escape with wpdb.
161061 $_GET = add_magic_quotes($_GET );
161062 $_POST = add_magic_quotes($_POST );
161063 $_COOKIE = add_magic_quotes($_COOKIE);
161064 $_SERVER = add_magic_quotes($_SERVER);
161065
161066 do_action('sanitize_comment_cookies');
161067
161068 /**
161069 * WordPress Query object
161070 * @global object $wp_the_query
161071 * @since 2.0.0
161072 */
161073 $wp_the_query = new WP_Query();
161074
161075 /**
161076 * Holds the reference to @see $wp_the_query
161077 * Use this global for WordPress queries
161078 * @global object $wp_query
161079 * @since 1.5.0
161080 */
161081 $wp_query =& $wp_the_query;
161082
161083 /**
161084 * Holds the WordPress Rewrite object for creating pretty URLs
161085 * @global object $wp_rewrite
161086 * @since 1.5.0
161087 */
161088 $wp_rewrite = new WP_Rewrite();
161089
161090 /**
161091 * WordPress Object
161092 * @global object $wp
161093 * @since 2.0.0
161094 */
161095 $wp = new WP();
161096
161097 do_action('setup_theme');
161098
161099 /**
161100 * Web Path to the current active template directory
161101 * @since 1.5.0
161102 */
161103 define('TEMPLATEPATH', get_template_directory());
161104
161105 /**
161106 * Web Path to the current active template stylesheet directory
161107 * @since 2.1.0
161108 */
161109 define('STYLESHEETPATH', get_stylesheet_directory());
161110
161111 // Load the default text localization domain.
161112 load_default_textdomain();
161113
161114 /**
161115 * The locale of the blog
161116 * @since 1.5.0
161117 */
161118 $locale = get_locale();
161119 $locale_file = WP_LANG_DIR . "/$locale.php";
161120 if ( is_readable($locale_file) )
161121 require_once($locale_file);
161122
161123 // Pull in locale data after loading text domain.
161124 require_once(ABSPATH . WPINC . '/locale.php');
161125
161126 /**
161127 * WordPress Locale object for loading locale domain date and various strings.
161128 * @global object $wp_locale
161129 * @since 2.1.0
161130 */
161131 $wp_locale = new WP_Locale();
161132
161133 // Load functions for active theme.
161134 if ( TEMPLATEPATH !== STYLESHEETPATH && file_exists(STYLESHEETPATH . '/functions.php') )
161135 include(STYLESHEETPATH . '/functions.php');
161136 if ( file_exists(TEMPLATEPATH . '/functions.php') )
161137 include(TEMPLATEPATH . '/functions.php');
161138
161139 /**
161140 * Runs just before PHP shuts down execution.
161141 *
161142 * @access private
161143 * @since 1.2.0
161144 */
161145 function shutdown_action_hook() {
161146 do_action('shutdown');
161147 wp_cache_close();
161148 }
161149 register_shutdown_function('shutdown_action_hook');
161150
161151 $wp->init(); // Sets up current user.
161152
161153 // Everything is loaded and initialized.
161154 do_action('init');
161155
161156 ?>