Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 85 lines (70 sloc) 3.366 kb
0bc8613 b2config.php replaced with wp-config.sample.php
mikelittle authored
1 <?php
43e4a8a The great renaming.
saxmatt authored
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
a18a23e Work around IIS' lack of REQUEST_URI
saxmatt authored
6 // Fix for IIS, which doesn't set REQUEST_URI
7 $_SERVER['REQUEST_URI'] = ( isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : $_SERVER['SCRIPT_NAME'] . (( isset($_SERVER['QUERY_STRING']) ? '?' . $_SERVER['QUERY_STRING'] : '')));
8
9b09572 Turn down error reporting.
saxmatt authored
9 // Change to E_ALL for development/debugging
10 error_reporting(E_ALL ^ E_NOTICE);
11
2b6ce76 Multiple category upgrade system. Changed version number.
saxmatt authored
12 // Table names
13 $tableposts = $table_prefix . 'posts';
14 $tableusers = $table_prefix . 'users';
15 $tablesettings = $table_prefix . 'settings'; // only used during upgrade
16 $tablecategories = $table_prefix . 'categories';
17 $tablepost2cat = $table_prefix . 'post2cat';
18 $tablecomments = $table_prefix . 'comments';
19 $tablelinks = $table_prefix . 'links';
20 $tablelinkcategories = $table_prefix . 'linkcategories';
21 $tableoptions = $table_prefix . 'options';
22 $tableoptiontypes = $table_prefix . 'optiontypes';
23 $tableoptionvalues = $table_prefix . 'optionvalues';
24 $tableoptiongroups = $table_prefix . 'optiongroups';
25 $tableoptiongroup_options = $table_prefix . 'optiongroup_options';
6df1e26 Added per-post custom metadata support.
emc3 authored
26 $tablepostmeta = $table_prefix . 'postmeta';
edc7d7c Installation cleanup.
saxmatt authored
27 define('WPINC', 'wp-includes');
e9c7715 Using require_once will make it easier to incorporate WP functionalit…
emc3 authored
28 require_once (ABSPATH . WPINC . '/wp-db.php');
edc7d7c Installation cleanup.
saxmatt authored
29
30 $wpdb->hide_errors();
a18a23e Work around IIS' lack of REQUEST_URI
saxmatt authored
31 if (!$wpdb->get_row("SELECT * FROM $tableusers LIMIT 1") && !strstr($_SERVER['REQUEST_URI'], 'install.php')) {
edc7d7c Installation cleanup.
saxmatt authored
32 die("It doesn't look like you've installed WP yet. Try running <a href='wp-admin/install.php'>install.php</a>.");
33 }
34 $wpdb->show_errors();
2b6ce76 Multiple category upgrade system. Changed version number.
saxmatt authored
35
eb29699 Hacks file option and include.
saxmatt authored
36 // This is the name of the include directory. No "/" allowed.
37
e9c7715 Using require_once will make it easier to incorporate WP functionalit…
emc3 authored
38 require_once (ABSPATH . WPINC . '/functions.php');
39 require_once (ABSPATH . 'wp-config-extra.php');
40 require_once (ABSPATH . WPINC . '/template-functions.php');
41 require_once (ABSPATH . WPINC . '/class-xmlrpc.php');
42 require_once (ABSPATH . WPINC . '/class-xmlrpcs.php');
43 require_once (ABSPATH . WPINC . '/links.php');
44 require_once (ABSPATH . WPINC . '/kses.php');
e3e0e62 gettext l10n.
rboren authored
45 require_once (ABSPATH . WPINC . '/wp-l10n.php');
2b6ce76 Multiple category upgrade system. Changed version number.
saxmatt authored
46
0bc8613 b2config.php replaced with wp-config.sample.php
mikelittle authored
47 //setup the old globals from b2config.php
48 //
49 // We should eventually migrate to either calling
50 // get_settings() wherever these are needed OR
51 // accessing a single global $all_settings var
a18a23e Work around IIS' lack of REQUEST_URI
saxmatt authored
52 if (!strstr($_SERVER['REQUEST_URI'], 'install.php') && !strstr($_SERVER['REQUEST_URI'], 'wp-admin/import')) {
0bc8613 b2config.php replaced with wp-config.sample.php
mikelittle authored
53
fcd1a99 Removed 'search_engine_friendly_urls' options.
mikelittle authored
54 $querystring_start = '?';
55 $querystring_equal = '=';
56 $querystring_separator = '&amp;';
57 //}
45fe889 Cookies are now unique, based on siteurl, allowing multiple installs …
emc3 authored
58 // Used to guarantee unique cookies
8927968 Removed global $siteurl and $blogfilename, use get_settings. Syntax f…
saxmatt authored
59 $cookiehash = md5(get_settings('siteurl'));
45fe889 Cookies are now unique, based on siteurl, allowing multiple installs …
emc3 authored
60
a0c45dd Install now does new options tables.
mikelittle authored
61 } //end !$_wp_installing
5c97b54 Smilie fix from Jaykul, changed fool's siteurl fix to use faster preg…
saxmatt authored
62
c26991b Move hack file include.
saxmatt authored
63 require_once (ABSPATH . WPINC . '/vars.php');
edc7d7c Installation cleanup.
saxmatt authored
64
65
c26991b Move hack file include.
saxmatt authored
66 // Check for hacks file if the option is enabled
67 if (get_settings('hack_file')) {
68 if (file_exists(ABSPATH . '/my-hacks.php'))
69 require(ABSPATH . '/my-hacks.php');
70 }
71
e733249 Functional plugin implementation.
saxmatt authored
72 if (!strstr($_SERVER['REQUEST_URI'], 'wp-admin/plugins.php') && get_settings('active_plugins')) {
73 $current_plugins = explode("\n", (get_settings('active_plugins')));
74 foreach ($current_plugins as $plugin) {
75 if (file_exists(ABSPATH . 'wp-content/plugins/' . $plugin))
76 include(ABSPATH . 'wp-content/plugins/' . $plugin);
77 }
78 }
1127059 shutdown action hook.
saxmatt authored
79
80 function shutdown_action_hook() {
81 do_action('shutdown', '');
82 }
83 register_shutdown_function('shutdown_action_hook');
84
85 ?>
Something went wrong with that request. Please try again.