From d6002995a7426afaa9be580da366f0cb54c73487 Mon Sep 17 00:00:00 2001 From: nacin Date: Thu, 18 Nov 2010 05:24:13 +0000 Subject: [PATCH] Move the network version of Tools > Network to the network admin. props wpdavis, fixes #15461. git-svn-id: http://svn.automattic.com/wordpress/trunk@16453 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/menu.php | 2 +- wp-admin/network.php | 20 +++++++++++++------- wp-admin/network/menu.php | 4 ++++ wp-admin/network/setup.php | 16 ++++++++++++++++ 4 files changed, 34 insertions(+), 8 deletions(-) create mode 100644 wp-admin/network/setup.php diff --git a/wp-admin/menu.php b/wp-admin/menu.php index 1f33a2a98c..e8af969ad4 100644 --- a/wp-admin/menu.php +++ b/wp-admin/menu.php @@ -198,7 +198,7 @@ $menu[75] = array( __('Tools'), 'edit_posts', 'tools.php', '', 'menu-top menu-ic $submenu['tools.php'][15] = array( __('Export'), 'import', 'export.php' ); if ( is_multisite() && !is_main_site() ) $submenu['tools.php'][25] = array( __('Delete Site'), 'manage_options', 'ms-delete-site.php' ); - if ( ( ! is_multisite() || defined( 'MULTISITE' ) ) && defined('WP_ALLOW_MULTISITE') && WP_ALLOW_MULTISITE && is_super_admin() ) + if ( ! is_multisite() && defined('WP_ALLOW_MULTISITE') && WP_ALLOW_MULTISITE && is_super_admin() ) $submenu['tools.php'][50] = array(__('Network'), 'manage_options', 'network.php'); $menu[80] = array( __('Settings'), 'manage_options', 'options-general.php', '', 'menu-top menu-icon-settings', 'menu-settings', 'div' ); diff --git a/wp-admin/network.php b/wp-admin/network.php index bd0859e1a0..ba163117dc 100644 --- a/wp-admin/network.php +++ b/wp-admin/network.php @@ -89,8 +89,13 @@ function get_clean_basedomain() { if ( ! network_domain_check() && ( ! defined( 'WP_ALLOW_MULTISITE' ) || ! WP_ALLOW_MULTISITE ) ) wp_die( __( 'You must define the WP_ALLOW_MULTISITE constant as true in your wp-config.php file to allow creation of a Network.' ) ); -$title = __( 'Create a Network of WordPress Sites' ); -$parent_file = 'tools.php'; +if ( is_network_admin() ) { + $title = __( 'Network Setup' ); + $parent_file = 'settings.php'; +} else { + $title = __( 'Create a Network of WordPress Sites' ); + $parent_file = 'tools.php'; +} add_contextual_help($current_screen, '

' . __('This screen allows you to configure a network as having subdomains (site1.example.com) or subdirectories (example.com/site1). Subdomains require wildcard subdomains to be enabled in Apache and DNS records, if your host allows it.') . '

' . @@ -105,10 +110,10 @@ add_contextual_help($current_screen, '

' . __('Support Forums') . '

' ); -include( './admin-header.php' ); +include( ABSPATH . 'wp-admin/admin-header.php' ); ?>
- +

-

-

+get_var( "SELECT meta_value FROM $wpdb->sitemeta WHERE site_id = 1 AND meta_key = 'subdomain_install'" ); ?>

@@ -527,4 +533,4 @@ if ( $_POST ) { ?>
- + diff --git a/wp-admin/network/menu.php b/wp-admin/network/menu.php index 8377e5980e..02039f097f 100644 --- a/wp-admin/network/menu.php +++ b/wp-admin/network/menu.php @@ -37,6 +37,10 @@ $submenu['plugins.php'][15] = array( _x('Editor', 'plugin editor'), 'edit_plugin $menu[25] = array(__('Settings'), 'manage_network_options', 'settings.php', '', 'menu-top menu-icon-settings', 'menu-settings', 'div'); +if ( defined( 'MULTISITE' ) && defined( 'WP_ALLOW_MULTISITE' ) && WP_ALLOW_MULTISITE ) { + $submenu['settings.php'][5] = array( __('Settings'), 'manage_network_options', 'settings.php' ); + $submenu['settings.php'][10] = array( __('Network Setup'), 'manage_network_options', 'setup.php' ); +} $update_themes = get_site_transient( 'update_themes' ); if ( !empty($update_themes->response) ) diff --git a/wp-admin/network/setup.php b/wp-admin/network/setup.php new file mode 100644 index 0000000000..e5d5880f9e --- /dev/null +++ b/wp-admin/network/setup.php @@ -0,0 +1,16 @@ +