Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 272 lines (221 sloc) 9.552 kb
0bc86133 » mikelittle
2003-06-12 b2config.php replaced with wp-config.sample.php
1 <?php
d4f95b7f » rob1n
2007-06-12 Accidental commit. Props Nazgul. fixes #4437
2 // Turn register globals off
3 function wp_unregister_GLOBALS() {
4 if ( !ini_get('register_globals') )
5 return;
dce5220c » matt
2005-08-15 Typos and more secure unsetting. Hat tip: Stefen Esser
6
d4f95b7f » rob1n
2007-06-12 Accidental commit. Props Nazgul. fixes #4437
7 if ( isset($_REQUEST['GLOBALS']) )
8 die('GLOBALS overwrite attempt detected');
9
10 // Variables that shouldn't be unset
11 $noUnset = array('GLOBALS', '_GET', '_POST', '_COOKIE', '_REQUEST', '_SERVER', '_ENV', '_FILES', 'table_prefix');
12
13 $input = array_merge($_GET, $_POST, $_COOKIE, $_SERVER, $_ENV, $_FILES, isset($_SESSION) && is_array($_SESSION) ? $_SESSION : array());
14 foreach ( $input as $k => $v )
15 if ( !in_array($k, $noUnset) && isset($GLOBALS[$k]) ) {
9323d394 » ryan
2007-01-11 Zend hash del key or index fix. PRops MarkJaquith.
16 $GLOBALS[$k] = NULL;
d4f95b7f » rob1n
2007-06-12 Accidental commit. Props Nazgul. fixes #4437
17 unset($GLOBALS[$k]);
9323d394 » ryan
2007-01-11 Zend hash del key or index fix. PRops MarkJaquith.
18 }
2919fe29 » matt
2005-08-09 That last thing didn't work at all.
19 }
877e6a71 » matt
2005-08-09 Turn register globals off. Hat tip: Christian Schmidt
20
d4f95b7f » rob1n
2007-06-12 Accidental commit. Props Nazgul. fixes #4437
21 wp_unregister_GLOBALS();
22
dce5220c » matt
2005-08-15 Typos and more secure unsetting. Hat tip: Stefen Esser
23 unset( $wp_filter, $cache_userdata, $cache_lastcommentmodified, $cache_lastpostdate, $cache_settings, $category_cache, $cache_categories );
376ec4dc » matt
2005-08-09 Tweak
24
d4f95b7f » rob1n
2007-06-12 Accidental commit. Props Nazgul. fixes #4437
25 if ( ! isset($blog_id) )
85723b89 » ryan
2005-11-07 Object caching, round one.
26 $blog_id = 1;
27
a18a23e8 » saxmatt
2004-02-10 Work around IIS' lack of REQUEST_URI
28 // Fix for IIS, which doesn't set REQUEST_URI
40a7d9d2 » matt
2005-08-03 Fixes #1488
29 if ( empty( $_SERVER['REQUEST_URI'] ) ) {
30 $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME']; // Does this work under CGI?
dd202ce1 » ryan
2006-02-12 Death to trailing tabs. Props Mark J. fixes #2405
31
720316dd » rboren
2004-10-26 Do not touch REQUEST_URI if it is already set by the server.
32 // Append the query string if it exists and isn't null
33 if (isset($_SERVER['QUERY_STRING']) && !empty($_SERVER['QUERY_STRING'])) {
34 $_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
35 }
12b40694 » rboren
2004-10-22 Fix REQUEST_URI construction for IIS. Bug 389. Patch from Dennis Will…
36 }
a18a23e8 » saxmatt
2004-02-10 Work around IIS' lack of REQUEST_URI
37
c50e7da2 » matt
2005-11-10 Fixes #1591 (again)
38 // Fix for PHP as CGI hosts that set SCRIPT_FILENAME to something ending in php.cgi for all requests
c1ed565c » ryan
2006-01-06 Check if SCRIPT_FILENAME is set to avoid warnings. fixes #2227
39 if ( isset($_SERVER['SCRIPT_FILENAME']) && ( strpos($_SERVER['SCRIPT_FILENAME'], 'php.cgi') == strlen($_SERVER['SCRIPT_FILENAME']) - 7 ) )
c50e7da2 » matt
2005-11-10 Fixes #1591 (again)
40 $_SERVER['SCRIPT_FILENAME'] = $_SERVER['PATH_TRANSLATED'];
41
885ee8f9 » matt
2005-11-14 This should fix permalinks, but may break the PHP as CGI funkiness again
42 // Fix for Dreamhost and other PHP as CGI hosts
3320dd13 » markjaquith
2007-03-07 Use strpos instead of strstr where ever possible, for speed. Props ro…
43 if (strpos($_SERVER['SCRIPT_NAME'], 'php.cgi') !== false)
c50e7da2 » matt
2005-11-10 Fixes #1591 (again)
44 unset($_SERVER['PATH_INFO']);
45
38f4fca0 » ryan
2005-12-29 Move PHP_SELF setup to wp-settings.php. #2153
46 // Fix empty PHP_SELF
47 $PHP_SELF = $_SERVER['PHP_SELF'];
48 if ( empty($PHP_SELF) )
49 $_SERVER['PHP_SELF'] = $PHP_SELF = preg_replace("/(\?.*)?$/",'',$_SERVER["REQUEST_URI"]);
885ee8f9 » matt
2005-11-14 This should fix permalinks, but may break the PHP as CGI funkiness again
50
629dde86 » rob1n
2007-05-25 Actually check for PHP 4.2. Props nbachiyski. fixes #4336
51 if ( version_compare( '4.2', phpversion(), '>' ) ) {
52 die( 'Your server is running PHP version ' . phpversion() . ' but WordPress requires at least 4.2.' );
53 }
da4a0d98 » saxmatt
2004-08-10 Fix for empty plugin strings, class include moved for timing.
54
172bfb80 » ryan
2006-11-19 Don't enforce presence of mysql system if custom DB class is being us…
55 if ( !extension_loaded('mysql') && !file_exists(ABSPATH . 'wp-content/db.php') )
fa1ec4ea » ryan
2006-08-05 Don't wp_die() before functions.php is loaded.
56 die( 'Your PHP installation appears to be missing the MySQL which is required for WordPress.' );
0d040b30 » saxmatt
2004-12-14 Sanity check mysql.
57
551e52ff » saxmatt
2004-10-04 Code cleanup and some fixes from the WP Japan folks.
58 function timer_start() {
59 global $timestart;
60 $mtime = explode(' ', microtime() );
61 $mtime = $mtime[1] + $mtime[0];
62 $timestart = $mtime;
63 return true;
64 }
0f7bb42a » ryan
2006-09-07 timer_stop() wanted to be near timer_start().
65
66 function timer_stop($display = 0, $precision = 3) { //if called like timer_stop(1), will echo $timetotal
67 global $timestart, $timeend;
68 $mtime = microtime();
69 $mtime = explode(' ',$mtime);
70 $mtime = $mtime[1] + $mtime[0];
71 $timeend = $mtime;
72 $timetotal = $timeend-$timestart;
d3f52c3b » rob1n
2007-04-25 Allow number_format to be internationalized. Props nbachiyski. fixes …
73 $r = number_format_i18n($timetotal, $precision);
0f7bb42a » ryan
2006-09-07 timer_stop() wanted to be near timer_start().
74 if ( $display )
a9d23d40 » markjaquith
2006-10-04 allow timer_stop() to use number_format() when returning. Props mdawa…
75 echo $r;
76 return $r;
0f7bb42a » ryan
2006-09-07 timer_stop() wanted to be near timer_start().
77 }
551e52ff » saxmatt
2004-10-04 Code cleanup and some fixes from the WP Japan folks.
78 timer_start();
da4a0d98 » saxmatt
2004-08-10 Fix for empty plugin strings, class include moved for timing.
79
9b09572d » saxmatt
2004-01-02 Turn down error reporting.
80 // Change to E_ALL for development/debugging
81 error_reporting(E_ALL ^ E_NOTICE);
82
70a449d8 » saxmatt
2005-02-15 Allow for plugins to kick in before everything if define in wp-config
83 // For an advanced caching plugin to use, static because you would only want one
84 if ( defined('WP_CACHE') )
a45c3a3f » rob1n
2007-05-19 Don't fail when the user don't set WP-Cache up correctly. Props Denis…
85 @include ABSPATH . 'wp-content/advanced-cache.php';
70a449d8 » saxmatt
2005-02-15 Allow for plugins to kick in before everything if define in wp-config
86
edc7d7cd » saxmatt
2003-12-31 Installation cleanup.
87 define('WPINC', 'wp-includes');
54d7ccba » markjaquith
2006-11-04 make /languages/ directory default to /wp-content/languages/ with fal…
88
89 if ( !defined('LANGDIR') ) {
90 if ( file_exists(ABSPATH . 'wp-content/languages') && @is_dir(ABSPATH . 'wp-content/languages') )
91 define('LANGDIR', 'wp-content/languages'); // no leading slash, no trailing slash
92 else
93 define('LANGDIR', WPINC . '/languages'); // no leading slash, no trailing slash
94 }
95
7a032342 » ryan
2006-09-21 Turn hard-coded paths to defines. Pull gettext includes int wp-settin…
96 if ( !defined('PLUGINDIR') )
97 define('PLUGINDIR', 'wp-content/plugins'); // no leading slash, no trailing slash
c84524f3 » ryan
2006-09-02 db.php instead of wp-db.php for pluggable DB load. #2721
98 if ( file_exists(ABSPATH . 'wp-content/db.php') )
99 require (ABSPATH . 'wp-content/db.php');
c01753af » ryan
2006-09-01 Allow pluggable wp-db. #2721
100 else
101 require_once (ABSPATH . WPINC . '/wp-db.php');
edc7d7cd » saxmatt
2003-12-31 Installation cleanup.
102
71a2674b » markjaquith
2006-12-15 Use $wpdb->prefix when defining table names
103 // $table_prefix is deprecated as of 2.1
104 $wpdb->prefix = $table_prefix;
105
cde68f93 » markjaquith
2007-01-07 Exit gracefully with a warning if the table_prefix uses disallowed ch…
106 if ( preg_match('|[^a-z0-9_]|i', $wpdb->prefix) && !file_exists(ABSPATH . 'wp-content/db.php') )
f717f85c » ryan
2007-01-16 Don't gettext before l10n bits are loaded. Props nbachiyski. fixes #3590
107 die("<strong>ERROR</strong>: <code>$table_prefix</code> in <code>wp-config.php</code> can only contain numbers, letters, and underscores.");
cde68f93 » markjaquith
2007-01-07 Exit gracefully with a warning if the table_prefix uses disallowed ch…
108
25ae03ee » saxmatt
2004-05-24 Giant commit, sorry mailing list people. Move all table names to new …
109 // Table names
71a2674b » markjaquith
2006-12-15 Use $wpdb->prefix when defining table names
110 $wpdb->posts = $wpdb->prefix . 'posts';
111 $wpdb->users = $wpdb->prefix . 'users';
112 $wpdb->categories = $wpdb->prefix . 'categories';
113 $wpdb->post2cat = $wpdb->prefix . 'post2cat';
114 $wpdb->comments = $wpdb->prefix . 'comments';
115 $wpdb->link2cat = $wpdb->prefix . 'link2cat';
116 $wpdb->links = $wpdb->prefix . 'links';
117 $wpdb->options = $wpdb->prefix . 'options';
118 $wpdb->postmeta = $wpdb->prefix . 'postmeta';
119 $wpdb->usermeta = $wpdb->prefix . 'usermeta';
634a33c2 » ryan
2007-05-22 Very rough initial commit of taxonomy for everyone's hacking pleasure…
120 $wpdb->terms = $wpdb->prefix . 'terms';
121 $wpdb->term_taxonomy = $wpdb->prefix . 'term_taxonomy';
122 $wpdb->term_relationships = $wpdb->prefix . 'term_relationships';
233afca1 » matt
2005-07-08 Drafts clean up.
123
2765f58e » saxmatt
2005-02-02 Allow for custom user table. If rewriting user functions need to incl…
124 if ( defined('CUSTOM_USER_TABLE') )
125 $wpdb->users = CUSTOM_USER_TABLE;
de9cc8b1 » matt
2005-06-12 More user updates
126 if ( defined('CUSTOM_USER_META_TABLE') )
127 $wpdb->usermeta = CUSTOM_USER_META_TABLE;
85723b89 » ryan
2005-11-07 Object caching, round one.
128
129 if ( file_exists(ABSPATH . 'wp-content/object-cache.php') )
b3d3d731 » rob1n
2007-04-25 Require once only. Props masquerade. fixes #4192
130 require_once (ABSPATH . 'wp-content/object-cache.php');
85723b89 » ryan
2005-11-07 Object caching, round one.
131 else
b3d3d731 » rob1n
2007-04-25 Require once only. Props masquerade. fixes #4192
132 require_once (ABSPATH . WPINC . '/cache.php');
85723b89 » ryan
2005-11-07 Object caching, round one.
133
134 wp_cache_init();
135
9dc65ab2 » saxmatt
2004-04-27 Cleaning up some includes.
136 require (ABSPATH . WPINC . '/functions.php');
ec1d1f18 » ryan
2007-02-23 Include classes.php earlier so we can make use of WP_Error.
137 require (ABSPATH . WPINC . '/classes.php');
6d7717e1 » ryan
2006-06-20 Move plugin API to plugin.php. #2525
138 require (ABSPATH . WPINC . '/plugin.php');
81e7d921 » saxmatt
2005-02-07 Some filter action and cleanup
139 require (ABSPATH . WPINC . '/default-filters.php');
acc56027 » ryan
2007-01-18 Always load gettext.
140 include_once(ABSPATH . WPINC . '/streams.php');
141 include_once(ABSPATH . WPINC . '/gettext.php');
62927ab6 » ryan
2006-06-15 Remove wp- prefix from wp-l10n.php
142 require_once (ABSPATH . WPINC . '/l10n.php');
1bd4057b » saxmatt
2004-12-19 Bug fixes
143
3320dd13 » markjaquith
2007-03-07 Use strpos instead of strstr where ever possible, for speed. Props ro…
144 if ( !is_blog_installed() && (strpos($_SERVER['PHP_SELF'], 'install.php') === false && !defined('WP_INSTALLING')) ) {
145 if (strpos($_SERVER['PHP_SELF'], 'wp-admin') !== false)
ca2815fb » saxmatt
2005-01-31 If we're already in wp-admin don't recursive link
146 $link = 'install.php';
147 else
148 $link = 'wp-admin/install.php';
990ca286 » rob1n
2007-05-31 Localize the "you haven't installed WP yet" message. fixes #4370
149
71a095d0 » rob1n
2007-05-31 Don't translate "you haven't installed" text yet, because text domain…
150 wp_die( sprintf( 'It doesn&#8217;t look like you&#8217;ve installed WP yet. Try running <a href="%s">install.php</a>.', $link ) );
ca2815fb » saxmatt
2005-01-31 If we're already in wp-admin don't recursive link
151 }
1bd4057b » saxmatt
2004-12-19 Bug fixes
152
c93efa86 » ryan
2006-06-11 Include file renames. #2525
153 require (ABSPATH . WPINC . '/formatting.php');
a6ade4a7 » ryan
2005-07-11 Role/capability system. Round one. Props: Owen Winkler
154 require (ABSPATH . WPINC . '/capabilities.php');
9303053d » ryan
2006-03-13 Move WP_Query and its wrapper functions to query.php. #2525
155 require (ABSPATH . WPINC . '/query.php');
40b2e610 » ryan
2006-04-18 Move theme functions to theme.php. #2525
156 require (ABSPATH . WPINC . '/theme.php');
c56e62f5 » ryan
2006-06-08 Move user functions to user.php. Relocate more post functions to post…
157 require (ABSPATH . WPINC . '/user.php');
c93efa86 » ryan
2006-06-11 Include file renames. #2525
158 require (ABSPATH . WPINC . '/general-template.php');
159 require (ABSPATH . WPINC . '/link-template.php');
c56e62f5 » ryan
2006-06-08 Move user functions to user.php. Relocate more post functions to post…
160 require (ABSPATH . WPINC . '/author-template.php');
3c8ed766 » ryan
2006-06-07 Reworg post/page/attachment functions. #2525
161 require (ABSPATH . WPINC . '/post.php');
162 require (ABSPATH . WPINC . '/post-template.php');
0f5dc0f0 » ryan
2006-06-04 Reorg category functions. #2525
163 require (ABSPATH . WPINC . '/category.php');
164 require (ABSPATH . WPINC . '/category-template.php');
6027cfa9 » ryan
2006-04-19 Reorg comment functions. #2525
165 require (ABSPATH . WPINC . '/comment.php');
166 require (ABSPATH . WPINC . '/comment-template.php');
6970a75e » ryan
2006-03-12 Rewrite API additions and improvements from David House. #2433
167 require (ABSPATH . WPINC . '/rewrite.php');
c93efa86 » ryan
2006-06-11 Include file renames. #2525
168 require (ABSPATH . WPINC . '/feed.php');
19ea5fb7 » ryan
2006-06-05 Reorg bookmark functions. #2525
169 require (ABSPATH . WPINC . '/bookmark.php');
170 require (ABSPATH . WPINC . '/bookmark-template.php');
9dc65ab2 » saxmatt
2004-04-27 Cleaning up some includes.
171 require (ABSPATH . WPINC . '/kses.php');
fb1e5310 » ryan
2006-03-07 Cron improvements from masquerade. #2425
172 require (ABSPATH . WPINC . '/cron.php');
2520d8e8 » saxmatt
2005-02-07 Include cleanups
173 require (ABSPATH . WPINC . '/version.php');
ca92bb43 » ryan
2006-03-02 Move deprecated functions to deprecated.php. #2520
174 require (ABSPATH . WPINC . '/deprecated.php');
4d49e98f » ryan
2006-05-22 Script loader from mdawaffe. #2701
175 require (ABSPATH . WPINC . '/script-loader.php');
634a33c2 » ryan
2007-05-22 Very rough initial commit of taxonomy for everyone's hacking pleasure…
176 require (ABSPATH . WPINC . '/taxonomy.php');
da4a0d98 » saxmatt
2004-08-10 Fix for empty plugin strings, class include moved for timing.
177
3320dd13 » markjaquith
2007-03-07 Use strpos instead of strstr where ever possible, for speed. Props ro…
178 if (strpos($_SERVER['PHP_SELF'], 'install.php') === false) {
a2342f1a » saxmatt
2004-08-07 Define COOKIEHASH and new get_profile function. TODO: re-org function…
179 // Used to guarantee unique hash cookies
911d3a14 » ryan
2006-11-08 Remove comment. fixes #3210
180 $cookiehash = md5(get_option('siteurl'));
a2342f1a » saxmatt
2004-08-07 Define COOKIEHASH and new get_profile function. TODO: re-org function…
181 define('COOKIEHASH', $cookiehash);
3320dd13 » markjaquith
2007-03-07 Use strpos instead of strstr where ever possible, for speed. Props ro…
182 }
5c97b54c » saxmatt
2003-12-15 Smilie fix from Jaykul, changed fool's siteurl fix to use faster preg…
183
41afea2f » matt
2005-07-18 Let advanced users override cookies.
184 if ( !defined('USER_COOKIE') )
185 define('USER_COOKIE', 'wordpressuser_'. COOKIEHASH);
186 if ( !defined('PASS_COOKIE') )
187 define('PASS_COOKIE', 'wordpresspass_'. COOKIEHASH);
188 if ( !defined('COOKIEPATH') )
849a0d29 » ryan
2006-08-30 Use get_option instead of get_settings. Just 'cause.
189 define('COOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_option('home') . '/' ) );
41afea2f » matt
2005-07-18 Let advanced users override cookies.
190 if ( !defined('SITECOOKIEPATH') )
849a0d29 » ryan
2006-08-30 Use get_option instead of get_settings. Just 'cause.
191 define('SITECOOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_option('siteurl') . '/' ) );
41afea2f » matt
2005-07-18 Let advanced users override cookies.
192 if ( !defined('COOKIE_DOMAIN') )
193 define('COOKIE_DOMAIN', false);
194
9dc65ab2 » saxmatt
2004-04-27 Cleaning up some includes.
195 require (ABSPATH . WPINC . '/vars.php');
edc7d7cd » saxmatt
2003-12-31 Installation cleanup.
196
c26991b1 » saxmatt
2004-02-07 Move hack file include.
197 // Check for hacks file if the option is enabled
849a0d29 » ryan
2006-08-30 Use get_option instead of get_settings. Just 'cause.
198 if (get_option('hack_file')) {
c26991b1 » saxmatt
2004-02-07 Move hack file include.
199 if (file_exists(ABSPATH . '/my-hacks.php'))
200 require(ABSPATH . '/my-hacks.php');
201 }
202
849a0d29 » ryan
2006-08-30 Use get_option instead of get_settings. Just 'cause.
203 if ( get_option('active_plugins') ) {
204 $current_plugins = get_option('active_plugins');
11f5bb3f » ryan
2005-03-31 Add a precautionary is_array() check around the plugin loading loop. h…
205 if ( is_array($current_plugins) ) {
206 foreach ($current_plugins as $plugin) {
83112722 » ryan
2007-03-06 Use PLUGINDIR. Props z720 and Nazgul. fixes #3909
207 if ('' != $plugin && file_exists(ABSPATH . PLUGINDIR . '/' . $plugin))
208 include_once(ABSPATH . PLUGINDIR . '/' . $plugin);
11f5bb3f » ryan
2005-03-31 Add a precautionary is_array() check around the plugin loading loop. h…
209 }
e733249e » saxmatt
2004-03-25 Functional plugin implementation.
210 }
211 }
1127059a » saxmatt
2004-04-19 shutdown action hook.
212
c93efa86 » ryan
2006-06-11 Include file renames. #2525
213 require (ABSPATH . WPINC . '/pluggable.php');
08b02d95 » ryan
2005-04-04 Move plugin replacebale functions to pluggable-functions.php. http://…
214
70a449d8 » saxmatt
2005-02-15 Allow for plugins to kick in before everything if define in wp-config
215 if ( defined('WP_CACHE') && function_exists('wp_cache_postload') )
216 wp_cache_postload();
217
218 do_action('plugins_loaded');
219
91efba11 » ryan
2005-07-05 Use wpdb->escape instead of addslashes to prepare DB bound data.
220 // If already slashed, strip.
221 if ( get_magic_quotes_gpc() ) {
6cbb6fec » ryan
2005-07-06 Stripslashes doesn't work on arrays. Add stripslashes_deep(). Props: …
222 $_GET = stripslashes_deep($_GET );
223 $_POST = stripslashes_deep($_POST );
224 $_COOKIE = stripslashes_deep($_COOKIE);
65bbec71 » saxmatt
2004-12-16 Comments refactoring and cleanup
225 }
226
91efba11 » ryan
2005-07-05 Use wpdb->escape instead of addslashes to prepare DB bound data.
227 // Escape with wpdb.
228 $_GET = add_magic_quotes($_GET );
229 $_POST = add_magic_quotes($_POST );
230 $_COOKIE = add_magic_quotes($_COOKIE);
231 $_SERVER = add_magic_quotes($_SERVER);
232
1034767a » ryan
2006-06-22 wp_get_current_commenter()
233 do_action('sanitize_comment_cookies');
234
22bee1c9 » ryan
2006-11-09 Preserve the original query object as wp_the_query so that it's not s…
235 $wp_the_query =& new WP_Query();
236 $wp_query =& $wp_the_query;
237 $wp_rewrite =& new WP_Rewrite();
238 $wp =& new WP();
1baf503d » ryan
2005-06-10 Break blog header up into functional chunks. Stick it all in a WP cla…
239
978fc182 » ryan
2006-07-11 Tweak theme validation.
240 validate_current_theme();
98aa7f59 » ryan
2005-07-13 Rearrange load order. Init classes before loading the text domain and…
241 define('TEMPLATEPATH', get_template_directory());
b55b6aa2 » ryan
2006-08-30 Allow stylesheet only themes to provide functions.php. Props skeltoac…
242 define('STYLESHEETPATH', get_stylesheet_directory());
98aa7f59 » ryan
2005-07-13 Rearrange load order. Init classes before loading the text domain and…
243
244 // Load the default text localization domain.
245 load_default_textdomain();
246
3e264693 » ryan
2007-01-08 Load locale specific php code in global context. fixes #3488
247 $locale = get_locale();
248 $locale_file = ABSPATH . LANGDIR . "/$locale.php";
249 if ( is_readable($locale_file) )
250 require_once($locale_file);
251
98aa7f59 » ryan
2005-07-13 Rearrange load order. Init classes before loading the text domain and…
252 // Pull in locale data after loading text domain.
253 require_once(ABSPATH . WPINC . '/locale.php');
254
92421de7 » ryan
2006-11-19 Ref more singletons.
255 $wp_locale =& new WP_Locale();
3d2347a6 » ryan
2006-04-02 WP_Locale. Props Sewar. fixes #2568
256
c369310b » ryan
2005-08-29 Better support for theme plugins. add_theme_page() and active theme f…
257 // Load functions for active theme.
b55b6aa2 » ryan
2006-08-30 Allow stylesheet only themes to provide functions.php. Props skeltoac…
258 if ( TEMPLATEPATH !== STYLESHEETPATH && file_exists(STYLESHEETPATH . '/functions.php') )
259 include(STYLESHEETPATH . '/functions.php');
260 if ( file_exists(TEMPLATEPATH . '/functions.php') )
261 include(TEMPLATEPATH . '/functions.php');
c369310b » ryan
2005-08-29 Better support for theme plugins. add_theme_page() and active theme f…
262
98aa7f59 » ryan
2005-07-13 Rearrange load order. Init classes before loading the text domain and…
263 function shutdown_action_hook() {
264 do_action('shutdown');
84da5fc9 » ryan
2006-01-06 Save cache after the shutdown hook runs. fixes #2232
265 wp_cache_close();
98aa7f59 » ryan
2005-07-13 Rearrange load order. Init classes before loading the text domain and…
266 }
267 register_shutdown_function('shutdown_action_hook');
268
1baf503d » ryan
2005-06-10 Break blog header up into functional chunks. Stick it all in a WP cla…
269 // Everything is loaded and initialized.
98386088 » rboren
2005-02-01 Allow multiple args to be passed to apply_filters and do_action. Move…
270 do_action('init');
06a0fc3a » matt
2005-11-11 Formatting
271
629dde86 » rob1n
2007-05-25 Actually check for PHP 4.2. Props nbachiyski. fixes #4336
272 ?>
Something went wrong with that request. Please try again.