From 54512d64cb38c51aa3808804455b2c02988ddce6 Mon Sep 17 00:00:00 2001 From: Jeremy Felt Date: Fri, 2 Oct 2015 19:08:26 +0000 Subject: [PATCH] MS: Use `*_network_option()` functions throughout core. Replaces all uses of `*_site_option()` with the corresponding "network" function. This excludes one usage in `wp-admin/admin-footer.php` that needs more investigation. Props spacedmonkey. See #28290. Built from https://develop.svn.wordpress.org/trunk@34778 git-svn-id: http://core.svn.wordpress.org/trunk@34743 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/ajax-actions.php | 6 +- .../includes/class-wp-plugins-list-table.php | 4 +- .../includes/class-wp-themes-list-table.php | 2 +- wp-admin/includes/class-wp-upgrader.php | 24 +++--- wp-admin/includes/dashboard.php | 2 +- wp-admin/includes/ms.php | 28 +++---- wp-admin/includes/network.php | 4 +- wp-admin/includes/plugin.php | 14 ++-- wp-admin/includes/schema.php | 6 +- wp-admin/includes/update-core.php | 4 +- wp-admin/includes/update.php | 12 +-- wp-admin/includes/upgrade.php | 48 ++++++------ wp-admin/network/settings.php | 48 ++++++------ wp-admin/network/site-new.php | 4 +- wp-admin/network/themes.php | 10 +-- wp-admin/network/upgrade.php | 4 +- wp-admin/options-writing.php | 2 +- wp-admin/options.php | 2 +- wp-admin/plugin-editor.php | 2 +- wp-admin/plugins.php | 14 ++-- wp-admin/user-edit.php | 2 +- wp-includes/capabilities-functions.php | 6 +- wp-includes/class-wp-theme.php | 2 +- wp-includes/default-constants.php | 2 +- wp-includes/functions.php | 6 +- wp-includes/l10n.php | 2 +- wp-includes/ms-default-constants.php | 2 +- wp-includes/ms-deprecated.php | 2 +- wp-includes/ms-functions.php | 74 +++++++++---------- wp-includes/ms-load.php | 4 +- wp-includes/ms-settings.php | 2 +- wp-includes/option.php | 26 +++---- wp-includes/pluggable.php | 8 +- wp-includes/script-loader.php | 4 +- wp-includes/user-functions.php | 2 +- wp-includes/version.php | 2 +- wp-signup.php | 4 +- 37 files changed, 195 insertions(+), 195 deletions(-) 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' ) ) ) . "
"; } @@ -828,7 +828,7 @@ function choose_primary_blog() { ?> - + user_login, $super_admins ) ) { $super_admins[] = $user->user_login; - update_site_option( 'site_admins' , $super_admins ); + update_network_option( 'site_admins' , $super_admins ); /** * Fires after the user is granted Super Admin privileges. @@ -917,13 +917,13 @@ function revoke_super_admin( $user_id ) { do_action( 'revoke_super_admin', $user_id ); // Directly fetch site_admins instead of using get_super_admins() - $super_admins = get_site_option( 'site_admins', array( 'admin' ) ); + $super_admins = get_network_option( 'site_admins', array( 'admin' ) ); $user = get_userdata( $user_id ); - if ( $user && 0 !== strcasecmp( $user->user_email, get_site_option( 'admin_email' ) ) ) { + if ( $user && 0 !== strcasecmp( $user->user_email, get_network_option( 'admin_email' ) ) ) { if ( false !== ( $key = array_search( $user->user_login, $super_admins ) ) ) { unset( $super_admins[$key] ); - update_site_option( 'site_admins', $super_admins ); + update_network_option( 'site_admins', $super_admins ); /** * Fires after the user's Super Admin privileges are revoked. diff --git a/wp-admin/includes/network.php b/wp-admin/includes/network.php index d0eb18dbf3..db3ea260f8 100644 --- a/wp-admin/includes/network.php +++ b/wp-admin/includes/network.php @@ -450,7 +450,7 @@ define('BLOG_ID_CURRENT_SITE', 1); '; - if ( is_multisite() && get_site_option( 'ms_files_rewriting' ) ) { + if ( is_multisite() && get_network_option( 'ms_files_rewriting' ) ) { $web_config_file .= ' @@ -506,7 +506,7 @@ define('BLOG_ID_CURRENT_SITE', 1); get_option( 'siteurl' ) . '/', 'add_new_users' => '0', - 'upload_space_check_disabled' => is_multisite() ? get_site_option( 'upload_space_check_disabled' ) : '1', + 'upload_space_check_disabled' => is_multisite() ? get_network_option( 'upload_space_check_disabled' ) : '1', 'subdomain_install' => intval( $subdomain_install ), 'global_terms_enabled' => global_terms_enabled() ? '1' : '0', - 'ms_files_rewriting' => is_multisite() ? get_site_option( 'ms_files_rewriting' ) : '0', + 'ms_files_rewriting' => is_multisite() ? get_network_option( 'ms_files_rewriting' ) : '0', 'initial_db_version' => get_option( 'initial_db_version' ), 'active_sitewide_plugins' => array(), 'WPLANG' => get_locale(), diff --git a/wp-admin/includes/update-core.php b/wp-admin/includes/update-core.php index 0de0ab33c9..b957e644c8 100644 --- a/wp-admin/includes/update-core.php +++ b/wp-admin/includes/update-core.php @@ -1102,8 +1102,8 @@ function update_core($from, $to) { do_action( '_core_updated_successfully', $wp_version ); // Clear the option that blocks auto updates after failures, now that we've been successful. - if ( function_exists( 'delete_site_option' ) ) - delete_site_option( 'auto_core_update_failed' ); + if ( function_exists( 'delete_network_option' ) ) + delete_network_option( 'auto_core_update_failed' ); return $wp_version; } diff --git a/wp-admin/includes/update.php b/wp-admin/includes/update.php index 6661d44afd..18a50a1810 100644 --- a/wp-admin/includes/update.php +++ b/wp-admin/includes/update.php @@ -29,7 +29,7 @@ function get_preferred_from_update_core() { */ function get_core_updates( $options = array() ) { $options = array_merge( array( 'available' => true, 'dismissed' => false ), $options ); - $dismissed = get_site_option( 'dismissed_update_core' ); + $dismissed = get_network_option( 'dismissed_update_core' ); if ( ! is_array( $dismissed ) ) $dismissed = array(); @@ -134,9 +134,9 @@ function get_core_checksums( $version, $locale ) { * @return bool */ function dismiss_core_update( $update ) { - $dismissed = get_site_option( 'dismissed_update_core' ); + $dismissed = get_network_option( 'dismissed_update_core' ); $dismissed[ $update->current . '|' . $update->locale ] = true; - return update_site_option( 'dismissed_update_core', $dismissed ); + return update_network_option( 'dismissed_update_core', $dismissed ); } /** @@ -146,14 +146,14 @@ function dismiss_core_update( $update ) { * @return bool */ function undismiss_core_update( $version, $locale ) { - $dismissed = get_site_option( 'dismissed_update_core' ); + $dismissed = get_network_option( 'dismissed_update_core' ); $key = $version . '|' . $locale; if ( ! isset( $dismissed[$key] ) ) return false; unset( $dismissed[$key] ); - return update_site_option( 'dismissed_update_core', $dismissed ); + return update_network_option( 'dismissed_update_core', $dismissed ); } /** @@ -478,7 +478,7 @@ function maintenance_nag() { global $upgrading; $nag = isset( $upgrading ); if ( ! $nag ) { - $failed = get_site_option( 'auto_core_update_failed' ); + $failed = get_network_option( 'auto_core_update_failed' ); /* * If an update failed critically, we may have copied over version.php but not other files. * In that case, if the install claims we're running the version we attempted, nag. diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php index cb53d2f4d1..cd321fa902 100644 --- a/wp-admin/includes/upgrade.php +++ b/wp-admin/includes/upgrade.php @@ -153,7 +153,7 @@ function wp_install_defaults( $user_id ) { $first_post_guid = get_option( 'home' ) . '/?p=1'; if ( is_multisite() ) { - $first_post = get_site_option( 'first_post' ); + $first_post = get_network_option( 'first_post' ); if ( empty($first_post) ) $first_post = __( 'Welcome to SITE_NAME. This is your first post. Edit or delete it, then start writing!' ); @@ -189,9 +189,9 @@ function wp_install_defaults( $user_id ) { $first_comment = __('Hi, this is a comment. To delete a comment, just log in and view the post's comments. There you will have the option to edit or delete them.'); if ( is_multisite() ) { - $first_comment_author = get_site_option( 'first_comment_author', $first_comment_author ); - $first_comment_url = get_site_option( 'first_comment_url', network_home_url() ); - $first_comment = get_site_option( 'first_comment', $first_comment ); + $first_comment_author = get_network_option( 'first_comment_author', $first_comment_author ); + $first_comment_url = get_network_option( 'first_comment_url', network_home_url() ); + $first_comment = get_network_option( 'first_comment', $first_comment ); } $wpdb->insert( $wpdb->comments, array( 'comment_post_ID' => 1, @@ -214,7 +214,7 @@ To delete a comment, just log in and view the post's comments. There you wi As a new WordPress user, you should go to your dashboard to delete this page and create new pages for your content. Have fun!" ), admin_url() ); if ( is_multisite() ) - $first_page = get_site_option( 'first_page', $first_page ); + $first_page = get_network_option( 'first_page', $first_page ); $first_post_guid = get_option('home') . '/?page_id=2'; $wpdb->insert( $wpdb->posts, array( 'post_author' => $user_id, @@ -1255,8 +1255,8 @@ function upgrade_300() { if ( $wp_current_db_version < 15093 ) populate_roles_300(); - if ( $wp_current_db_version < 14139 && is_multisite() && is_main_site() && ! defined( 'MULTISITE' ) && get_site_option( 'siteurl' ) === false ) - add_site_option( 'siteurl', '' ); + if ( $wp_current_db_version < 14139 && is_multisite() && is_main_site() && ! defined( 'MULTISITE' ) && get_network_option( 'siteurl' ) === false ) + add_network_option( 'siteurl', '' ); // 3.0 screen options key name changes. if ( wp_should_upgrade_global_tables() ) { @@ -1643,18 +1643,18 @@ function upgrade_network() { // 2.8. if ( $wp_current_db_version < 11549 ) { - $wpmu_sitewide_plugins = get_site_option( 'wpmu_sitewide_plugins' ); - $active_sitewide_plugins = get_site_option( 'active_sitewide_plugins' ); + $wpmu_sitewide_plugins = get_network_option( 'wpmu_sitewide_plugins' ); + $active_sitewide_plugins = get_network_option( 'active_sitewide_plugins' ); if ( $wpmu_sitewide_plugins ) { if ( !$active_sitewide_plugins ) $sitewide_plugins = (array) $wpmu_sitewide_plugins; else $sitewide_plugins = array_merge( (array) $active_sitewide_plugins, (array) $wpmu_sitewide_plugins ); - update_site_option( 'active_sitewide_plugins', $sitewide_plugins ); + update_network_option( 'active_sitewide_plugins', $sitewide_plugins ); } - delete_site_option( 'wpmu_sitewide_plugins' ); - delete_site_option( 'deactivated_sitewide_plugins' ); + delete_network_option( 'wpmu_sitewide_plugins' ); + delete_network_option( 'deactivated_sitewide_plugins' ); $start = 0; while( $rows = $wpdb->get_results( "SELECT meta_key, meta_value FROM {$wpdb->sitemeta} ORDER BY meta_id LIMIT $start, 20" ) ) { @@ -1663,7 +1663,7 @@ function upgrade_network() { if ( !@unserialize( $value ) ) $value = stripslashes( $value ); if ( $value !== $row->meta_value ) { - update_site_option( $row->meta_key, $value ); + update_network_option( $row->meta_key, $value ); } } $start += 20; @@ -1672,22 +1672,22 @@ function upgrade_network() { // 3.0 if ( $wp_current_db_version < 13576 ) - update_site_option( 'global_terms_enabled', '1' ); + update_network_option( 'global_terms_enabled', '1' ); // 3.3 if ( $wp_current_db_version < 19390 ) - update_site_option( 'initial_db_version', $wp_current_db_version ); + update_network_option( 'initial_db_version', $wp_current_db_version ); if ( $wp_current_db_version < 19470 ) { - if ( false === get_site_option( 'active_sitewide_plugins' ) ) - update_site_option( 'active_sitewide_plugins', array() ); + if ( false === get_network_option( 'active_sitewide_plugins' ) ) + update_network_option( 'active_sitewide_plugins', array() ); } // 3.4 if ( $wp_current_db_version < 20148 ) { // 'allowedthemes' keys things by stylesheet. 'allowed_themes' keyed things by name. - $allowedthemes = get_site_option( 'allowedthemes' ); - $allowed_themes = get_site_option( 'allowed_themes' ); + $allowedthemes = get_network_option( 'allowedthemes' ); + $allowed_themes = get_network_option( 'allowed_themes' ); if ( false === $allowedthemes && is_array( $allowed_themes ) && $allowed_themes ) { $converted = array(); $themes = wp_get_themes(); @@ -1695,22 +1695,22 @@ function upgrade_network() { if ( isset( $allowed_themes[ $theme_data->get('Name') ] ) ) $converted[ $stylesheet ] = true; } - update_site_option( 'allowedthemes', $converted ); - delete_site_option( 'allowed_themes' ); + update_network_option( 'allowedthemes', $converted ); + delete_network_option( 'allowed_themes' ); } } // 3.5 if ( $wp_current_db_version < 21823 ) - update_site_option( 'ms_files_rewriting', '1' ); + update_network_option( 'ms_files_rewriting', '1' ); // 3.5.2 if ( $wp_current_db_version < 24448 ) { - $illegal_names = get_site_option( 'illegal_names' ); + $illegal_names = get_network_option( 'illegal_names' ); if ( is_array( $illegal_names ) && count( $illegal_names ) === 1 ) { $illegal_name = reset( $illegal_names ); $illegal_names = explode( ' ', $illegal_name ); - update_site_option( 'illegal_names', $illegal_names ); + update_network_option( 'illegal_names', $illegal_names ); } } diff --git a/wp-admin/network/settings.php b/wp-admin/network/settings.php index 614499f258..9bcaf05084 100644 --- a/wp-admin/network/settings.php +++ b/wp-admin/network/settings.php @@ -76,7 +76,7 @@ if ( $_POST ) { if ( ! isset($_POST[$option_name]) ) continue; $value = wp_unslash( $_POST[$option_name] ); - update_site_option( $option_name, $value ); + update_network_option( $option_name, $value ); } /** @@ -113,7 +113,7 @@ if ( isset( $_GET['updated'] ) ) { - +

@@ -125,9 +125,9 @@ if ( isset( $_GET['updated'] ) ) {
@@ -146,25 +146,25 @@ if ( isset( $_GET['updated'] ) ) { - + - + - " size="45" /> + " size="45" />

@@ -174,7 +174,7 @@ if ( isset( $_GET['updated'] ) ) { - @@ -188,7 +188,7 @@ if ( isset( $_GET['updated'] ) ) { +

@@ -203,7 +203,7 @@ if ( isset( $_GET['updated'] ) ) { +

@@ -213,7 +213,7 @@ if ( isset( $_GET['updated'] ) ) { +

@@ -223,7 +223,7 @@ if ( isset( $_GET['updated'] ) ) { +

@@ -233,7 +233,7 @@ if ( isset( $_GET['updated'] ) ) { +

@@ -243,7 +243,7 @@ if ( isset( $_GET['updated'] ) ) { +

@@ -252,7 +252,7 @@ if ( isset( $_GET['updated'] ) ) { - +

@@ -261,7 +261,7 @@ if ( isset( $_GET['updated'] ) ) { - +

@@ -273,7 +273,7 @@ if ( isset( $_GET['updated'] ) ) { -