Archived
Updates
This commit is contained in:
1 parent
70d2335bba
commit
7428b67da5
1086 files changed
+94145
-59082
No files matched your search
@@ -32,7 +32,7 @@ get_current_screen()->add_help_tab( array(
|
||||
|
||||
get_current_screen()->set_help_sidebar(
|
||||
'<p><strong>' . __('For more information:') . '</strong></p>' .
|
||||
'<p>' . __('<a href="http://codex.wordpress.org/Network_Admin_Sites_Screen" target="_blank">Documentation on Site Management</a>') . '</p>' .
|
||||
'<p>' . __('<a href="https://codex.wordpress.org/Network_Admin_Sites_Screen" target="_blank">Documentation on Site Management</a>') . '</p>' .
|
||||
'<p>' . __('<a href="https://wordpress.org/support/forum/multisite/" target="_blank">Support Forums</a>') . '</p>'
|
||||
);
|
||||
|
||||
@@ -50,7 +50,7 @@ if ( ! $id )
|
||||
|
||||
$details = get_blog_details( $id );
|
||||
if ( ! can_edit_network( $details->site_id ) )
|
||||
wp_die( __( 'You do not have permission to access this page.' ) );
|
||||
wp_die( __( 'You do not have permission to access this page.' ), 403 );
|
||||
|
||||
$is_main_site = is_main_site( $id );
|
||||
|
||||
@@ -133,7 +133,7 @@ if ( $action ) {
|
||||
|
||||
// If the user doesn't already belong to the blog, bail.
|
||||
if ( !is_user_member_of_blog( $user_id ) )
|
||||
wp_die(__('Cheatin’ uh?'));
|
||||
wp_die( __( 'Cheatin’ uh?' ), 403 );
|
||||
|
||||
$user = get_userdata( $user_id );
|
||||
$user->set_role( $_REQUEST['new_role'] );
|
||||
@@ -155,11 +155,11 @@ if ( isset( $_GET['action'] ) && 'update-site' == $_GET['action'] ) {
|
||||
exit();
|
||||
}
|
||||
|
||||
add_screen_option( 'per_page', array( 'label' => _x( 'Users', 'users per page (screen options)' ) ) );
|
||||
add_screen_option( 'per_page' );
|
||||
|
||||
$site_url_no_http = preg_replace( '#^http(s)?://#', '', get_blogaddress_by_id( $id ) );
|
||||
$title_site_url_linked = sprintf( __('Edit Site: <a href="%1$s">%2$s</a>'), get_blogaddress_by_id( $id ), $site_url_no_http );
|
||||
$title = sprintf( __('Edit Site: %s'), $site_url_no_http );
|
||||
$title_site_url_linked = sprintf( __( 'Edit Site: %s' ), '<a href="' . get_blogaddress_by_id( $id ) . '">' . $site_url_no_http . '</a>' );
|
||||
$title = sprintf( __( 'Edit Site: %s' ), $site_url_no_http );
|
||||
|
||||
$parent_file = 'sites.php';
|
||||
$submenu_file = 'sites.php';
|
||||
@@ -177,9 +177,7 @@ if ( ! wp_is_large_network( 'users' ) && apply_filters( 'show_network_site_users
|
||||
require( ABSPATH . 'wp-admin/admin-header.php' ); ?>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* <![CDATA[ */
|
||||
var current_site_id = <?php echo $id; ?>;
|
||||
/* ]]> */
|
||||
</script>
|
||||
|
||||
|
||||
@@ -203,39 +201,39 @@ foreach ( $tabs as $tab_id => $tab ) {
|
||||
if ( isset($_GET['update']) ) :
|
||||
switch($_GET['update']) {
|
||||
case 'adduser':
|
||||
echo '<div id="message" class="updated"><p>' . __( 'User added.' ) . '</p></div>';
|
||||
echo '<div id="message" class="updated notice is-dismissible"><p>' . __( 'User added.' ) . '</p></div>';
|
||||
break;
|
||||
case 'err_add_member':
|
||||
echo '<div id="message" class="error"><p>' . __( 'User is already a member of this site.' ) . '</p></div>';
|
||||
echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'User is already a member of this site.' ) . '</p></div>';
|
||||
break;
|
||||
case 'err_add_notfound':
|
||||
echo '<div id="message" class="error"><p>' . __( 'Enter the username of an existing user.' ) . '</p></div>';
|
||||
echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Enter the username of an existing user.' ) . '</p></div>';
|
||||
break;
|
||||
case 'promote':
|
||||
echo '<div id="message" class="updated"><p>' . __( 'Changed roles.' ) . '</p></div>';
|
||||
echo '<div id="message" class="updated notice is-dismissible"><p>' . __( 'Changed roles.' ) . '</p></div>';
|
||||
break;
|
||||
case 'err_promote':
|
||||
echo '<div id="message" class="error"><p>' . __( 'Select a user to change role.' ) . '</p></div>';
|
||||
echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Select a user to change role.' ) . '</p></div>';
|
||||
break;
|
||||
case 'remove':
|
||||
echo '<div id="message" class="updated"><p>' . __( 'User removed from this site.' ) . '</p></div>';
|
||||
echo '<div id="message" class="updated notice is-dismissible"><p>' . __( 'User removed from this site.' ) . '</p></div>';
|
||||
break;
|
||||
case 'err_remove':
|
||||
echo '<div id="message" class="error"><p>' . __( 'Select a user to remove.' ) . '</p></div>';
|
||||
echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Select a user to remove.' ) . '</p></div>';
|
||||
break;
|
||||
case 'newuser':
|
||||
echo '<div id="message" class="updated"><p>' . __( 'User created.' ) . '</p></div>';
|
||||
echo '<div id="message" class="updated notice is-dismissible"><p>' . __( 'User created.' ) . '</p></div>';
|
||||
break;
|
||||
case 'err_new':
|
||||
echo '<div id="message" class="error"><p>' . __( 'Enter the username and email.' ) . '</p></div>';
|
||||
echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Enter the username and email.' ) . '</p></div>';
|
||||
break;
|
||||
case 'err_new_dup':
|
||||
echo '<div id="message" class="error"><p>' . __( 'Duplicated username or email address.' ) . '</p></div>';
|
||||
echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Duplicated username or email address.' ) . '</p></div>';
|
||||
break;
|
||||
}
|
||||
endif; ?>
|
||||
|
||||
<form class="search-form" action="" method="get">
|
||||
<form class="search-form" method="get">
|
||||
<?php $wp_list_table->search_box( __( 'Search Users' ), 'user' ); ?>
|
||||
<input type="hidden" name="id" value="<?php echo esc_attr( $id ) ?>" />
|
||||
</form>
|
||||
@@ -264,12 +262,12 @@ if ( current_user_can( 'promote_users' ) && apply_filters( 'show_network_site_us
|
||||
<input type="hidden" name="id" value="<?php echo esc_attr( $id ) ?>" />
|
||||
<table class="form-table">
|
||||
<tr>
|
||||
<th scope="row"><?php _e( 'Username' ); ?></th>
|
||||
<th scope="row"><label for="newuser"><?php _e( 'Username' ); ?></label></th>
|
||||
<td><input type="text" class="regular-text wp-suggest-user" name="newuser" id="newuser" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><?php _e( 'Role' ); ?></th>
|
||||
<td><select name="new_role" id="new_role_0">
|
||||
<th scope="row"><label for="new_role_adduser"><?php _e( 'Role' ); ?></label></th>
|
||||
<td><select name="new_role" id="new_role_adduser">
|
||||
<?php wp_dropdown_roles( get_option( 'default_role' ) ); ?>
|
||||
</select></td>
|
||||
</tr>
|
||||
@@ -293,16 +291,16 @@ if ( current_user_can( 'create_users' ) && apply_filters( 'show_network_site_use
|
||||
<input type="hidden" name="id" value="<?php echo esc_attr( $id ) ?>" />
|
||||
<table class="form-table">
|
||||
<tr>
|
||||
<th scope="row"><?php _e( 'Username' ) ?></th>
|
||||
<td><input type="text" class="regular-text" name="user[username]" /></td>
|
||||
<th scope="row"><label for="user_username"><?php _e( 'Username' ) ?></label></th>
|
||||
<td><input type="text" class="regular-text" name="user[username]" id="user_username" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><?php _e( 'Email' ) ?></th>
|
||||
<td><input type="text" class="regular-text" name="user[email]" /></td>
|
||||
<th scope="row"><label for="user_email"><?php _e( 'Email' ) ?></label></th>
|
||||
<td><input type="text" class="regular-text" name="user[email]" id="user_email" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><?php _e( 'Role' ); ?></th>
|
||||
<td><select name="new_role" id="new_role_0">
|
||||
<th scope="row"><label for="new_role_newuser"><?php _e( 'Role' ); ?></label></th>
|
||||
<td><select name="new_role" id="new_role_newuser">
|
||||
<?php wp_dropdown_roles( get_option( 'default_role' ) ); ?>
|
||||
</select></td>
|
||||
</tr>
|
||||
|
||||
Reference in new issue
Block a user