Switch from wp_die() to a nice error message for siteurl!=home for network.php. see #12736

git-svn-id: https://develop.svn.wordpress.org/trunk@13929 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2010-04-02 03:24:18 +00:00
parent 9dab120905
commit 96144d31d9
1 changed files with 6 additions and 3 deletions

View File

@ -67,9 +67,6 @@ function get_clean_basedomain() {
if ( ! network_domain_check() && ( ! defined( 'WP_ALLOW_MULTISITE' ) || ! WP_ALLOW_MULTISITE ) )
wp_die( __( 'You must define the <code>WP_ALLOW_MULTISITE</code> constant as true in your wp-config.php file to allow creation of a Network.' ) );
if ( get_option( 'siteurl' ) != get_option( 'home' ) )
wp_die( __( 'Your <strong>WordPress address</strong> must match your <strong>Site address</strong> before creating a Network.' ) );
$title = __( 'Create a Network of WordPress Sites' );
$parent_file = 'tools.php';
@ -94,6 +91,12 @@ include( './admin-header.php' );
*/
function network_step1( $errors = false ) {
if ( get_option( 'siteurl' ) != get_option( 'home' ) ) {
echo '<div class="error"><p><strong>' . __('Error:') . '</strong> ' . sprintf( __( 'Your <strong>WordPress address</strong> must match your <strong>Site address</strong> before creating a Network. See <a href="%s">General Settings</a>.' ), esc_url( admin_url( 'options-general.php' ) ) ) . '</strong></p></div>';
include ('./admin-footer.php' );
die();
}
$active_plugins = get_option( 'active_plugins' );
if ( ! empty( $active_plugins ) ) {
echo '<div class="updated"><p><strong>' . __('Warning:') . '</strong> ' . sprintf( __( 'Please <a href="%s">deactivate</a> your plugins before enabling the Network feature.' ), admin_url( 'plugins.php' ) ) . '</p></div><p>' . __(' Once the network is created, you may reactivate your plugins.' ) . '</p>';