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
This commit is contained in:
parent
b68b0a5f01
commit
d6002995a7
|
@ -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' );
|
||||
|
|
|
@ -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.' ) );
|
||||
|
||||
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 @@ add_contextual_help($current_screen,
|
|||
'<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 @@ if ( $_POST ) {
|
|||
?>
|
||||
</div>
|
||||
|
||||
<?php include( './admin-footer.php' ); ?>
|
||||
<?php include( ABSPATH . 'wp-admin/admin-footer.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) )
|
||||
|
|
|
@ -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' );
|
Loading…
Reference in New Issue