Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Move the network version of Tools > Network to the network admin. pro…

…ps wpdavis, fixes #15461.

git-svn-id: http://svn.automattic.com/wordpress/trunk@16453 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
commit d6002995a7426afaa9be580da366f0cb54c73487 1 parent b68b0a5
nacin authored
View
2  wp-admin/menu.php
@@ -198,7 +198,7 @@ function _add_themes_utility_last() {
$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' );
View
20 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 <code>WP_ALLOW_MULTISITE</code> 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,
'<p>' . __('This screen allows you to configure a network as having subdomains (<code>site1.example.com</code>) or subdirectories (<code>example.com/site1</code>). Subdomains require wildcard subdomains to be enabled in Apache and DNS records, if your host allows it.') . '</p>' .
@@ -105,10 +110,10 @@ function get_clean_basedomain() {
'<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
);
-include( './admin-header.php' );
+include( ABSPATH . 'wp-admin/admin-header.php' );
?>
<div class="wrap">
-<?php screen_icon(); ?>
+<?php screen_icon('tools'); ?>
<h2><?php echo esc_html( $title ); ?></h2>
<?php
@@ -306,8 +311,9 @@ function network_step2( $errors = false ) {
if ( is_multisite() ) {
$subdomain_install = is_subdomain_install();
?>
- <div class="updated"><p><strong><?php _e( 'Notice: The Network feature is already enabled.' ); ?></strong> <?php _e( 'The original configuration steps are shown here for reference.' ); ?></p></div>
-<?php } else {
+ <p><?php _e( 'The original configuration steps are shown here for reference.' ); ?></p>
+<?php
+ } else {
$subdomain_install = (bool) $wpdb->get_var( "SELECT meta_value FROM $wpdb->sitemeta WHERE site_id = 1 AND meta_key = 'subdomain_install'" );
?>
<div class="error"><p><strong><?php _e('Warning:'); ?></strong> <?php _e( 'An existing WordPress network was detected.' ); ?></p></div>
@@ -527,4 +533,4 @@ function network_step2( $errors = false ) {
?>
</div>
-<?php include( './admin-footer.php' ); ?>
+<?php include( ABSPATH . 'wp-admin/admin-footer.php' ); ?>
View
4 wp-admin/network/menu.php
@@ -37,6 +37,10 @@
$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) )
View
16 wp-admin/network/setup.php
@@ -0,0 +1,16 @@
+<?php
+/**
+ * Network Setup administration panel.
+ *
+ * @package WordPress
+ * @subpackage Multisite
+ * @since 3.1.0
+ */
+
+/** Load WordPress Administration Bootstrap */
+require_once( './admin.php' );
+
+if ( ! is_multisite() )
+ wp_die( __( 'Multisite support is not enabled.' ) );
+
+require( '../network.php' );
Please sign in to comment.
Something went wrong with that request. Please try again.