equal
deleted
inserted
replaced
24 wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 ); |
24 wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 ); |
25 } |
25 } |
26 |
26 |
27 check_admin_referer( 'deleteuser' ); |
27 check_admin_referer( 'deleteuser' ); |
28 |
28 |
29 $id = intval( $_GET['id'] ); |
29 $id = (int) $_GET['id']; |
30 if ( $id > 1 ) { |
30 if ( $id > 1 ) { |
31 $_POST['allusers'] = array( $id ); // confirm_delete_users() can only handle arrays. |
31 $_POST['allusers'] = array( $id ); // confirm_delete_users() can only handle arrays. |
32 $title = __( 'Users' ); |
32 $title = __( 'Users' ); |
33 $parent_file = 'users.php'; |
33 $parent_file = 'users.php'; |
34 require_once ABSPATH . 'wp-admin/admin-header.php'; |
34 require_once ABSPATH . 'wp-admin/admin-header.php'; |
44 case 'allusers': |
44 case 'allusers': |
45 if ( ! current_user_can( 'manage_network_users' ) ) { |
45 if ( ! current_user_can( 'manage_network_users' ) ) { |
46 wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 ); |
46 wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 ); |
47 } |
47 } |
48 |
48 |
49 if ( ( isset( $_POST['action'] ) || isset( $_POST['action2'] ) ) && isset( $_POST['allusers'] ) ) { |
49 if ( isset( $_POST['action'] ) && isset( $_POST['allusers'] ) ) { |
50 check_admin_referer( 'bulk-users-network' ); |
50 check_admin_referer( 'bulk-users-network' ); |
51 |
51 |
52 $doaction = -1 != $_POST['action'] ? $_POST['action'] : $_POST['action2']; |
52 $doaction = $_POST['action']; |
53 $userfunction = ''; |
53 $userfunction = ''; |
54 |
54 |
55 foreach ( (array) $_POST['allusers'] as $user_id ) { |
55 foreach ( (array) $_POST['allusers'] as $user_id ) { |
56 if ( ! empty( $user_id ) ) { |
56 if ( ! empty( $user_id ) ) { |
57 switch ( $doaction ) { |
57 switch ( $doaction ) { |
271 <h1 class="wp-heading-inline"><?php esc_html_e( 'Users' ); ?></h1> |
271 <h1 class="wp-heading-inline"><?php esc_html_e( 'Users' ); ?></h1> |
272 |
272 |
273 <?php |
273 <?php |
274 if ( current_user_can( 'create_users' ) ) : |
274 if ( current_user_can( 'create_users' ) ) : |
275 ?> |
275 ?> |
276 <a href="<?php echo network_admin_url( 'user-new.php' ); ?>" class="page-title-action"><?php echo esc_html_x( 'Add New', 'user' ); ?></a> |
276 <a href="<?php echo esc_url( network_admin_url( 'user-new.php' ) ); ?>" class="page-title-action"><?php echo esc_html_x( 'Add New', 'user' ); ?></a> |
277 <?php |
277 <?php |
278 endif; |
278 endif; |
279 |
279 |
280 if ( strlen( $usersearch ) ) { |
280 if ( strlen( $usersearch ) ) { |
281 /* translators: %s: Search query. */ |
281 echo '<span class="subtitle">'; |
282 printf( '<span class="subtitle">' . __( 'Search results for “%s”' ) . '</span>', esc_html( $usersearch ) ); |
282 printf( |
|
283 /* translators: %s: Search query. */ |
|
284 __( 'Search results for: %s' ), |
|
285 '<strong>' . esc_html( $usersearch ) . '</strong>' |
|
286 ); |
|
287 echo '</span>'; |
283 } |
288 } |
284 ?> |
289 ?> |
285 |
290 |
286 <hr class="wp-header-end"> |
291 <hr class="wp-header-end"> |
287 |
292 |