Make WordPress Core

Ticket #37593: 37593.1.patch

File 37593.1.patch, 7.9 KB (added by Mista-Flo, 9 years ago)

Update multisite wording : Super admin => Network admin

  • wp-admin/includes/class-wp-ms-users-list-table.php

    From ae4f4ba40df6fc1bb981473b294b91c274fd629c Mon Sep 17 00:00:00 2001
    From: Florian TIAR <contact@tiar-florian.fr>
    Date: Mon, 26 Sep 2016 16:35:29 +0200
    Subject: [PATCH] Admin (Multisite) : Update wording - Super admin => Network admin
    
    ---
     wp-admin/includes/class-wp-ms-users-list-table.php | 4 ++--
     wp-admin/network/settings.php                      | 4 ++--
     wp-admin/network/site-new.php                      | 2 +-
     wp-admin/network/users.php                         | 2 +-
     wp-admin/user-edit.php                             | 8 ++++----
     5 files changed, 10 insertions(+), 10 deletions(-)
    
    diff --git a/wp-admin/includes/class-wp-ms-users-list-table.php b/wp-admin/includes/class-wp-ms-users-list-table.php
    index da00131..8a97f38 100644
    a b class WP_MS_Users_List_Table extends WP_List_Table { 
    139139                $role_links = array();
    140140                $role_links['all'] = "<a href='" . network_admin_url('users.php') . "'$class>" . sprintf( _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_users, 'users' ), number_format_i18n( $total_users ) ) . '</a>';
    141141                $class = $role === 'super' ? ' class="current"' : '';
    142                 $role_links['super'] = "<a href='" . network_admin_url('users.php?role=super') . "'$class>" . sprintf( _n( 'Super Admin <span class="count">(%s)</span>', 'Super Admins <span class="count">(%s)</span>', $total_admins ), number_format_i18n( $total_admins ) ) . '</a>';
     142                $role_links['super'] = "<a href='" . network_admin_url('users.php?role=super') . "'$class>" . sprintf( _n( 'Network Administrator <span class="count">(%s)</span>', 'Network Administrators <span class="count">(%s)</span>', $total_admins ), number_format_i18n( $total_admins ) ) . '</a>';
    143143
    144144                return $role_links;
    145145        }
    class WP_MS_Users_List_Table extends WP_List_Table { 
    242242
    243243                ?><strong><a href="<?php echo $edit_link; ?>" class="edit"><?php echo $user->user_login; ?></a><?php
    244244                if ( in_array( $user->user_login, $super_admins ) ) {
    245                         echo ' - ' . __( 'Super Admin' );
     245                        echo ' - ' . __( 'Network Administrator' );
    246246                }
    247247                ?></strong>
    248248        <?php
  • wp-admin/network/settings.php

    diff --git a/wp-admin/network/settings.php b/wp-admin/network/settings.php
    index d1af88b..09107ec 100644
    a b get_current_screen()->add_help_tab( array( 
    3434                        '<p>' . __('New site settings are defaults applied when a new site is created in the network. These include welcome email for when a new site or user account is registered, and what&#8127;s put in the first post, page, comment, comment author, and comment URL.') . '</p>' .
    3535                        '<p>' . __('Upload settings control the size of the uploaded files and the amount of available upload space for each site. You can change the default value for specific sites when you edit a particular site. Allowed file types are also listed (space separated only).') . '</p>' .
    3636                        '<p>' . __( 'You can set the language, and the translation files will be automatically downloaded and installed (available if your filesystem is writable).' ) . '</p>' .
    37                         '<p>' . __('Menu setting enables/disables the plugin menus from appearing for non super admins, so that only super admins, not site admins, have access to activate plugins.') . '</p>' .
    38                         '<p>' . __('Super admins can no longer be added on the Options screen. You must now go to the list of existing users on Network Admin > Users and click on Username or the Edit action link below that name. This goes to an Edit User page where you can check a box to grant super admin privileges.') . '</p>'
     37                        '<p>' . __('Menu setting enables/disables the plugin menus from appearing for non network admins, so that only network admins, not site admins, have access to activate plugins.') . '</p>' .
     38                        '<p>' . __('Network admins can no longer be added on the Options screen. You must now go to the list of existing users on Network Admin > Users and click on Username or the Edit action link below that name. This goes to an Edit User page where you can check a box to grant network admin privileges.') . '</p>'
    3939) );
    4040
    4141get_current_screen()->set_help_sidebar(
  • wp-admin/network/site-new.php

    diff --git a/wp-admin/network/site-new.php b/wp-admin/network/site-new.php
    index 7882d0e..86d216e 100644
    a b get_current_screen()->add_help_tab( array( 
    2323        'id'      => 'overview',
    2424        'title'   => __('Overview'),
    2525        'content' =>
    26                 '<p>' . __('This screen is for Super Admins to add new sites to the network. This is not affected by the registration settings.') . '</p>' .
     26                '<p>' . __('This screen is for Network Administrators to add new sites to the network. This is not affected by the registration settings.') . '</p>' .
    2727                '<p>' . __('If the admin email for the new site does not exist in the database, a new user will also be created.') . '</p>'
    2828) );
    2929
  • wp-admin/network/users.php

    diff --git a/wp-admin/network/users.php b/wp-admin/network/users.php
    index 437f765..baff8f2 100644
    a b get_current_screen()->add_help_tab( array( 
    185185                '<p>' . __('You can also go to the user&#8217;s profile page by clicking on the individual username.') . '</p>' .
    186186                '<p>' . __( 'You can sort the table by clicking on any of the table headings and switch between list and excerpt views by using the icons above the users list.' ) . '</p>' .
    187187                '<p>' . __('The bulk action will permanently delete selected users, or mark/unmark those selected as spam. Spam users will have posts removed and will be unable to sign up again with the same email addresses.') . '</p>' .
    188                 '<p>' . __('You can make an existing user an additional super admin by going to the Edit User profile page and checking the box to grant that privilege.') . '</p>'
     188                '<p>' . __('You can make an existing user an additional network administrator by going to the Edit User profile page and checking the box to grant that privilege.') . '</p>'
    189189) );
    190190
    191191get_current_screen()->set_help_sidebar(
  • wp-admin/user-edit.php

    diff --git a/wp-admin/user-edit.php b/wp-admin/user-edit.php
    index bb3c62e..64ee8f4 100644
    a b include(ABSPATH . 'wp-admin/admin-header.php'); 
    171171?>
    172172
    173173<?php if ( !IS_PROFILE_PAGE && is_super_admin( $profileuser->ID ) && current_user_can( 'manage_network_options' ) ) { ?>
    174         <div class="updated"><p><strong><?php _e('Important:'); ?></strong> <?php _e('This user has super admin privileges.'); ?></p></div>
     174        <div class="updated"><p><strong><?php _e('Important:'); ?></strong> <?php _e('This user has network admin privileges.'); ?></p></div>
    175175<?php } ?>
    176176<?php if ( isset($_GET['updated']) ) : ?>
    177177<div id="message" class="updated notice is-dismissible">
    else 
    325325<?php endif; //!IS_PROFILE_PAGE
    326326
    327327if ( is_multisite() && is_network_admin() && ! IS_PROFILE_PAGE && current_user_can( 'manage_network_options' ) && !isset($super_admins) ) { ?>
    328 <tr class="user-super-admin-wrap"><th><?php _e('Super Admin'); ?></th>
     328<tr class="user-super-admin-wrap"><th><?php _e('Network Administrator'); ?></th>
    329329<td>
    330330<?php if ( $profileuser->user_email != get_site_option( 'admin_email' ) || ! is_super_admin( $profileuser->ID ) ) : ?>
    331 <p><label><input type="checkbox" id="super_admin" name="super_admin"<?php checked( is_super_admin( $profileuser->ID ) ); ?> /> <?php _e( 'Grant this user super admin privileges for the Network.' ); ?></label></p>
     331<p><label><input type="checkbox" id="super_admin" name="super_admin"<?php checked( is_super_admin( $profileuser->ID ) ); ?> /> <?php _e( 'Grant this user network admin privileges for the Network.' ); ?></label></p>
    332332<?php else : ?>
    333 <p><?php _e( 'Super admin privileges cannot be removed because this user has the network admin email.' ); ?></p>
     333<p><?php _e( 'Network admin privileges cannot be removed because this user has the network admin email.' ); ?></p>
    334334<?php endif; ?>
    335335</td></tr>
    336336<?php } ?>