Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 169 lines (136 sloc) 5.642 kb
0bc86133 »
2003-06-12 b2config.php replaced with wp-config.sample.php
1 <?php
43e4a8a9 »
2003-12-11 The great renaming.
2 $HTTP_HOST = getenv('HTTP_HOST'); /* domain name */
3 $REMOTE_ADDR = getenv('REMOTE_ADDR'); /* visitor's IP */
4 $HTTP_USER_AGENT = getenv('HTTP_USER_AGENT'); /* visitor's browser */
5
a18a23e8 »
2004-02-10 Work around IIS' lack of REQUEST_URI
6 // Fix for IIS, which doesn't set REQUEST_URI
720316dd »
2004-10-26 Do not touch REQUEST_URI if it is already set by the server.
7 if (! isset($_SERVER['REQUEST_URI'])) {
8 $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'];
9
10 // Append the query string if it exists and isn't null
11 if (isset($_SERVER['QUERY_STRING']) && !empty($_SERVER['QUERY_STRING'])) {
12 $_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
13 }
12b40694 »
2004-10-22 Fix REQUEST_URI construction for IIS. Bug 389. Patch from Dennis Will…
14 }
a18a23e8 »
2004-02-10 Work around IIS' lack of REQUEST_URI
15
da4a0d98 »
2004-08-10 Fix for empty plugin strings, class include moved for timing.
16 if ( !(phpversion() >= '4.1') )
17 die( 'Your server is running PHP version ' . phpversion() . ' but WordPress requires at least 4.1' );
18
0d040b30 »
2004-12-14 Sanity check mysql.
19 if ( !extension_loaded('mysql') )
20 die( 'Your PHP installation appears to be missing the MySQL which is required for WordPress.' );
21
551e52ff »
2004-10-04 Code cleanup and some fixes from the WP Japan folks.
22 function timer_start() {
23 global $timestart;
24 $mtime = explode(' ', microtime() );
25 $mtime = $mtime[1] + $mtime[0];
26 $timestart = $mtime;
27 return true;
28 }
29 timer_start();
da4a0d98 »
2004-08-10 Fix for empty plugin strings, class include moved for timing.
30
9b09572d »
2004-01-02 Turn down error reporting.
31 // Change to E_ALL for development/debugging
32 error_reporting(E_ALL ^ E_NOTICE);
33
70a449d8 »
2005-02-15 Allow for plugins to kick in before everything if define in wp-config
34 // For an advanced caching plugin to use, static because you would only want one
35 if ( defined('WP_CACHE') )
36 require (ABSPATH . 'wp-content/advanced-cache.php');
37
edc7d7cd »
2003-12-31 Installation cleanup.
38 define('WPINC', 'wp-includes');
e9c7715b »
2004-01-26 Using require_once will make it easier to incorporate WP functionalit…
39 require_once (ABSPATH . WPINC . '/wp-db.php');
edc7d7cd »
2003-12-31 Installation cleanup.
40
25ae03ee »
2004-05-24 Giant commit, sorry mailing list people. Move all table names to new …
41 // Table names
2520d8e8 »
2005-02-07 Include cleanups
42 $wpdb->posts = $table_prefix . 'posts';
43 $wpdb->users = $table_prefix . 'users';
44 $wpdb->categories = $table_prefix . 'categories';
45 $wpdb->post2cat = $table_prefix . 'post2cat';
46 $wpdb->comments = $table_prefix . 'comments';
47 $wpdb->links = $table_prefix . 'links';
48 $wpdb->linkcategories = $table_prefix . 'linkcategories';
49 $wpdb->options = $table_prefix . 'options';
50 $wpdb->postmeta = $table_prefix . 'postmeta';
0c177530 »
2005-06-12 Beginning of user system overhaul, TODO: update all code that deals w…
51 $wpdb->usermeta = $table_prefix . 'usermeta';
25ae03ee »
2004-05-24 Giant commit, sorry mailing list people. Move all table names to new …
52
233afca1 »
2005-07-08 Drafts clean up.
53 $wpdb->prefix = $table_prefix;
54
2765f58e »
2005-02-02 Allow for custom user table. If rewriting user functions need to incl…
55 if ( defined('CUSTOM_USER_TABLE') )
56 $wpdb->users = CUSTOM_USER_TABLE;
de9cc8b1 »
2005-06-12 More user updates
57 if ( defined('CUSTOM_USER_META_TABLE') )
58 $wpdb->usermeta = CUSTOM_USER_META_TABLE;
2765f58e »
2005-02-02 Allow for custom user table. If rewriting user functions need to incl…
59
8fff6080 »
2004-06-01 Sometimes we need to keep things around.
60 // We're going to need to keep this around for a few months even though we're not using it internally
61
62 $tableposts = $wpdb->posts;
63 $tableusers = $wpdb->users;
64 $tablecategories = $wpdb->categories;
65 $tablepost2cat = $wpdb->post2cat;
66 $tablecomments = $wpdb->comments;
67 $tablelinks = $wpdb->links;
68 $tablelinkcategories = $wpdb->linkcategories;
69 $tableoptions = $wpdb->options;
70 $tablepostmeta = $wpdb->postmeta;
71
9dc65ab2 »
2004-04-27 Cleaning up some includes.
72 require (ABSPATH . WPINC . '/functions.php');
81e7d921 »
2005-02-07 Some filter action and cleanup
73 require (ABSPATH . WPINC . '/default-filters.php');
ba04c52c »
2005-01-27 Cleanup wp-l10n includes.
74 require_once (ABSPATH . WPINC . '/wp-l10n.php');
1bd4057b »
2004-12-19 Bug fixes
75
76 $wpdb->hide_errors();
a6ade4a7 »
2005-07-11 Role/capability system. Round one. Props: Owen Winkler
77 if ( !update_category_cache() && (!strstr($_SERVER['PHP_SELF'], 'install.php') && !defined('WP_INSTALLING')) ) {
ca2815fb »
2005-01-31 If we're already in wp-admin don't recursive link
78 if ( strstr($_SERVER['PHP_SELF'], 'wp-admin') )
79 $link = 'install.php';
80 else
81 $link = 'wp-admin/install.php';
139adf7c »
2005-02-27 gettext install and upgrade. http://mosquito.wordpress.org/view.php?i…
82 die(sprintf(__("It doesn't look like you've installed WP yet. Try running <a href='%s'>install.php</a>."), $link));
ca2815fb »
2005-01-31 If we're already in wp-admin don't recursive link
83 }
1bd4057b »
2004-12-19 Bug fixes
84 $wpdb->show_errors();
85
ba407ff5 »
2004-05-07 E_ALL fixes and cleanups.
86 require (ABSPATH . WPINC . '/functions-formatting.php');
40a8e688 »
2004-10-14 Trackback and pingback cleanups.
87 require (ABSPATH . WPINC . '/functions-post.php');
a6ade4a7 »
2005-07-11 Role/capability system. Round one. Props: Owen Winkler
88 require (ABSPATH . WPINC . '/capabilities.php');
da4a0d98 »
2004-08-10 Fix for empty plugin strings, class include moved for timing.
89 require (ABSPATH . WPINC . '/classes.php');
2520d8e8 »
2005-02-07 Include cleanups
90 require (ABSPATH . WPINC . '/template-functions-general.php');
91 require (ABSPATH . WPINC . '/template-functions-links.php');
92 require (ABSPATH . WPINC . '/template-functions-author.php');
93 require (ABSPATH . WPINC . '/template-functions-post.php');
94 require (ABSPATH . WPINC . '/template-functions-category.php');
95 require (ABSPATH . WPINC . '/comment-functions.php');
96 require (ABSPATH . WPINC . '/feed-functions.php');
9dc65ab2 »
2004-04-27 Cleaning up some includes.
97 require (ABSPATH . WPINC . '/links.php');
98 require (ABSPATH . WPINC . '/kses.php');
2520d8e8 »
2005-02-07 Include cleanups
99 require (ABSPATH . WPINC . '/version.php');
da4a0d98 »
2004-08-10 Fix for empty plugin strings, class include moved for timing.
100
a2342f1a »
2004-08-07 Define COOKIEHASH and new get_profile function. TODO: re-org function…
101 if (!strstr($_SERVER['PHP_SELF'], 'install.php') && !strstr($_SERVER['PHP_SELF'], 'wp-admin/import')) :
102 // Used to guarantee unique hash cookies
587429f3 »
2004-10-10 Move to cookiehash define, use wp_login() function for auth.php.
103 $cookiehash = md5(get_settings('siteurl')); // Remove in 1.4
a2342f1a »
2004-08-07 Define COOKIEHASH and new get_profile function. TODO: re-org function…
104 define('COOKIEHASH', $cookiehash);
105 endif;
5c97b54c »
2003-12-15 Smilie fix from Jaykul, changed fool's siteurl fix to use faster preg…
106
9dc65ab2 »
2004-04-27 Cleaning up some includes.
107 require (ABSPATH . WPINC . '/vars.php');
edc7d7cd »
2003-12-31 Installation cleanup.
108
70a449d8 »
2005-02-15 Allow for plugins to kick in before everything if define in wp-config
109 do_action('core_files_loaded');
110
c26991b1 »
2004-02-07 Move hack file include.
111 // Check for hacks file if the option is enabled
112 if (get_settings('hack_file')) {
113 if (file_exists(ABSPATH . '/my-hacks.php'))
114 require(ABSPATH . '/my-hacks.php');
115 }
116
ee4edd73 »
2004-08-09 Load plugins even on plugin page.
117 if ( get_settings('active_plugins') ) {
a4aa2591 »
2004-08-09 Use array storage for plugins list.
118 $current_plugins = get_settings('active_plugins');
11f5bb3f »
2005-03-31 Add a precautionary is_array() check around the plugin loading loop. h…
119 if ( is_array($current_plugins) ) {
120 foreach ($current_plugins as $plugin) {
121 if ('' != $plugin && file_exists(ABSPATH . 'wp-content/plugins/' . $plugin))
122 include_once(ABSPATH . 'wp-content/plugins/' . $plugin);
123 }
e733249e »
2004-03-25 Functional plugin implementation.
124 }
125 }
1127059a »
2004-04-19 shutdown action hook.
126
08b02d95 »
2005-04-04 Move plugin replacebale functions to pluggable-functions.php. http://…
127 require (ABSPATH . WPINC . '/pluggable-functions.php');
128
70a449d8 »
2005-02-15 Allow for plugins to kick in before everything if define in wp-config
129 if ( defined('WP_CACHE') && function_exists('wp_cache_postload') )
130 wp_cache_postload();
131
132 do_action('plugins_loaded');
133
91efba11 »
2005-07-05 Use wpdb->escape instead of addslashes to prepare DB bound data.
134 // If already slashed, strip.
135 if ( get_magic_quotes_gpc() ) {
6cbb6fec »
2005-07-06 Stripslashes doesn't work on arrays. Add stripslashes_deep(). Props: …
136 $_GET = stripslashes_deep($_GET );
137 $_POST = stripslashes_deep($_POST );
138 $_COOKIE = stripslashes_deep($_COOKIE);
139 $_SERVER = stripslashes_deep($_SERVER);
65bbec71 »
2004-12-16 Comments refactoring and cleanup
140 }
141
91efba11 »
2005-07-05 Use wpdb->escape instead of addslashes to prepare DB bound data.
142 // Escape with wpdb.
143 $_GET = add_magic_quotes($_GET );
144 $_POST = add_magic_quotes($_POST );
145 $_COOKIE = add_magic_quotes($_COOKIE);
146 $_SERVER = add_magic_quotes($_SERVER);
147
1baf503d »
2005-06-10 Break blog header up into functional chunks. Stick it all in a WP cla…
148 $wp_query = new WP_Query();
149 $wp_rewrite = new WP_Rewrite();
150 $wp = new WP();
a6ade4a7 »
2005-07-11 Role/capability system. Round one. Props: Owen Winkler
151 $wp_roles = new WP_Roles();
1baf503d »
2005-06-10 Break blog header up into functional chunks. Stick it all in a WP cla…
152
98aa7f59 »
2005-07-13 Rearrange load order. Init classes before loading the text domain and…
153 define('TEMPLATEPATH', get_template_directory());
154
155 // Load the default text localization domain.
156 load_default_textdomain();
157
158 // Pull in locale data after loading text domain.
159 require_once(ABSPATH . WPINC . '/locale.php');
160
161 function shutdown_action_hook() {
162 do_action('shutdown');
163 }
164 register_shutdown_function('shutdown_action_hook');
165
1baf503d »
2005-06-10 Break blog header up into functional chunks. Stick it all in a WP cla…
166 // Everything is loaded and initialized.
98386088 »
2005-02-01 Allow multiple args to be passed to apply_filters and do_action. Move…
167 do_action('init');
7af36168 »
2005-07-12 Roles update + UI from Owen.
168 ?>
Something went wrong with that request. Please try again.