diff --git a/wp-admin/includes/ms.php b/wp-admin/includes/ms.php
index de76afaac0..071285e57f 100644
--- a/wp-admin/includes/ms.php
+++ b/wp-admin/includes/ms.php
@@ -47,8 +47,8 @@ function wpmu_delete_blog($blog_id, $drop = false) {
update_blog_status( $blog_id, 'deleted', 1 );
if ( $drop ) {
- $drop_tables = $wpdb->get_results("show tables LIKE '". $wpdb->base_prefix . $blog_id . "\_%'", ARRAY_A);
- $drop_tables = apply_filters( 'wpmu_drop_tables', $drop_tables );
+ $drop_tables = $wpdb->get_results("show tables LIKE '". $wpdb->base_prefix . $blog_id . "\_%'", ARRAY_A);
+ $drop_tables = apply_filters( 'wpmu_drop_tables', $drop_tables );
reset( $drop_tables );
foreach ( (array) $drop_tables as $drop_table) {
@@ -219,10 +219,10 @@ function update_option_new_admin_email($old_value, $value) {
"newemail" => $value
);
update_option( 'adminhash', $new_admin_email );
-
+
$content = apply_filters( 'new_admin_email_content', __("Dear user,
-You recently requested to have the administration email address on
+You recently requested to have the administration email address on
your blog changed.
If this is correct, please click on the following link to change it:
###ADMIN_URL###
@@ -235,12 +235,12 @@ This email has been sent to ###EMAIL###
Regards,
All at ###SITENAME###
###SITEURL###"), $new_admin_email );
-
+
$content = str_replace('###ADMIN_URL###', clean_url(get_option( "siteurl" ).'/wp-admin/options.php?adminhash='.$hash), $content);
$content = str_replace('###EMAIL###', $value, $content);
$content = str_replace('###SITENAME###', get_site_option( 'site_name' ), $content);
$content = str_replace('###SITEURL###', 'http://' . $current_site->domain . $current_site->path, $content);
-
+
wp_mail( $value, sprintf(__('[%s] New Admin Email Address'), get_option('blogname')), $content );
}
add_action('update_option_new_admin_email', 'update_option_new_admin_email', 10, 2);
@@ -354,7 +354,7 @@ function get_site_allowed_themes() {
function get_space_allowed() {
$spaceAllowed = get_option("blog_upload_space");
- if( $spaceAllowed == false )
+ if( $spaceAllowed == false )
$spaceAllowed = get_site_option("blog_upload_space");
if( empty($spaceAllowed) || !is_numeric($spaceAllowed) )
$spaceAllowed = 50;
@@ -376,12 +376,12 @@ function display_space_usage() {
$space .= __('MB');
}
?>
-
+
@@ -432,9 +432,9 @@ function update_user_status( $id, $pref, $value, $refresh = 1 ) {
if( $refresh == 1 )
refresh_user_details($id);
-
+
if( $pref == 'spam' ) {
- if( $value == 1 )
+ if( $value == 1 )
do_action( "make_spam_user", $id );
else
do_action( "make_ham_user", $id );
@@ -445,7 +445,7 @@ function update_user_status( $id, $pref, $value, $refresh = 1 ) {
function refresh_user_details($id) {
$id = (int) $id;
-
+
if ( !$user = get_userdata( $id ) )
return false;
@@ -464,8 +464,8 @@ function wpmu_checkAvailableSpace() {
$spaceAllowed = get_space_allowed();
$dirName = trailingslashit( BLOGUPLOADDIR );
- if (!(is_dir($dirName) && is_readable($dirName)))
- return;
+ if (!(is_dir($dirName) && is_readable($dirName)))
+ return;
$dir = dir($dirName);
$size = 0;
@@ -512,7 +512,7 @@ function redirect_user_to_blog() {
$c = 0;
if ( isset( $_GET[ 'c' ] ) )
$c = (int)$_GET[ 'c' ];
-
+
if ( $c >= 5 ) {
wp_die( __( "You don’t have permission to view this blog. Please contact the system administrator." ) );
}
@@ -521,13 +521,13 @@ function redirect_user_to_blog() {
$blog = get_active_blog_for_user( $current_user->ID );
$dashboard_blog = get_dashboard_blog();
if( is_object( $blog ) ) {
- $protocol = ( is_ssl() ? 'https://' : 'http://' );
+ $protocol = ( is_ssl() ? 'https://' : 'http://' );
wp_redirect( $protocol . $blog->domain . $blog->path . 'wp-admin/?c=' . $c ); // redirect and count to 5, "just in case"
exit;
}
- /*
- If the user is a member of only 1 blog and the user's primary_blog isn't set to that blog,
+ /*
+ If the user is a member of only 1 blog and the user's primary_blog isn't set to that blog,
then update the primary_blog record to match the user's blog
*/
$blogs = get_blogs_of_user( $current_user->ID );
@@ -540,7 +540,7 @@ function redirect_user_to_blog() {
}
}
$blog = get_blog_details( get_usermeta( $current_user->ID , 'primary_blog' ) );
- $protocol = ( is_ssl() ? 'https://' : 'http://' );
+ $protocol = ( is_ssl() ? 'https://' : 'http://' );
wp_redirect( $protocol . $blog->domain . $blog->path . 'wp-admin/?c=' . $c ); // redirect and count to 5, "just in case"
exit;
}
@@ -558,7 +558,7 @@ function mu_options( $options ) {
} else {
$writing = array( 'ping_sites', 'mailserver_login', 'mailserver_pass', 'default_email_category', 'mailserver_port', 'mailserver_url' );
}
- $removed = array(
+ $removed = array(
'general' => array( 'siteurl', 'home', 'admin_email', 'users_can_register', 'default_role' ),
'reading' => array( 'gzipcompression' ),
'writing' => $writing,
@@ -584,12 +584,12 @@ add_filter( 'import_allow_create_users', 'check_import_new_users' );
// See "import_allow_fetch_attachments" and "import_attachment_size_limit" filters too.
function mu_dropdown_languages( $lang_files = array(), $current = '' ) {
- $flag = false;
+ $flag = false;
$output = array();
-
+
foreach ( (array) $lang_files as $val ) {
$code_lang = basename( $val, '.mo' );
-
+
if ( $code_lang == 'en_US' ) { // American English
$flag = true;
$ae = __('American English');
@@ -602,18 +602,18 @@ function mu_dropdown_languages( $lang_files = array(), $current = '' ) {
$translated = format_code_lang($code_lang);
$output[$translated] = ' '.$translated.' ';
}
-
- }
-
+
+ }
+
if ( $flag === false ) { // WordPress english
$output[] = ''.__('English')." ";
}
-
+
// Order by name
uksort($output, 'strnatcasecmp');
-
- $output = apply_filters('mu_dropdown_languages', $output, $lang_files, $current);
- echo implode("\n\t", $output);
+
+ $output = apply_filters('mu_dropdown_languages', $output, $lang_files, $current);
+ echo implode("\n\t", $output);
}
// Only show "Media" upload icon
@@ -762,10 +762,10 @@ add_filter( 'wp_insert_post_data', 'avoid_blog_page_permalink_collision', 10, 2
function activate_sitewide_plugin() {
if ( !isset( $_GET['sitewide'] ) )
return false;
-
+
/* Add the plugin to the list of sitewide active plugins */
$active_sitewide_plugins = maybe_unserialize( get_site_option( 'active_sitewide_plugins' ) );
-
+
/* Add the activated plugin to the list */
$active_sitewide_plugins[ $_GET['plugin'] ] = time();
@@ -775,7 +775,7 @@ function activate_sitewide_plugin() {
return true;
}
-add_action( 'activate_' . $_GET['plugin'], 'activate_sitewide_plugin' );
+add_action( 'activate_' . $_GET['plugin'], 'activate_sitewide_plugin' );
/**
* deactivate_sitewide_plugin()
@@ -785,7 +785,7 @@ add_action( 'activate_' . $_GET['plugin'], 'activate_sitewide_plugin' );
function deactivate_sitewide_plugin( $plugin = false ) {
if ( !$plugin )
$plugin = $_GET['plugin'];
-
+
/* Get the active sitewide plugins */
$active_sitewide_plugins = (array) maybe_unserialize( get_site_option( 'active_sitewide_plugins' ) );
@@ -797,11 +797,11 @@ function deactivate_sitewide_plugin( $plugin = false ) {
if ( !update_site_option( 'active_sitewide_plugins', $active_sitewide_plugins ) )
wp_redirect( 'plugins.php?error=true' );
-
+
return true;
}
-add_action( 'deactivate_' . $_GET['plugin'], 'deactivate_sitewide_plugin' );
-add_action( 'deactivate_invalid_plugin', 'deactivate_sitewide_plugin' );
+add_action( 'deactivate_' . $_GET['plugin'], 'deactivate_sitewide_plugin' );
+add_action( 'deactivate_invalid_plugin', 'deactivate_sitewide_plugin' );
/**
* add_sitewide_activate_row()
@@ -811,13 +811,13 @@ add_action( 'deactivate_invalid_plugin', 'deactivate_sitewide_plugin' );
function add_sitewide_activate_row( $file, $plugin_data, $context ) {
if ( !is_site_admin() )
return false;
-
+
if ( 'sitewide-active' == $context )
return false;
-
+
if ( is_plugin_active( $file ) )
return false;
-
+
echo ' ';
echo '↑ ' . sprintf( __( 'Activate %s Site Wide' ), strip_tags( $plugin_data["Title"] ) ) . ' ';
@@ -834,13 +834,13 @@ add_action( 'after_plugin_row', 'add_sitewide_activate_row', 9, 3 );
function is_wpmu_sitewide_plugin( $file ) {
/* Open the plugin file for reading to check if this is a ms-plugin. */
$fp = @fopen( WP_PLUGIN_DIR . '/' . $file, 'r' );
-
+
/* Pull only the first 8kiB of the file in. */
$plugin_data = @fread( $fp, 8192 );
-
+
/* PHP will close file handle, but we are good citizens. */
@fclose($fp);
-
+
if ( preg_match( '|Site Wide Only:(.*)true$|mi', $plugin_data ) )
return true;
@@ -858,14 +858,14 @@ function list_activate_sitewide_plugins() {
if ( !is_site_admin() )
return false;
-
+
$active_sitewide_plugins = maybe_unserialize( get_site_option( 'active_sitewide_plugins') );
$context = 'sitewide-active';
- if ( $active_sitewide_plugins ) {
+ if ( $active_sitewide_plugins ) {
?>
-
+
@@ -898,7 +898,7 @@ function list_activate_sitewide_plugins() {
$action_links = apply_filters( "plugin_action_links_$plugin_file", $action_links, $plugin_file, $plugin_data, $context );
$plugin_data = $all_plugins[$plugin_file];
-
+
echo "
@@ -931,16 +931,16 @@ function list_activate_sitewide_plugins() {
echo implode(' | ', $plugin_meta);
echo "
\n";
-
+
do_action( 'after_plugin_row', $plugin_file, $plugin_data, $context );
do_action( "after_plugin_row_$plugin_file", $plugin_file, $plugin_data, $context );
}
?>
-
+
-
+
$activated_time ) {
if ( is_wpmu_sitewide_plugin( $plugin_name ) )
unset( $inactive_plugins[ $plugin_name ] );
}
}
-
+
return $inactive_plugins;
}
add_filter( 'all_plugins', 'sitewide_filter_inactive_plugins_list' );
@@ -983,7 +983,7 @@ function sitewide_filter_active_plugins_list( $active_plugins ) {
foreach ( $active_sitewide_plugins as $sitewide_plugin => $activated_time ) {
unset( $active_plugins[ $sitewide_plugin ] );
}
-
+
return $active_plugins;
}
add_filter( 'all_plugins', 'sitewide_filter_active_plugins_list' );
@@ -996,12 +996,12 @@ add_filter( 'all_plugins', 'sitewide_filter_active_plugins_list' );
*/
function check_is_wpmu_plugin_on_activate() {
/***
- * On plugin activation on a blog level, check to see if this is actually a
+ * On plugin activation on a blog level, check to see if this is actually a
* site wide MU plugin. If so, deactivate and activate it site wide.
*/
if ( is_wpmu_sitewide_plugin( $_GET['plugin'] ) || isset( $_GET['sitewide'] ) ) {
deactivate_plugins( $_GET['plugin'], true );
-
+
/* Silently activate because the activate_* hook has already run. */
if ( is_site_admin() ) {
$_GET['sitewide'] = true;
@@ -1022,7 +1022,7 @@ function check_wpmu_plugins_on_bulk_activate( $plugins ) {
if ( is_site_admin() )
activate_sitewide_plugin( $plugin );
- }
+ }
}
}
}
@@ -1050,10 +1050,10 @@ function choose_primary_blog() {
$found = false;
?>
- userblog_id )
$found = true;
- ?>userblog_id ) echo ' selected="selected"' ?>>http://domain.$blog->path ?> userblog_id ) echo ' selected="selected"' ?>>http://domain.$blog->path ?>
-
" . __( 'Global Settings' ) . " ";
@@ -1165,7 +1165,7 @@ function blogs_listing() {
$rows[] = array_slice( $blogs, $split, $cols );
$split = $split + $cols;
}
-
+
foreach( $rows as $row ) {
$c = $c == "alternate" ? "" : "alternate";
echo " ";
@@ -1216,8 +1216,8 @@ function stripslashes_from_options( $blog_id ) {
while( $rows = $wpdb->get_results( "SELECT meta_key, meta_value FROM {$wpdb->sitemeta} ORDER BY meta_id LIMIT $start, 20" ) ) {
foreach( $rows as $row ) {
$value = $row->meta_value;
- if ( !@unserialize( $value ) )
- $value = stripslashes( $value );
+ if ( !@unserialize( $value ) )
+ $value = stripslashes( $value );
if ( $value !== $row->meta_value ) {
update_site_option( $row->meta_key, $value );
}
@@ -1230,8 +1230,8 @@ function stripslashes_from_options( $blog_id ) {
while( $rows = $wpdb->get_results( "SELECT option_name, option_value FROM $options_table ORDER BY option_id LIMIT $start, 20" ) ) {
foreach( $rows as $row ) {
$value = $row->option_value;
- if ( !@unserialize( $value ) )
- $value = stripslashes( $value );
+ if ( !@unserialize( $value ) )
+ $value = stripslashes( $value );
if ( $value !== $row->option_value ) {
update_blog_option( $blog_id, $row->option_name, $value );
}
diff --git a/wp-admin/ms-admin.php b/wp-admin/ms-admin.php
index 14e0b06df0..8c9eee14f2 100644
--- a/wp-admin/ms-admin.php
+++ b/wp-admin/ms-admin.php
@@ -30,7 +30,7 @@ $title = __( 'Site Admin' );
?>
-
+
|
@@ -44,9 +44,9 @@ $title = __( 'Site Admin' );