Make WordPress Core

Ticket #60792: multisite_flag.patch

File multisite_flag.patch, 2.5 KB (added by bennimack, 2 years ago)

patch file

  • src/wp-admin/menu.php

    diff --git a/src/wp-admin/menu.php b/src/wp-admin/menu.php
    index a756fa40f3..1602150cac 100644
    a b $menu[75] = array( __( 'Tools' ), 'edit_posts', 'tools.php', 
    380380if ( is_multisite() && ! is_main_site() ) {
    381381        $submenu['tools.php'][35] = array( __( 'Delete Site' ), 'delete_site', 'ms-delete-site.php' );
    382382}
    383 if ( ! is_multisite() && defined( 'WP_ALLOW_MULTISITE' ) && WP_ALLOW_MULTISITE ) {
     383if ( ! is_multisite() ) {
    384384        $submenu['tools.php'][50] = array( __( 'Network Setup' ), 'setup_network', 'network.php' );
    385385}
    386386
  • src/wp-admin/network.php

    diff --git a/src/wp-admin/network.php b/src/wp-admin/network.php
    index 99638dabc3..d9f44bf48a 100644
    a b if ( is_multisite() ) { 
    2626        }
    2727
    2828        if ( ! defined( 'MULTISITE' ) ) {
    29                 wp_die( __( 'The Network creation panel is not for WordPress MU networks.' ) );
     29                wp_die( __( 'The Network creation panel is not for WordPress Multisite networks.' ) );
    3030        }
    3131}
    3232
    foreach ( $wpdb->tables( 'ms_global' ) as $table => $prefixed_table ) { 
    3737        $wpdb->$table = $prefixed_table;
    3838}
    3939
    40 if ( ! network_domain_check() && ( ! defined( 'WP_ALLOW_MULTISITE' ) || ! WP_ALLOW_MULTISITE ) ) {
    41         wp_die(
    42                 printf(
    43                         /* translators: 1: WP_ALLOW_MULTISITE, 2: wp-config.php */
    44                         __( 'You must define the %1$s constant as true in your %2$s file to allow creation of a Network.' ),
    45                         '<code>WP_ALLOW_MULTISITE</code>',
    46                         '<code>wp-config.php</code>'
    47                 )
    48         );
    49 }
    50 
    5140if ( is_network_admin() ) {
    5241        // Used in the HTML title tag.
    5342        $title       = __( 'Network Setup' );
  • src/wp-admin/network/menu.php

    diff --git a/src/wp-admin/network/menu.php b/src/wp-admin/network/menu.php
    index 73cc86b234..35019033ea 100644
    a b $submenu['plugins.php'][10] = array( __( 'Add New Plugin' ), 'install_plugins', 
    107107$submenu['plugins.php'][15] = array( __( 'Plugin File Editor' ), 'edit_plugins', 'plugin-editor.php' );
    108108
    109109$menu[25] = array( __( 'Settings' ), 'manage_network_options', 'settings.php', '', 'menu-top menu-icon-settings', 'menu-settings', 'dashicons-admin-settings' );
    110 if ( defined( 'MULTISITE' ) && defined( 'WP_ALLOW_MULTISITE' ) && WP_ALLOW_MULTISITE ) {
     110if ( defined( 'MULTISITE' ) ) {
    111111        $submenu['settings.php'][5]  = array( __( 'Network Settings' ), 'manage_network_options', 'settings.php' );
    112112        $submenu['settings.php'][10] = array( __( 'Network Setup' ), 'setup_network', 'setup.php' );
    113113}