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 { |
| 139 | 139 | $role_links = array(); |
| 140 | 140 | $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>'; |
| 141 | 141 | $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>'; |
| 143 | 143 | |
| 144 | 144 | return $role_links; |
| 145 | 145 | } |
| … |
… |
class WP_MS_Users_List_Table extends WP_List_Table { |
| 242 | 242 | |
| 243 | 243 | ?><strong><a href="<?php echo $edit_link; ?>" class="edit"><?php echo $user->user_login; ?></a><?php |
| 244 | 244 | if ( in_array( $user->user_login, $super_admins ) ) { |
| 245 | | echo ' - ' . __( 'Super Admin' ); |
| | 245 | echo ' - ' . __( 'Network Administrator' ); |
| 246 | 246 | } |
| 247 | 247 | ?></strong> |
| 248 | 248 | <?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( |
| 34 | 34 | '<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᾿s put in the first post, page, comment, comment author, and comment URL.') . '</p>' . |
| 35 | 35 | '<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>' . |
| 36 | 36 | '<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>' |
| 39 | 39 | ) ); |
| 40 | 40 | |
| 41 | 41 | get_current_screen()->set_help_sidebar( |
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( |
| 23 | 23 | 'id' => 'overview', |
| 24 | 24 | 'title' => __('Overview'), |
| 25 | 25 | '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>' . |
| 27 | 27 | '<p>' . __('If the admin email for the new site does not exist in the database, a new user will also be created.') . '</p>' |
| 28 | 28 | ) ); |
| 29 | 29 | |
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( |
| 185 | 185 | '<p>' . __('You can also go to the user’s profile page by clicking on the individual username.') . '</p>' . |
| 186 | 186 | '<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>' . |
| 187 | 187 | '<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>' |
| 189 | 189 | ) ); |
| 190 | 190 | |
| 191 | 191 | get_current_screen()->set_help_sidebar( |
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'); |
| 171 | 171 | ?> |
| 172 | 172 | |
| 173 | 173 | <?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> |
| 175 | 175 | <?php } ?> |
| 176 | 176 | <?php if ( isset($_GET['updated']) ) : ?> |
| 177 | 177 | <div id="message" class="updated notice is-dismissible"> |
| … |
… |
else |
| 325 | 325 | <?php endif; //!IS_PROFILE_PAGE |
| 326 | 326 | |
| 327 | 327 | if ( 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> |
| 329 | 329 | <td> |
| 330 | 330 | <?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> |
| 332 | 332 | <?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> |
| 334 | 334 | <?php endif; ?> |
| 335 | 335 | </td></tr> |
| 336 | 336 | <?php } ?> |