mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
More streamlined install process. Obeys WP_SITEURL if defined. fixes #4687 (props JeremyVisser, Nazgul), see #4685
git-svn-id: https://develop.svn.wordpress.org/trunk@5844 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
+9
-5
@@ -142,12 +142,16 @@ include_once(ABSPATH . WPINC . '/gettext.php');
|
||||
require_once (ABSPATH . WPINC . '/l10n.php');
|
||||
|
||||
if ( !is_blog_installed() && (strpos($_SERVER['PHP_SELF'], 'install.php') === false && !defined('WP_INSTALLING')) ) {
|
||||
if (strpos($_SERVER['PHP_SELF'], 'wp-admin') !== false)
|
||||
$link = 'install.php';
|
||||
if ( defined('WP_SITEURL') )
|
||||
$link = WP_SITEURL . '/wp-admin/install.php';
|
||||
elseif (strpos($_SERVER['PHP_SELF'], 'wp-admin') !== false)
|
||||
$link = preg_replace('|/wp-admin/?.*?$|', '/', $_SERVER['PHP_SELF']) . 'wp-admin/install.php';
|
||||
else
|
||||
$link = 'wp-admin/install.php';
|
||||
|
||||
wp_die( sprintf( 'It doesn’t look like you’ve installed WP yet. Try running <a href="%s">install.php</a>.', $link ) );
|
||||
$link = preg_replace('|/[^/]+?$|', '/', $_SERVER['PHP_SELF']) . 'wp-admin/install.php';
|
||||
require_once(ABSPATH . WPINC . '/kses.php');
|
||||
require_once(ABSPATH . WPINC . '/pluggable.php');
|
||||
wp_redirect($link);
|
||||
die(); // have to die here ~ Mark
|
||||
}
|
||||
|
||||
require (ABSPATH . WPINC . '/formatting.php');
|
||||
|
||||
Reference in New Issue
Block a user