3 * Multisite sites administration panel.
6 * @subpackage Multisite
10 /** Load WordPress Administration Bootstrap */
11 require_once( './admin.php' );
13 if ( ! is_multisite() )
14 wp_die( __( 'Multisite support is not enabled.' ) );
16 if ( ! current_user_can( 'manage_sites' ) )
17 wp_die( __( 'You do not have permission to access this page.' ) );
19 $wp_list_table = _get_list_table('WP_MS_Sites_List_Table');
20 $pagenum = $wp_list_table->get_pagenum();
22 $title = __( 'Sites' );
23 $parent_file = 'sites.php';
25 add_screen_option( 'per_page', array('label' => _x( 'Sites', 'sites per page (screen options)' )) );
27 add_contextual_help($current_screen,
28 '<p>' . __('Add New takes you to the Add New Site screen. You can search for a site by Name, ID number, or IP address. Screen Options allows you to choose how many sites to display on one page.') . '</p>' .
29 '<p>' . __('This is the main table of all sites on this network. Switch between list and excerpt views by using the icons above the right side of the table.') . '</p>' .
30 '<p>' . __('Hovering over each site reveals seven options (three for the primary site):') . '</p>' .
31 '<ul><li>' . __('An Edit link to a separate Edit Site screen.') . '</li>' .
32 '<li>' . __('Dashboard leads to the Dashboard for that site.') . '</li>' .
33 '<li>' . __('Deactivate, Archive, and Spam which lead to confirmation screens. These actions can be reversed later.') . '</li>' .
34 '<li>' . __('Delete which is a permanent action after the confirmation screens.') . '</li>' .
35 '<li>' . __('Visit to go to the frontend site live.') . '</li></ul>' .
36 '<p>' . __('The site ID is used internally, and is not shown on the front end of the site or to users/viewers.') . '</p>' .
37 '<p>' . __('Clicking on bold headings can re-sort this table.') . '</p>' .
38 '<p><strong>' . __('For more information:') . '</strong></p>' .
39 '<p>' . __('<a href="http://codex.wordpress.org/Network_Admin_Sites_Screens" target="_blank">Documentation on Site Management</a>') . '</p>' .
40 '<p>' . __('<a href="http://wordpress.org/support/forum/multisite/" target="_blank">Support Forums</a>') . '</p>'
43 $id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0;
46 if ( isset( $_REQUEST['updated'] ) && $_REQUEST['updated'] == 'true' && ! empty( $_REQUEST['action'] ) ) {
47 switch ( $_REQUEST['action'] ) {
49 $msg = __( 'Sites removed from spam.' );
52 $msg = __( 'Sites marked as spam.' );
55 $msg = __( 'Sites deleted.' );
58 $msg = __( 'Site deleted.' );
61 $msg = __( 'You do not have permission to delete that site.' );
64 $msg = __( 'Site archived.' );
67 $msg = __( 'Site unarchived.' );
70 $msg = __( 'Site activated.' );
73 $msg = __( 'Site deactivated.' );
76 $msg = __( 'Site removed from spam.' );
79 $msg = __( 'Site marked as spam.' );
82 $msg = apply_filters( 'network_sites_updated_message_' . $_REQUEST['action'] , __( 'Settings saved.' ) );
86 $msg = '<div class="updated" id="message"><p>' . $msg . '</p></div>';
89 $wp_list_table->prepare_items();
91 require_once( '../admin-header.php' );
95 <?php screen_icon('ms-admin'); ?>
96 <h2><?php _e('Sites') ?>
98 <?php if ( current_user_can( 'create_sites') ) : ?>
99 <a href="<?php echo network_admin_url('site-new.php'); ?>" class="add-new-h2"><?php echo esc_html_x( 'Add New', 'site' ); ?></a>
102 <?php if ( isset( $_REQUEST['s'] ) && $_REQUEST['s'] ) {
103 printf( '<span class="subtitle">' . __( 'Search results for “%s”' ) . '</span>', esc_html( $s ) );
107 <form action="" method="get" id="ms-search">
108 <?php $wp_list_table->search_box( __( 'Search Sites' ), 'site' ); ?>
109 <input type="hidden" name="action" value="blogs" />
112 <form id="form-site-list" action="edit.php?action=allblogs" method="post">
113 <?php $wp_list_table->display(); ?>
118 require_once( '../admin-footer.php' ); ?>