diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php
index bf04c22bce..f70996d79a 100644
--- a/wp-admin/includes/ajax-actions.php
+++ b/wp-admin/includes/ajax-actions.php
@@ -165,7 +165,7 @@ function wp_ajax_wp_compression_test() {
wp_die( -1 );
if ( ini_get('zlib.output_compression') || 'ob_gzhandler' == ini_get('output_handler') ) {
- update_site_option('can_compress_scripts', 0);
+ update_network_option( 'can_compress_scripts', 0 );
wp_die( 0 );
}
@@ -196,9 +196,9 @@ function wp_ajax_wp_compression_test() {
echo $out;
wp_die();
} elseif ( 'no' == $_GET['test'] ) {
- update_site_option('can_compress_scripts', 0);
+ update_network_option( 'can_compress_scripts', 0 );
} elseif ( 'yes' == $_GET['test'] ) {
- update_site_option('can_compress_scripts', 1);
+ update_network_option( 'can_compress_scripts', 1 );
}
}
diff --git a/wp-admin/includes/class-wp-plugins-list-table.php b/wp-admin/includes/class-wp-plugins-list-table.php
index 38b09e3c8c..ab1bb2a5ab 100644
--- a/wp-admin/includes/class-wp-plugins-list-table.php
+++ b/wp-admin/includes/class-wp-plugins-list-table.php
@@ -130,7 +130,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
set_transient( 'plugin_slugs', array_keys( $plugins['all'] ), DAY_IN_SECONDS );
if ( $screen->in_admin( 'network' ) ) {
- $recently_activated = get_site_option( 'recently_activated', array() );
+ $recently_activated = get_network_option( 'recently_activated', array() );
} else {
$recently_activated = get_option( 'recently_activated', array() );
}
@@ -142,7 +142,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
}
if ( $screen->in_admin( 'network' ) ) {
- update_site_option( 'recently_activated', $recently_activated );
+ update_network_option( 'recently_activated', $recently_activated );
} else {
update_option( 'recently_activated', $recently_activated );
}
diff --git a/wp-admin/includes/class-wp-themes-list-table.php b/wp-admin/includes/class-wp-themes-list-table.php
index e01e3d4636..66b98e80b2 100644
--- a/wp-admin/includes/class-wp-themes-list-table.php
+++ b/wp-admin/includes/class-wp-themes-list-table.php
@@ -102,7 +102,7 @@ class WP_Themes_List_Table extends WP_List_Table {
}
}
// Fallthrough.
- printf( __( 'Only the current theme is available to you. Contact the %s administrator for information about accessing additional themes.' ), get_site_option( 'site_name' ) );
+ printf( __( 'Only the current theme is available to you. Contact the %s administrator for information about accessing additional themes.' ), get_network_option( 'site_name' ) );
}
/**
diff --git a/wp-admin/includes/class-wp-upgrader.php b/wp-admin/includes/class-wp-upgrader.php
index ff25249a92..5b005ec30c 100644
--- a/wp-admin/includes/class-wp-upgrader.php
+++ b/wp-admin/includes/class-wp-upgrader.php
@@ -2368,7 +2368,7 @@ class Core_Upgrader extends WP_Upgrader {
if ( version_compare( $wp_version, $offered_ver, '>' ) )
return false;
- $failure_data = get_site_option( 'auto_core_update_failed' );
+ $failure_data = get_network_option( 'auto_core_update_failed' );
if ( $failure_data ) {
// If this was a critical update failure, cannot update.
if ( ! empty( $failure_data['critical'] ) )
@@ -2780,10 +2780,10 @@ class WP_Automatic_Updater {
* @param object $item The update offer.
*/
protected function send_core_update_notification_email( $item ) {
- $notified = get_site_option( 'auto_core_update_notified' );
+ $notified = get_network_option( 'auto_core_update_notified' );
// Don't notify if we've already notified the same email address of the same version.
- if ( $notified && $notified['email'] == get_site_option( 'admin_email' ) && $notified['version'] == $item->current )
+ if ( $notified && $notified['email'] == get_network_option( 'admin_email' ) && $notified['version'] == $item->current )
return false;
// See if we need to notify users of a core update.
@@ -3108,7 +3108,7 @@ class WP_Automatic_Updater {
$critical_data['rollback_code'] = $rollback_result->get_error_code();
$critical_data['rollback_data'] = $rollback_result->get_error_data();
}
- update_site_option( 'auto_core_update_failed', $critical_data );
+ update_network_option( 'auto_core_update_failed', $critical_data );
$this->send_email( 'critical', $core_update, $result );
return;
}
@@ -3126,17 +3126,17 @@ class WP_Automatic_Updater {
*/
$send = true;
$transient_failures = array( 'incompatible_archive', 'download_failed', 'insane_distro' );
- if ( in_array( $error_code, $transient_failures ) && ! get_site_option( 'auto_core_update_failed' ) ) {
+ if ( in_array( $error_code, $transient_failures ) && ! get_network_option( 'auto_core_update_failed' ) ) {
wp_schedule_single_event( time() + HOUR_IN_SECONDS, 'wp_maybe_auto_update' );
$send = false;
}
- $n = get_site_option( 'auto_core_update_notified' );
+ $n = get_network_option( 'auto_core_update_notified' );
// Don't notify if we've already notified the same email address of the same version of the same notification type.
- if ( $n && 'fail' == $n['type'] && $n['email'] == get_site_option( 'admin_email' ) && $n['version'] == $core_update->current )
+ if ( $n && 'fail' == $n['type'] && $n['email'] == get_network_option( 'admin_email' ) && $n['version'] == $core_update->current )
$send = false;
- update_site_option( 'auto_core_update_failed', array(
+ update_network_option( 'auto_core_update_failed', array(
'attempted' => $core_update->current,
'current' => $wp_version,
'error_code' => $error_code,
@@ -3162,9 +3162,9 @@ class WP_Automatic_Updater {
* @param mixed $result Optional. The result for the core update. Can be WP_Error.
*/
protected function send_email( $type, $core_update, $result = null ) {
- update_site_option( 'auto_core_update_notified', array(
+ update_network_option( 'auto_core_update_notified', array(
'type' => $type,
- 'email' => get_site_option( 'admin_email' ),
+ 'email' => get_network_option( 'admin_email' ),
'version' => $core_update->current,
'timestamp' => time(),
) );
@@ -3320,7 +3320,7 @@ class WP_Automatic_Updater {
$body .= "\n";
}
- $to = get_site_option( 'admin_email' );
+ $to = get_network_option( 'admin_email' );
$headers = '';
$email = compact( 'to', 'subject', 'body', 'headers' );
@@ -3494,7 +3494,7 @@ Thanks! -- The WordPress Team" ) );
}
$email = array(
- 'to' => get_site_option( 'admin_email' ),
+ 'to' => get_network_option( 'admin_email' ),
'subject' => $subject,
'body' => implode( "\n", $body ),
'headers' => ''
diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php
index b24b9a851e..6fa1ba17f6 100644
--- a/wp-admin/includes/dashboard.php
+++ b/wp-admin/includes/dashboard.php
@@ -1196,7 +1196,7 @@ function wp_dashboard_plugins_output( $rss, $args = array() ) {
* @return bool|null True if not multisite, user can't upload files, or the space check option is disabled.
*/
function wp_dashboard_quota() {
- if ( !is_multisite() || !current_user_can( 'upload_files' ) || get_site_option( 'upload_space_check_disabled' ) )
+ if ( !is_multisite() || !current_user_can( 'upload_files' ) || get_network_option( 'upload_space_check_disabled' ) )
return true;
$quota = get_space_allowed();
diff --git a/wp-admin/includes/ms.php b/wp-admin/includes/ms.php
index 2907d24735..0062a16ec2 100644
--- a/wp-admin/includes/ms.php
+++ b/wp-admin/includes/ms.php
@@ -16,7 +16,7 @@
* @return array $_FILES array with 'error' key set if file exceeds quota. 'error' is empty otherwise.
*/
function check_upload_size( $file ) {
- if ( get_site_option( 'upload_space_check_disabled' ) )
+ if ( get_network_option( 'upload_space_check_disabled' ) )
return $file;
if ( $file['error'] != '0' ) // there's already an error
@@ -30,8 +30,8 @@ function check_upload_size( $file ) {
$file_size = filesize( $file['tmp_name'] );
if ( $space_left < $file_size )
$file['error'] = sprintf( __( 'Not enough space to upload. %1$s KB needed.' ), number_format( ($file_size - $space_left) /1024 ) );
- if ( $file_size > ( 1024 * get_site_option( 'fileupload_maxk', 1500 ) ) )
- $file['error'] = sprintf(__('This file is too big. Files must be less than %1$s KB in size.'), get_site_option( 'fileupload_maxk', 1500 ) );
+ if ( $file_size > ( 1024 * get_network_option( 'fileupload_maxk', 1500 ) ) )
+ $file['error'] = sprintf(__('This file is too big. Files must be less than %1$s KB in size.'), get_network_option( 'fileupload_maxk', 1500 ) );
if ( upload_is_user_over_quota( false ) ) {
$file['error'] = __( 'You have used your space quota. Please delete files before uploading.' );
}
@@ -98,7 +98,7 @@ function wpmu_delete_blog( $blog_id, $drop = false ) {
$upload_path = trim( get_option( 'upload_path' ) );
// If ms_files_rewriting is enabled and upload_path is empty, wp_upload_dir is not reliable.
- if ( $drop && get_site_option( 'ms_files_rewriting' ) && empty( $upload_path ) ) {
+ if ( $drop && get_network_option( 'ms_files_rewriting' ) && empty( $upload_path ) ) {
$drop = false;
}
@@ -306,7 +306,7 @@ All at ###SITENAME###
$content = str_replace( '###USERNAME###', $current_user->user_login, $content );
$content = str_replace( '###ADMIN_URL###', esc_url( admin_url( 'options.php?adminhash='.$hash ) ), $content );
$content = str_replace( '###EMAIL###', $value, $content );
- $content = str_replace( '###SITENAME###', get_site_option( 'site_name' ), $content );
+ $content = str_replace( '###SITENAME###', get_network_option( 'site_name' ), $content );
$content = str_replace( '###SITEURL###', network_home_url(), $content );
wp_mail( $value, sprintf( __( '[%s] New Admin Email Address' ), wp_specialchars_decode( get_option( 'blogname' ) ) ), $content );
@@ -385,7 +385,7 @@ All at ###SITENAME###
$content = str_replace( '###USERNAME###', $current_user->user_login, $content );
$content = str_replace( '###ADMIN_URL###', esc_url( admin_url( 'profile.php?newuseremail='.$hash ) ), $content );
$content = str_replace( '###EMAIL###', $_POST['email'], $content);
- $content = str_replace( '###SITENAME###', get_site_option( 'site_name' ), $content );
+ $content = str_replace( '###SITENAME###', get_network_option( 'site_name' ), $content );
$content = str_replace( '###SITEURL###', network_home_url(), $content );
wp_mail( $_POST['email'], sprintf( __( '[%s] New Email Address' ), wp_specialchars_decode( get_option( 'blogname' ) ) ), $content );
@@ -413,7 +413,7 @@ function new_user_email_admin_notice() {
* @return bool True if user is over upload space quota, otherwise false.
*/
function upload_is_user_over_quota( $echo = true ) {
- if ( get_site_option( 'upload_space_check_disabled' ) )
+ if ( get_network_option( 'upload_space_check_disabled' ) )
return false;
$space_allowed = get_space_allowed();
@@ -746,7 +746,7 @@ function site_admin_notice() {
global $wp_db_version;
if ( !is_super_admin() )
return false;
- if ( get_site_option( 'wpmu_upgrade_site' ) != $wp_db_version )
+ if ( get_network_option( 'wpmu_upgrade_site' ) != $wp_db_version )
echo "
" . sprintf( __( 'Thank you for Updating! Please visit the Upgrade Network page to update all your sites.' ), esc_url( network_admin_url( 'upgrade.php' ) ) ) . "