]> scripts.mit.edu Git - autoinstalls/wordpress.git/blob - wp-admin/network/users.php
Wordpress 3.1-scripts
[autoinstalls/wordpress.git] / wp-admin / network / users.php
1 <?php
2 /**
3  * Multisite users administration panel.
4  *
5  * @package WordPress
6  * @subpackage Multisite
7  * @since 3.0.0
8  */
9
10 /** Load WordPress Administration Bootstrap */
11 require_once( './admin.php' );
12
13 if ( ! is_multisite() )
14         wp_die( __( 'Multisite support is not enabled.' ) );
15
16 if ( ! current_user_can( 'manage_network_users' ) )
17         wp_die( __( 'You do not have permission to access this page.' ) );
18
19 $wp_list_table = _get_list_table('WP_MS_Users_List_Table');
20 $pagenum = $wp_list_table->get_pagenum();
21 $wp_list_table->prepare_items();
22 $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );
23
24 if ( $pagenum > $total_pages && $total_pages > 0 ) {
25         wp_redirect( add_query_arg( 'paged', $total_pages ) );
26         exit;
27 }
28 $title = __( 'Users' );
29 $parent_file = 'users.php';
30
31 add_screen_option( 'per_page', array('label' => _x( 'Users', 'users per page (screen options)' )) );
32
33 add_contextual_help($current_screen,
34         '<p>' . __('This table shows all users across the network and the sites to which they are assigned.') . '</p>' .
35         '<p>' . __('Hover over any user on the list to make the edit links appear. The Edit link on the left will take you to his or her Edit User profile page; the Edit link on the right by any site name goes to an Edit Site screen for that site.') . '</p>' .
36         '<p>' . __('You can also go to the user&#8217;s profile page by clicking on the individual username.') . '</p>' .
37         '<p>' . __('You can sort the table by clicking on any of the bold headings and switch between list and excerpt views by using the icons in the upper right.') . '</p>' .
38         '<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>' .
39         '<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>' .
40         '<p><strong>' . __('For more information:') . '</strong></p>' .
41         '<p>' . __('<a href="http://codex.wordpress.org/Network_Admin_Users_Screen" target="_blank">Documentation on Network Users</a>') . '</p>' .
42         '<p>' . __('<a href="http://wordpress.org/support/forum/multisite/" target="_blank">Support Forums</a>') . '</p>'
43 );
44
45 require_once( '../admin-header.php' );
46
47 if ( isset( $_REQUEST['updated'] ) && $_REQUEST['updated'] == 'true' && ! empty( $_REQUEST['action'] ) ) {
48         ?>
49         <div id="message" class="updated"><p>
50                 <?php
51                 switch ( $_REQUEST['action'] ) {
52                         case 'delete':
53                                 _e( 'User deleted.' );
54                         break;
55                         case 'all_spam':
56                                 _e( 'Users marked as spam.' );
57                         break;
58                         case 'all_notspam':
59                                 _e( 'Users removed from spam.' );
60                         break;
61                         case 'all_delete':
62                                 _e( 'Users deleted.' );
63                         break;
64                         case 'add':
65                                 _e( 'User added.' );
66                         break;
67                 }
68                 ?>
69         </p></div>
70         <?php
71 }
72         ?>
73 <div class="wrap">
74         <?php screen_icon(); ?>
75         <h2><?php esc_html_e( 'Users' );
76         if ( current_user_can( 'create_users') ) : ?>
77                 <a href="<?php echo network_admin_url('user-new.php'); ?>" class="button add-new-h2"><?php echo esc_html_x( 'Add New', 'user' ); ?></a><?php
78         endif;
79         
80         if ( !empty( $usersearch ) )
81         printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', esc_html( $usersearch ) );
82         ?>
83         </h2>
84
85         <?php $wp_list_table->views(); ?>
86
87         <form action="" method="get" class="search-form">
88                 <?php $wp_list_table->search_box( __( 'Search Users' ), 'user' ); ?>
89         </form>
90
91         <form id="form-user-list" action='edit.php?action=allusers' method='post'>
92                 <?php $wp_list_table->display(); ?>
93         </form>
94 </div>
95
96 <?php require_once( '../admin-footer.php' ); ?>