' . __('This extensive list of options has five modules: Site Info, Site Options, allowing Site Themes for this given site, changing user roles and passwords for that site, adding a new user, and Miscellaneous Site Actions (upload size limits).') . '
' .
'' . __('Note that some fields in Site Options are grayed out and say Serialized Data. These are stored values in the database which you cannot change from here.') . '
' .
'' . __('For more information:') . '
' .
'' . __('Site Editing Documentation ') . '
' .
'' . __('Support Forums ') . '
'
);
} else {
add_contextual_help($current_screen,
'' . __('Add New takes you farther down on this same page. 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.') . '
' .
'' . __('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.') . '
' .
'' . __('Hovering over each site reveals seven options (three for the primary site):') . '
' .
'' . __('an Edit link to a separate Edit Site screen.') . ' ' .
'' . __('Backend means the Dashboard for that site.') . ' ' .
'' . __('Deactivate, Archive, and Spam which lead to confirmation screens. These actions can be reversed later.') . ' ' .
'' . __('Delete which is a permanent action after the confirmations screen.') . ' ' .
'' . __('Visit to go to the frontend site live.') . ' ' .
'' . __('The site ID is used internally, and is not shown on the front end of the site or to users/viewers.') . '
' .
'' . __('Clicking on bold settings can re-sort this table. The upper right icons switch between list and excerpt views.') . '
' .
'' . __("Clicking on Add Site, after filling out the address, title, and admin's email address, adds the site instantly to the network and this table. You may want to then click on the action link to edit options for that site.") . '
' .
'' . __('If the admin email for the new site does not exist in the database, a new user will also be created.') . '
' .
'' . __('For more information:') . '
' .
'' . __('Sites Documentation ') . '
' .
'' . __('Support Forums ') . '
'
);
}
wp_enqueue_script( 'admin-forms' );
require_once( './admin-header.php' );
$id = isset( $_GET['id'] ) ? intval( $_GET['id'] ) : 0;
if ( isset( $_GET['updated'] ) && $_GET['updated'] == 'true' && ! empty( $_GET['action'] ) ) {
?>
get_blog_prefix( $id );
$options = $wpdb->get_results( "SELECT * FROM {$blog_prefix}options WHERE option_name NOT LIKE '\_%' AND option_name NOT LIKE '%user_roles'" );
$details = get_blog_details( $id );
$editblog_roles = get_blog_option( $id, "{$blog_prefix}user_roles" );
$is_main_site = is_main_site( $id );
?>
blogs} WHERE site_id = '{$wpdb->siteid}' ";
if ( isset( $_GET['searchaction'] ) ) {
if ( 'name' == $_GET['searchaction'] ) {
$query .= " AND ( {$wpdb->blogs}.domain LIKE '%{$like_s}%' OR {$wpdb->blogs}.path LIKE '%{$like_s}%' ) ";
} elseif ( 'id' == $_GET['searchaction'] ) {
$query .= " AND {$wpdb->blogs}.blog_id = '{$like_s}' ";
} elseif ( 'ip' == $_GET['searchaction'] ) {
$query = "SELECT *
FROM {$wpdb->blogs}, {$wpdb->registration_log}
WHERE site_id = '{$wpdb->siteid}'
AND {$wpdb->blogs}.blog_id = {$wpdb->registration_log}.blog_id
AND {$wpdb->registration_log}.IP LIKE ('%{$like_s}%')";
}
}
$order_by = isset( $_GET['sortby'] ) ? $_GET['sortby'] : 'id';
if ( $order_by == 'registered' ) {
$query .= ' ORDER BY registered ';
} elseif ( $order_by == 'lastupdated' ) {
$query .= ' ORDER BY last_updated ';
} elseif ( $order_by == 'blogname' ) {
$query .= ' ORDER BY domain ';
} else {
$order_by = 'id';
$query .= " ORDER BY {$wpdb->blogs}.blog_id ";
}
$order = ( isset( $_GET['order'] ) && 'DESC' == $_GET['order'] ) ? "DESC" : "ASC";
$query .= $order;
$total = $wpdb->get_var( str_replace( 'SELECT *', 'SELECT COUNT(blog_id)', $query ) );
$query .= " LIMIT " . intval( ( $pagenum - 1 ) * $per_page ) . ", " . intval( $per_page );
$blog_list = $wpdb->get_results( $query, ARRAY_A );
$num_pages = ceil($total / $per_page);
$page_links = paginate_links( array(
'base' => add_query_arg( 'paged', '%#%' ),
'format' => '',
'prev_text' => __( '«' ),
'next_text' => __( '»' ),
'total' => $num_pages,
'current' => $pagenum
));
if ( empty( $_GET['mode'] ) )
$mode = 'list';
else
$mode = esc_attr( $_GET['mode'] );
?>
' . __( 'Search results for “%s”' ) . '', esc_html( $s ) );
?>
'display name'
$blogname_columns = ( is_subdomain_install() ) ? __( 'Domain' ) : __( 'Path' );
$sites_columns = array(
'id' => __( 'ID' ),
'blogname' => $blogname_columns,
'lastupdated' => __( 'Last Updated'),
'registered' => _x( 'Registered', 'site' ),
'users' => __( 'Users' )
);
if ( has_filter( 'wpmublogsaction' ) )
$sites_columns['plugins'] = __( 'Actions' );
$sites_columns = apply_filters( 'wpmu_blogs_columns', $sites_columns );
?>
$column_display_name) {
$column_link = " $order2, 'paged' => $pagenum, 'sortby' => $column_id ), remove_query_arg( array('action', 'updated'), $_SERVER['REQUEST_URI'] ) ) );
$column_link .= "'>{$column_display_name} ";
$col_url .= '' . ( ( $column_id == 'users' || $column_id == 'plugins' ) ? $column_display_name : $column_link ) . ' ';
}
echo $col_url ?>
array( 'site-archived', __( 'Archived' ) ), 'spam' => array( 'site-spammed', _x( 'Spam', 'site' ) ), 'deleted' => array( 'site-deleted', __( 'Deleted' ) ), 'mature' => array( 'site-mature', __( 'Mature' ) ) );
if ( $blog_list ) {
$class = '';
foreach ( $blog_list as $blog ) {
$class = ( 'alternate' == $class ) ? '' : 'alternate';
reset( $status_list );
$blog_states = array();
foreach ( $status_list as $status => $col ) {
if ( get_blog_status( $blog['blog_id'], $status ) == 1 ) {
$class = $col[0];
$blog_states[] = $col[1];
}
}
$blog_state = '';
if ( ! empty( $blog_states ) ) {
$state_count = count( $blog_states );
$i = 0;
$blog_state .= ' - ';
foreach ( $blog_states as $state ) {
++$i;
( $i == $state_count ) ? $sep = '' : $sep = ', ';
$blog_state .= "$state$sep ";
}
}
echo "";
$blogname = ( is_subdomain_install() ) ? str_replace( '.'.$current_site->domain, '', $blog['domain'] ) : $blog['path'];
foreach ( $sites_columns as $column_name=>$column_display_name ) {
switch ( $column_name ) {
case 'id': ?>
' . sprintf( _x( '%1$s – %2$s ', '%1$s: site name. %2$s: site tagline.' ), get_blog_option( $blog['blog_id'], 'blogname' ), get_blog_option( $blog['blog_id'], 'blogdescription ' ) ) . '';
// Preordered.
$actions = array(
'edit' => '', 'backend' => '',
'activate' => '', 'deactivate' => '',
'archive' => '', 'unarchive' => '',
'spam' => '', 'unspam' => '',
'delete' => '',
'visit' => '',
);
$actions['edit'] = '' . __( 'Edit' ) . ' ';
$actions['backend'] = "" . __( 'Backend' ) . ' ';
if ( $current_site->blog_id != $blog['blog_id'] ) {
if ( get_blog_status( $blog['blog_id'], 'deleted' ) == '1' )
$actions['activate'] = '' . __( 'Activate' ) . ' ';
else
$actions['deactivate'] = '' . __( 'Deactivate' ) . ' ';
if ( get_blog_status( $blog['blog_id'], 'archived' ) == '1' )
$actions['unarchive'] = '' . __( 'Unarchive' ) . ' ';
else
$actions['archive'] = '' . _x( 'Archive', 'verb; site' ) . ' ';
if ( get_blog_status( $blog['blog_id'], 'spam' ) == '1' )
$actions['unspam'] = '' . _x( 'Not Spam', 'site' ) . ' ';
else
$actions['spam'] = '' . _x( 'Spam', 'site' ) . ' ';
$actions['delete'] = '' . __( 'Delete' ) . ' ';
}
$actions['visit'] = "" . __( 'Visit' ) . ' ';
$actions = array_filter( $actions );
if ( count( $actions ) ) : ?>
g:i:s a';
echo ( $blog['last_updated'] == '0000-00-00 00:00:00' ) ? __( 'Never' ) : mysql2date( __( $date ), $blog['last_updated'] ); ?>
5 ) {
$blogusers = array_slice( $blogusers, 0, 5 );
$blogusers_warning = __( 'Only showing first 5 users.' ) . ' ' . __( 'More' ) . ' ';
}
foreach ( $blogusers as $key => $val ) {
echo '' . esc_html( $val->user_login ) . ' ';
if ( 'list' != $mode )
echo '(' . $val->user_email . ')';
echo ' ';
}
if ( $blogusers_warning != '' )
echo '' . $blogusers_warning . ' ';
}
?>
$page_links_text
";
?>