WordPress.org

Make WordPress Core

Ticket #28290: 28290.2b.patch

File 28290.2b.patch, 70.6 KB (added by spacedmonkey, 4 years ago)

Function name changes

  • wp-admin/admin-footer.php

    diff --git a/wp-admin/admin-footer.php b/wp-admin/admin-footer.php
    index a99eaba..aa82fa0 100644
    a b do_action( 'admin_print_footer_scripts' ); 
    8686 */
    8787do_action( "admin_footer-" . $GLOBALS['hook_suffix'] );
    8888
    89 // get_site_option() won't exist when auto upgrading from <= 2.7
    90 if ( function_exists('get_site_option') ) {
    91         if ( false === get_site_option('can_compress_scripts') )
     89// get_network_option() won't exist when auto upgrading from <= 2.7
     90if ( function_exists( 'get_network_option' ) ) {
     91        if ( false === get_network_option('can_compress_scripts') )
    9292                compression_test();
    9393}
    9494
  • wp-admin/includes/ajax-actions.php

    diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php
    index 289d959..38e349f 100644
    a b function wp_ajax_wp_compression_test() { 
    165165                wp_die( -1 );
    166166
    167167        if ( ini_get('zlib.output_compression') || 'ob_gzhandler' == ini_get('output_handler') ) {
    168                 update_site_option('can_compress_scripts', 0);
     168                update_network_option('can_compress_scripts', 0);
    169169                wp_die( 0 );
    170170        }
    171171
    function wp_ajax_wp_compression_test() { 
    196196                        echo $out;
    197197                        wp_die();
    198198                } elseif ( 'no' == $_GET['test'] ) {
    199                         update_site_option('can_compress_scripts', 0);
     199                        update_network_option('can_compress_scripts', 0);
    200200                } elseif ( 'yes' == $_GET['test'] ) {
    201                         update_site_option('can_compress_scripts', 1);
     201                        update_network_option('can_compress_scripts', 1);
    202202                }
    203203        }
    204204
  • wp-admin/includes/class-wp-themes-list-table.php

    diff --git a/wp-admin/includes/class-wp-themes-list-table.php b/wp-admin/includes/class-wp-themes-list-table.php
    index e01e3d4..66b98e8 100644
    a b class WP_Themes_List_Table extends WP_List_Table { 
    102102                        }
    103103                }
    104104                // Fallthrough.
    105                 printf( __( 'Only the current theme is available to you. Contact the %s administrator for information about accessing additional themes.' ), get_site_option( 'site_name' ) );
     105                printf( __( 'Only the current theme is available to you. Contact the %s administrator for information about accessing additional themes.' ), get_network_option( 'site_name' ) );
    106106        }
    107107
    108108        /**
  • wp-admin/includes/class-wp-upgrader.php

    diff --git a/wp-admin/includes/class-wp-upgrader.php b/wp-admin/includes/class-wp-upgrader.php
    index 91966a7..c4a809c 100644
    a b class Core_Upgrader extends WP_Upgrader { 
    23452345                if ( version_compare( $wp_version, $offered_ver, '>' ) )
    23462346                        return false;
    23472347
    2348                 $failure_data = get_site_option( 'auto_core_update_failed' );
     2348                $failure_data = get_network_option( 'auto_core_update_failed' );
    23492349                if ( $failure_data ) {
    23502350                        // If this was a critical update failure, cannot update.
    23512351                        if ( ! empty( $failure_data['critical'] ) )
    class WP_Automatic_Updater { 
    27582758         * @param object $item The update offer.
    27592759         */
    27602760        protected function send_core_update_notification_email( $item ) {
    2761                 $notified = get_site_option( 'auto_core_update_notified' );
     2761                $notified = get_network_option( 'auto_core_update_notified' );
    27622762
    27632763                // Don't notify if we've already notified the same email address of the same version.
    2764                 if ( $notified && $notified['email'] == get_site_option( 'admin_email' ) && $notified['version'] == $item->current )
     2764                if ( $notified && $notified['email'] == get_network_option( 'admin_email' ) && $notified['version'] == $item->current )
    27652765                        return false;
    27662766
    27672767                // See if we need to notify users of a core update.
    class WP_Automatic_Updater { 
    30863086                                $critical_data['rollback_code'] = $rollback_result->get_error_code();
    30873087                                $critical_data['rollback_data'] = $rollback_result->get_error_data();
    30883088                        }
    3089                         update_site_option( 'auto_core_update_failed', $critical_data );
     3089                        update_network_option( 'auto_core_update_failed', $critical_data );
    30903090                        $this->send_email( 'critical', $core_update, $result );
    30913091                        return;
    30923092                }
    class WP_Automatic_Updater { 
    31043104                 */
    31053105                $send = true;
    31063106                $transient_failures = array( 'incompatible_archive', 'download_failed', 'insane_distro' );
    3107                 if ( in_array( $error_code, $transient_failures ) && ! get_site_option( 'auto_core_update_failed' ) ) {
     3107                if ( in_array( $error_code, $transient_failures ) && ! get_network_option( 'auto_core_update_failed' ) ) {
    31083108                        wp_schedule_single_event( time() + HOUR_IN_SECONDS, 'wp_maybe_auto_update' );
    31093109                        $send = false;
    31103110                }
    31113111
    3112                 $n = get_site_option( 'auto_core_update_notified' );
     3112                $n = get_network_option( 'auto_core_update_notified' );
    31133113                // Don't notify if we've already notified the same email address of the same version of the same notification type.
    3114                 if ( $n && 'fail' == $n['type'] && $n['email'] == get_site_option( 'admin_email' ) && $n['version'] == $core_update->current )
     3114                if ( $n && 'fail' == $n['type'] && $n['email'] == get_network_option( 'admin_email' ) && $n['version'] == $core_update->current )
    31153115                        $send = false;
    31163116
    3117                 update_site_option( 'auto_core_update_failed', array(
     3117                update_network_option( 'auto_core_update_failed', array(
    31183118                        'attempted'  => $core_update->current,
    31193119                        'current'    => $wp_version,
    31203120                        'error_code' => $error_code,
    class WP_Automatic_Updater { 
    31403140         * @param mixed  $result      Optional. The result for the core update. Can be WP_Error.
    31413141         */
    31423142        protected function send_email( $type, $core_update, $result = null ) {
    3143                 update_site_option( 'auto_core_update_notified', array(
     3143                update_network_option( 'auto_core_update_notified', array(
    31443144                        'type'      => $type,
    3145                         'email'     => get_site_option( 'admin_email' ),
     3145                        'email'     => get_network_option( 'admin_email' ),
    31463146                        'version'   => $core_update->current,
    31473147                        'timestamp' => time(),
    31483148                ) );
    class WP_Automatic_Updater { 
    32983298                        $body .= "\n";
    32993299                }
    33003300
    3301                 $to  = get_site_option( 'admin_email' );
     3301                $to  = get_network_option( 'admin_email' );
    33023302                $headers = '';
    33033303
    33043304                $email = compact( 'to', 'subject', 'body', 'headers' );
    Thanks! -- The WordPress Team" ) ); 
    34503450                }
    34513451
    34523452                $email = array(
    3453                         'to'      => get_site_option( 'admin_email' ),
     3453                        'to'      => get_network_option( 'admin_email' ),
    34543454                        'subject' => $subject,
    34553455                        'body'    => implode( "\n", $body ),
    34563456                        'headers' => ''
  • wp-admin/includes/dashboard.php

    diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php
    index 806f6d9..66a78e5 100644
    a b function wp_dashboard_plugins_output( $rss, $args = array() ) { 
    11931193 * @return bool|null True if not multisite, user can't upload files, or the space check option is disabled.
    11941194*/
    11951195function wp_dashboard_quota() {
    1196         if ( !is_multisite() || !current_user_can( 'upload_files' ) || get_site_option( 'upload_space_check_disabled' ) )
     1196        if ( !is_multisite() || !current_user_can( 'upload_files' ) || get_network_option( 'upload_space_check_disabled' ) )
    11971197                return true;
    11981198
    11991199        $quota = get_space_allowed();
  • wp-admin/includes/ms.php

    diff --git a/wp-admin/includes/ms.php b/wp-admin/includes/ms.php
    index 2907d24..0062a16 100644
    a b  
    1616 * @return array $_FILES array with 'error' key set if file exceeds quota. 'error' is empty otherwise.
    1717 */
    1818function check_upload_size( $file ) {
    19         if ( get_site_option( 'upload_space_check_disabled' ) )
     19        if ( get_network_option( 'upload_space_check_disabled' ) )
    2020                return $file;
    2121
    2222        if ( $file['error'] != '0' ) // there's already an error
    function check_upload_size( $file ) { 
    3030        $file_size = filesize( $file['tmp_name'] );
    3131        if ( $space_left < $file_size )
    3232                $file['error'] = sprintf( __( 'Not enough space to upload. %1$s KB needed.' ), number_format( ($file_size - $space_left) /1024 ) );
    33         if ( $file_size > ( 1024 * get_site_option( 'fileupload_maxk', 1500 ) ) )
    34                 $file['error'] = sprintf(__('This file is too big. Files must be less than %1$s KB in size.'), get_site_option( 'fileupload_maxk', 1500 ) );
     33        if ( $file_size > ( 1024 * get_network_option( 'fileupload_maxk', 1500 ) ) )
     34                $file['error'] = sprintf(__('This file is too big. Files must be less than %1$s KB in size.'), get_network_option( 'fileupload_maxk', 1500 ) );
    3535        if ( upload_is_user_over_quota( false ) ) {
    3636                $file['error'] = __( 'You have used your space quota. Please delete files before uploading.' );
    3737        }
    function wpmu_delete_blog( $blog_id, $drop = false ) { 
    9898        $upload_path = trim( get_option( 'upload_path' ) );
    9999
    100100        // If ms_files_rewriting is enabled and upload_path is empty, wp_upload_dir is not reliable.
    101         if ( $drop && get_site_option( 'ms_files_rewriting' ) && empty( $upload_path ) ) {
     101        if ( $drop && get_network_option( 'ms_files_rewriting' ) && empty( $upload_path ) ) {
    102102                $drop = false;
    103103        }
    104104
    All at ###SITENAME### 
    306306        $content = str_replace( '###USERNAME###', $current_user->user_login, $content );
    307307        $content = str_replace( '###ADMIN_URL###', esc_url( admin_url( 'options.php?adminhash='.$hash ) ), $content );
    308308        $content = str_replace( '###EMAIL###', $value, $content );
    309         $content = str_replace( '###SITENAME###', get_site_option( 'site_name' ), $content );
     309        $content = str_replace( '###SITENAME###', get_network_option( 'site_name' ), $content );
    310310        $content = str_replace( '###SITEURL###', network_home_url(), $content );
    311311
    312312        wp_mail( $value, sprintf( __( '[%s] New Admin Email Address' ), wp_specialchars_decode( get_option( 'blogname' ) ) ), $content );
    All at ###SITENAME### 
    385385                $content = str_replace( '###USERNAME###', $current_user->user_login, $content );
    386386                $content = str_replace( '###ADMIN_URL###', esc_url( admin_url( 'profile.php?newuseremail='.$hash ) ), $content );
    387387                $content = str_replace( '###EMAIL###', $_POST['email'], $content);
    388                 $content = str_replace( '###SITENAME###', get_site_option( 'site_name' ), $content );
     388                $content = str_replace( '###SITENAME###', get_network_option( 'site_name' ), $content );
    389389                $content = str_replace( '###SITEURL###', network_home_url(), $content );
    390390
    391391                wp_mail( $_POST['email'], sprintf( __( '[%s] New Email Address' ), wp_specialchars_decode( get_option( 'blogname' ) ) ), $content );
    function new_user_email_admin_notice() { 
    413413 * @return bool True if user is over upload space quota, otherwise false.
    414414 */
    415415function upload_is_user_over_quota( $echo = true ) {
    416         if ( get_site_option( 'upload_space_check_disabled' ) )
     416        if ( get_network_option( 'upload_space_check_disabled' ) )
    417417                return false;
    418418
    419419        $space_allowed = get_space_allowed();
    function site_admin_notice() { 
    746746        global $wp_db_version;
    747747        if ( !is_super_admin() )
    748748                return false;
    749         if ( get_site_option( 'wpmu_upgrade_site' ) != $wp_db_version )
     749        if ( get_network_option( 'wpmu_upgrade_site' ) != $wp_db_version )
    750750                echo "<div class='update-nag'>" . sprintf( __( 'Thank you for Updating! Please visit the <a href="%s">Upgrade Network</a> page to update all your sites.' ), esc_url( network_admin_url( 'upgrade.php' ) ) ) . "</div>";
    751751}
    752752
    function choose_primary_blog() { 
    828828                ?>
    829829                </td>
    830830        </tr>
    831         <?php if ( in_array( get_site_option( 'registration' ), array( 'all', 'blog' ) ) ) : ?>
     831        <?php if ( in_array( get_network_option( 'registration' ), array( 'all', 'blog' ) ) ) : ?>
    832832                <tr>
    833833                        <th scope="row" colspan="2" class="th-full">
    834834                                <?php
    function grant_super_admin( $user_id ) { 
    870870        do_action( 'grant_super_admin', $user_id );
    871871
    872872        // Directly fetch site_admins instead of using get_super_admins()
    873         $super_admins = get_site_option( 'site_admins', array( 'admin' ) );
     873        $super_admins = get_network_option( 'site_admins', array( 'admin' ) );
    874874
    875875        $user = get_userdata( $user_id );
    876876        if ( $user && ! in_array( $user->user_login, $super_admins ) ) {
    877877                $super_admins[] = $user->user_login;
    878                 update_site_option( 'site_admins' , $super_admins );
     878                update_network_option( 'site_admins' , $super_admins );
    879879
    880880                /**
    881881                 * Fires after the user is granted Super Admin privileges.
    function revoke_super_admin( $user_id ) { 
    917917        do_action( 'revoke_super_admin', $user_id );
    918918
    919919        // Directly fetch site_admins instead of using get_super_admins()
    920         $super_admins = get_site_option( 'site_admins', array( 'admin' ) );
     920        $super_admins = get_network_option( 'site_admins', array( 'admin' ) );
    921921
    922922        $user = get_userdata( $user_id );
    923         if ( $user && 0 !== strcasecmp( $user->user_email, get_site_option( 'admin_email' ) ) ) {
     923        if ( $user && 0 !== strcasecmp( $user->user_email, get_network_option( 'admin_email' ) ) ) {
    924924                if ( false !== ( $key = array_search( $user->user_login, $super_admins ) ) ) {
    925925                        unset( $super_admins[$key] );
    926                         update_site_option( 'site_admins', $super_admins );
     926                        update_network_option( 'site_admins', $super_admins );
    927927
    928928                        /**
    929929                         * Fires after the user's Super Admin privileges are revoked.
  • wp-admin/includes/network.php

    diff --git a/wp-admin/includes/network.php b/wp-admin/includes/network.php
    index d0eb18d..db3ea26 100644
    a b define('BLOG_ID_CURRENT_SITE', 1); 
    450450                    <match url="^index\.php$" ignoreCase="false" />
    451451                    <action type="None" />
    452452                </rule>';
    453                                 if ( is_multisite() && get_site_option( 'ms_files_rewriting' ) ) {
     453                                if ( is_multisite() && get_network_option( 'ms_files_rewriting' ) ) {
    454454                                        $web_config_file .= '
    455455                <rule name="WordPress Rule for Files" stopProcessing="true">
    456456                    <match url="^' . $iis_subdir_match . 'files/(.+)" ignoreCase="false" />
    define('BLOG_ID_CURRENT_SITE', 1); 
    506506        <?php else : // end iis7_supports_permalinks(). construct an htaccess file instead:
    507507
    508508                $ms_files_rewriting = '';
    509                 if ( is_multisite() && get_site_option( 'ms_files_rewriting' ) ) {
     509                if ( is_multisite() && get_network_option( 'ms_files_rewriting' ) ) {
    510510                        $ms_files_rewriting = "\n# uploaded files\nRewriteRule ^";
    511511                        $ms_files_rewriting .= $subdir_match . "files/(.+) {$rewrite_base}" . WPINC . "/ms-files.php?file={$subdir_replacement_12} [L]" . "\n";
    512512                }
  • wp-admin/includes/plugin.php

    diff --git a/wp-admin/includes/plugin.php b/wp-admin/includes/plugin.php
    index ca03f93..57c96b7 100644
    a b function is_plugin_active_for_network( $plugin ) { 
    466466        if ( !is_multisite() )
    467467                return false;
    468468
    469         $plugins = get_site_option( 'active_sitewide_plugins');
     469        $plugins = get_network_option( 'active_sitewide_plugins');
    470470        if ( isset($plugins[$plugin]) )
    471471                return true;
    472472
    function activate_plugin( $plugin, $redirect = '', $network_wide = false, $silen 
    524524
    525525        if ( is_multisite() && ( $network_wide || is_network_only_plugin($plugin) ) ) {
    526526                $network_wide = true;
    527                 $current = get_site_option( 'active_sitewide_plugins', array() );
     527                $current = get_network_option( 'active_sitewide_plugins', array() );
    528528                $_GET['networkwide'] = 1; // Back compat for plugins looking for this value.
    529529        } else {
    530530                $current = get_option( 'active_plugins', array() );
    function activate_plugin( $plugin, $redirect = '', $network_wide = false, $silen 
    577577                }
    578578
    579579                if ( $network_wide ) {
    580                         $current = get_site_option( 'active_sitewide_plugins', array() );
     580                        $current = get_network_option( 'active_sitewide_plugins', array() );
    581581                        $current[$plugin] = time();
    582                         update_site_option( 'active_sitewide_plugins', $current );
     582                        update_network_option( 'active_sitewide_plugins', $current );
    583583                } else {
    584584                        $current = get_option( 'active_plugins', array() );
    585585                        $current[] = $plugin;
    function activate_plugin( $plugin, $redirect = '', $network_wide = false, $silen 
    628628 */
    629629function deactivate_plugins( $plugins, $silent = false, $network_wide = null ) {
    630630        if ( is_multisite() )
    631                 $network_current = get_site_option( 'active_sitewide_plugins', array() );
     631                $network_current = get_network_option( 'active_sitewide_plugins', array() );
    632632        $current = get_option( 'active_plugins', array() );
    633633        $do_blog = $do_network = false;
    634634
    function deactivate_plugins( $plugins, $silent = false, $network_wide = null ) { 
    709709        if ( $do_blog )
    710710                update_option('active_plugins', $current);
    711711        if ( $do_network )
    712                 update_site_option( 'active_sitewide_plugins', $network_current );
     712                update_network_option( 'active_sitewide_plugins', $network_current );
    713713}
    714714
    715715/**
    function validate_active_plugins() { 
    881881        }
    882882
    883883        if ( is_multisite() && current_user_can( 'manage_network_plugins' ) ) {
    884                 $network_plugins = (array) get_site_option( 'active_sitewide_plugins', array() );
     884                $network_plugins = (array) get_network_option( 'active_sitewide_plugins', array() );
    885885                $plugins = array_merge( $plugins, array_keys( $network_plugins ) );
    886886        }
    887887
  • wp-admin/includes/schema.php

    diff --git a/wp-admin/includes/schema.php b/wp-admin/includes/schema.php
    index dd36834..1912f35 100644
    a b function populate_network( $network_id = 1, $domain = '', $email = '', $site_nam 
    927927                        }
    928928                }
    929929        } else {
    930                 $site_admins = get_site_option( 'site_admins' );
     930                $site_admins = get_network_option( 'site_admins' );
    931931        }
    932932
    933933        /* translators: Do not translate USERNAME, SITE_NAME, BLOG_URL, PASSWORD: those are placeholders. */
    We hope you enjoy your new site. Thanks! 
    977977                // @todo - network admins should have a method of editing the network siteurl (used for cookie hash)
    978978                'siteurl' => get_option( 'siteurl' ) . '/',
    979979                'add_new_users' => '0',
    980                 'upload_space_check_disabled' => is_multisite() ? get_site_option( 'upload_space_check_disabled' ) : '1',
     980                'upload_space_check_disabled' => is_multisite() ? get_network_option( 'upload_space_check_disabled' ) : '1',
    981981                'subdomain_install' => intval( $subdomain_install ),
    982982                'global_terms_enabled' => global_terms_enabled() ? '1' : '0',
    983                 'ms_files_rewriting' => is_multisite() ? get_site_option( 'ms_files_rewriting' ) : '0',
     983                'ms_files_rewriting' => is_multisite() ? get_network_option( 'ms_files_rewriting' ) : '0',
    984984                'initial_db_version' => get_option( 'initial_db_version' ),
    985985                'active_sitewide_plugins' => array(),
    986986                'WPLANG' => get_locale(),
  • wp-admin/includes/update-core.php

    diff --git a/wp-admin/includes/update-core.php b/wp-admin/includes/update-core.php
    index ac1ac37..130c6de 100644
    a b function update_core($from, $to) { 
    11021102        do_action( '_core_updated_successfully', $wp_version );
    11031103
    11041104        // Clear the option that blocks auto updates after failures, now that we've been successful.
    1105         if ( function_exists( 'delete_site_option' ) )
    1106                 delete_site_option( 'auto_core_update_failed' );
     1105        if ( function_exists( 'delete_network_option' ) )
     1106                delete_network_option( 'auto_core_update_failed' );
    11071107
    11081108        return $wp_version;
    11091109}
  • wp-admin/includes/update.php

    diff --git a/wp-admin/includes/update.php b/wp-admin/includes/update.php
    index 6661d44..18a50a1 100644
    a b function get_preferred_from_update_core() { 
    2929 */
    3030function get_core_updates( $options = array() ) {
    3131        $options = array_merge( array( 'available' => true, 'dismissed' => false ), $options );
    32         $dismissed = get_site_option( 'dismissed_update_core' );
     32        $dismissed = get_network_option( 'dismissed_update_core' );
    3333
    3434        if ( ! is_array( $dismissed ) )
    3535                $dismissed = array();
    function get_core_checksums( $version, $locale ) { 
    134134 * @return bool
    135135 */
    136136function dismiss_core_update( $update ) {
    137         $dismissed = get_site_option( 'dismissed_update_core' );
     137        $dismissed = get_network_option( 'dismissed_update_core' );
    138138        $dismissed[ $update->current . '|' . $update->locale ] = true;
    139         return update_site_option( 'dismissed_update_core', $dismissed );
     139        return update_network_option( 'dismissed_update_core', $dismissed );
    140140}
    141141
    142142/**
    function dismiss_core_update( $update ) { 
    146146 * @return bool
    147147 */
    148148function undismiss_core_update( $version, $locale ) {
    149         $dismissed = get_site_option( 'dismissed_update_core' );
     149        $dismissed = get_network_option( 'dismissed_update_core' );
    150150        $key = $version . '|' . $locale;
    151151
    152152        if ( ! isset( $dismissed[$key] ) )
    153153                return false;
    154154
    155155        unset( $dismissed[$key] );
    156         return update_site_option( 'dismissed_update_core', $dismissed );
     156        return update_network_option( 'dismissed_update_core', $dismissed );
    157157}
    158158
    159159/**
    function maintenance_nag() { 
    478478        global $upgrading;
    479479        $nag = isset( $upgrading );
    480480        if ( ! $nag ) {
    481                 $failed = get_site_option( 'auto_core_update_failed' );
     481                $failed = get_network_option( 'auto_core_update_failed' );
    482482                /*
    483483                 * If an update failed critically, we may have copied over version.php but not other files.
    484484                 * In that case, if the install claims we're running the version we attempted, nag.
  • wp-admin/includes/upgrade.php

    diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php
    index 967cfe3..724d979 100644
    a b function wp_install_defaults( $user_id ) { 
    153153        $first_post_guid = get_option( 'home' ) . '/?p=1';
    154154
    155155        if ( is_multisite() ) {
    156                 $first_post = get_site_option( 'first_post' );
     156                $first_post = get_network_option( 'first_post' );
    157157
    158158                if ( empty($first_post) )
    159159                        $first_post = __( 'Welcome to <a href="SITE_URL">SITE_NAME</a>. This is your first post. Edit or delete it, then start writing!' );
    function wp_install_defaults( $user_id ) { 
    189189        $first_comment = __('Hi, this is a comment.
    190190To delete a comment, just log in and view the post&#039;s comments. There you will have the option to edit or delete them.');
    191191        if ( is_multisite() ) {
    192                 $first_comment_author = get_site_option( 'first_comment_author', $first_comment_author );
    193                 $first_comment_url = get_site_option( 'first_comment_url', network_home_url() );
    194                 $first_comment = get_site_option( 'first_comment', $first_comment );
     192                $first_comment_author = get_network_option( 'first_comment_author', $first_comment_author );
     193                $first_comment_url = get_network_option( 'first_comment_url', network_home_url() );
     194                $first_comment = get_network_option( 'first_comment', $first_comment );
    195195        }
    196196        $wpdb->insert( $wpdb->comments, array(
    197197                'comment_post_ID' => 1,
    To delete a comment, just log in and view the post&#039;s comments. There you wi 
    214214
    215215As a new WordPress user, you should go to <a href=\"%s\">your dashboard</a> to delete this page and create new pages for your content. Have fun!" ), admin_url() );
    216216        if ( is_multisite() )
    217                 $first_page = get_site_option( 'first_page', $first_page );
     217                $first_page = get_network_option( 'first_page', $first_page );
    218218        $first_post_guid = get_option('home') . '/?page_id=2';
    219219        $wpdb->insert( $wpdb->posts, array(
    220220                'post_author' => $user_id,
    function upgrade_300() { 
    12551255        if ( $wp_current_db_version < 15093 )
    12561256                populate_roles_300();
    12571257
    1258         if ( $wp_current_db_version < 14139 && is_multisite() && is_main_site() && ! defined( 'MULTISITE' ) && get_site_option( 'siteurl' ) === false )
    1259                 add_site_option( 'siteurl', '' );
     1258        if ( $wp_current_db_version < 14139 && is_multisite() && is_main_site() && ! defined( 'MULTISITE' ) && get_network_option( 'siteurl' ) === false )
     1259                add_network_option( 'siteurl', '' );
    12601260
    12611261        // 3.0 screen options key name changes.
    12621262        if ( wp_should_upgrade_global_tables() ) {
    function upgrade_network() { 
    16431643
    16441644        // 2.8.
    16451645        if ( $wp_current_db_version < 11549 ) {
    1646                 $wpmu_sitewide_plugins = get_site_option( 'wpmu_sitewide_plugins' );
    1647                 $active_sitewide_plugins = get_site_option( 'active_sitewide_plugins' );
     1646                $wpmu_sitewide_plugins = get_network_option( 'wpmu_sitewide_plugins' );
     1647                $active_sitewide_plugins = get_network_option( 'active_sitewide_plugins' );
    16481648                if ( $wpmu_sitewide_plugins ) {
    16491649                        if ( !$active_sitewide_plugins )
    16501650                                $sitewide_plugins = (array) $wpmu_sitewide_plugins;
    16511651                        else
    16521652                                $sitewide_plugins = array_merge( (array) $active_sitewide_plugins, (array) $wpmu_sitewide_plugins );
    16531653
    1654                         update_site_option( 'active_sitewide_plugins', $sitewide_plugins );
     1654                        update_network_option( 'active_sitewide_plugins', $sitewide_plugins );
    16551655                }
    1656                 delete_site_option( 'wpmu_sitewide_plugins' );
    1657                 delete_site_option( 'deactivated_sitewide_plugins' );
     1656                delete_network_option( 'wpmu_sitewide_plugins' );
     1657                delete_network_option( 'deactivated_sitewide_plugins' );
    16581658
    16591659                $start = 0;
    16601660                while( $rows = $wpdb->get_results( "SELECT meta_key, meta_value FROM {$wpdb->sitemeta} ORDER BY meta_id LIMIT $start, 20" ) ) {
    function upgrade_network() { 
    16631663                                if ( !@unserialize( $value ) )
    16641664                                        $value = stripslashes( $value );
    16651665                                if ( $value !== $row->meta_value ) {
    1666                                         update_site_option( $row->meta_key, $value );
     1666                                        update_network_option( $row->meta_key, $value );
    16671667                                }
    16681668                        }
    16691669                        $start += 20;
    function upgrade_network() { 
    16721672
    16731673        // 3.0
    16741674        if ( $wp_current_db_version < 13576 )
    1675                 update_site_option( 'global_terms_enabled', '1' );
     1675                update_network_option( 'global_terms_enabled', '1' );
    16761676
    16771677        // 3.3
    16781678        if ( $wp_current_db_version < 19390 )
    1679                 update_site_option( 'initial_db_version', $wp_current_db_version );
     1679                update_network_option( 'initial_db_version', $wp_current_db_version );
    16801680
    16811681        if ( $wp_current_db_version < 19470 ) {
    1682                 if ( false === get_site_option( 'active_sitewide_plugins' ) )
    1683                         update_site_option( 'active_sitewide_plugins', array() );
     1682                if ( false === get_network_option( 'active_sitewide_plugins' ) )
     1683                        update_network_option( 'active_sitewide_plugins', array() );
    16841684        }
    16851685
    16861686        // 3.4
    16871687        if ( $wp_current_db_version < 20148 ) {
    16881688                // 'allowedthemes' keys things by stylesheet. 'allowed_themes' keyed things by name.
    1689                 $allowedthemes  = get_site_option( 'allowedthemes'  );
    1690                 $allowed_themes = get_site_option( 'allowed_themes' );
     1689                $allowedthemes  = get_network_option( 'allowedthemes'  );
     1690                $allowed_themes = get_network_option( 'allowed_themes' );
    16911691                if ( false === $allowedthemes && is_array( $allowed_themes ) && $allowed_themes ) {
    16921692                        $converted = array();
    16931693                        $themes = wp_get_themes();
    function upgrade_network() { 
    16951695                                if ( isset( $allowed_themes[ $theme_data->get('Name') ] ) )
    16961696                                        $converted[ $stylesheet ] = true;
    16971697                        }
    1698                         update_site_option( 'allowedthemes', $converted );
    1699                         delete_site_option( 'allowed_themes' );
     1698                        update_network_option( 'allowedthemes', $converted );
     1699                        delete_network_option( 'allowed_themes' );
    17001700                }
    17011701        }
    17021702
    17031703        // 3.5
    17041704        if ( $wp_current_db_version < 21823 )
    1705                 update_site_option( 'ms_files_rewriting', '1' );
     1705                update_network_option( 'ms_files_rewriting', '1' );
    17061706
    17071707        // 3.5.2
    17081708        if ( $wp_current_db_version < 24448 ) {
    1709                 $illegal_names = get_site_option( 'illegal_names' );
     1709                $illegal_names = get_network_option( 'illegal_names' );
    17101710                if ( is_array( $illegal_names ) && count( $illegal_names ) === 1 ) {
    17111711                        $illegal_name = reset( $illegal_names );
    17121712                        $illegal_names = explode( ' ', $illegal_name );
    1713                         update_site_option( 'illegal_names', $illegal_names );
     1713                        update_network_option( 'illegal_names', $illegal_names );
    17141714                }
    17151715        }
    17161716
  • wp-admin/network/settings.php

    diff --git a/wp-admin/network/settings.php b/wp-admin/network/settings.php
    index a7010e9..4b61059 100644
    a b if ( $_POST ) { 
    7676                if ( ! isset($_POST[$option_name]) )
    7777                        continue;
    7878                $value = wp_unslash( $_POST[$option_name] );
    79                 update_site_option( $option_name, $value );
     79                update_network_option( $option_name, $value );
    8080        }
    8181
    8282        /**
    if ( isset( $_GET['updated'] ) ) { 
    113113                        <tr>
    114114                                <th scope="row"><label for="admin_email"><?php _e( 'Network Admin Email' ) ?></label></th>
    115115                                <td>
    116                                         <input name="admin_email" type="email" id="admin_email" aria-describedby="admin-email-desc" class="regular-text" value="<?php echo esc_attr( get_site_option( 'admin_email' ) ) ?>" />
     116                                        <input name="admin_email" type="email" id="admin_email" aria-describedby="admin-email-desc" class="regular-text" value="<?php echo esc_attr( get_network_option( 'admin_email' ) ) ?>" />
    117117                                        <p class="description" id="admin-email-desc">
    118118                                                <?php _e( 'This email address will receive notifications. Registration and support emails will also come from this address.' ); ?>
    119119                                        </p>
    if ( isset( $_GET['updated'] ) ) { 
    125125                        <tr>
    126126                                <th scope="row"><?php _e( 'Allow new registrations' ) ?></th>
    127127                                <?php
    128                                 if ( !get_site_option( 'registration' ) )
    129                                         update_site_option( 'registration', 'none' );
    130                                 $reg = get_site_option( 'registration' );
     128                                if ( !get_network_option( 'registration' ) )
     129                                        update_network_option( 'registration', 'none' );
     130                                $reg = get_network_option( 'registration' );
    131131                                ?>
    132132                                <td>
    133133                                        <fieldset>
    if ( isset( $_GET['updated'] ) ) { 
    146146                        <tr>
    147147                                <th scope="row"><?php _e( 'Registration notification' ) ?></th>
    148148                                <?php
    149                                 if ( !get_site_option( 'registrationnotification' ) )
    150                                         update_site_option( 'registrationnotification', 'yes' );
     149                                if ( !get_network_option( 'registrationnotification' ) )
     150                                        update_network_option( 'registrationnotification', 'yes' );
    151151                                ?>
    152152                                <td>
    153                                         <label><input name="registrationnotification" type="checkbox" id="registrationnotification" value="yes"<?php checked( get_site_option( 'registrationnotification' ), 'yes' ) ?> /> <?php _e( 'Send the network admin an email notification every time someone registers a site or user account.' ) ?></label>
     153                                        <label><input name="registrationnotification" type="checkbox" id="registrationnotification" value="yes"<?php checked( get_network_option( 'registrationnotification' ), 'yes' ) ?> /> <?php _e( 'Send the network admin an email notification every time someone registers a site or user account.' ) ?></label>
    154154                                </td>
    155155                        </tr>
    156156
    157157                        <tr id="addnewusers">
    158158                                <th scope="row"><?php _e( 'Add New Users' ) ?></th>
    159159                                <td>
    160                                         <label><input name="add_new_users" type="checkbox" id="add_new_users" value="1"<?php checked( get_site_option( 'add_new_users' ) ) ?> /> <?php _e( 'Allow site administrators to add new users to their site via the "Users &rarr; Add New" page.' ); ?></label>
     160                                        <label><input name="add_new_users" type="checkbox" id="add_new_users" value="1"<?php checked( get_network_option( 'add_new_users' ) ) ?> /> <?php _e( 'Allow site administrators to add new users to their site via the "Users &rarr; Add New" page.' ); ?></label>
    161161                                </td>
    162162                        </tr>
    163163
    164164                        <tr>
    165165                                <th scope="row"><label for="illegal_names"><?php _e( 'Banned Names' ) ?></label></th>
    166166                                <td>
    167                                         <input name="illegal_names" type="text" id="illegal_names" aria-describedby="illegal-names-desc" class="large-text" value="<?php echo esc_attr( implode( " ", (array) get_site_option( 'illegal_names' ) ) ); ?>" size="45" />
     167                                        <input name="illegal_names" type="text" id="illegal_names" aria-describedby="illegal-names-desc" class="large-text" value="<?php echo esc_attr( implode( " ", (array) get_network_option( 'illegal_names' ) ) ); ?>" size="45" />
    168168                                        <p class="description" id="illegal-names-desc">
    169169                                                <?php _e( 'Users are not allowed to register these sites. Separate names by spaces.' ) ?>
    170170                                        </p>
    if ( isset( $_GET['updated'] ) ) { 
    174174                        <tr>
    175175                                <th scope="row"><label for="limited_email_domains"><?php _e( 'Limited Email Registrations' ) ?></label></th>
    176176                                <td>
    177                                         <?php $limited_email_domains = get_site_option( 'limited_email_domains' );
     177                                        <?php $limited_email_domains = get_network_option( 'limited_email_domains' );
    178178                                        $limited_email_domains = str_replace( ' ', "\n", $limited_email_domains ); ?>
    179179                                        <textarea name="limited_email_domains" id="limited_email_domains" aria-describedby="limited-email-domains-desc" cols="45" rows="5">
    180180<?php echo esc_textarea( $limited_email_domains == '' ? '' : implode( "\n", (array) $limited_email_domains ) ); ?></textarea>
    if ( isset( $_GET['updated'] ) ) { 
    188188                                <th scope="row"><label for="banned_email_domains"><?php _e('Banned Email Domains') ?></label></th>
    189189                                <td>
    190190                                        <textarea name="banned_email_domains" id="banned_email_domains" aria-describedby="banned-email-domains-desc" cols="45" rows="5">
    191 <?php echo esc_textarea( get_site_option( 'banned_email_domains' ) == '' ? '' : implode( "\n", (array) get_site_option( 'banned_email_domains' ) ) ); ?></textarea>
     191<?php echo esc_textarea( get_network_option( 'banned_email_domains' ) == '' ? '' : implode( "\n", (array) get_network_option( 'banned_email_domains' ) ) ); ?></textarea>
    192192                                        <p class="description" id="banned-email-domains-desc">
    193193                                                <?php _e( 'If you want to ban domains from site registrations. One domain per line.' ) ?>
    194194                                        </p>
    if ( isset( $_GET['updated'] ) ) { 
    203203                                <th scope="row"><label for="welcome_email"><?php _e( 'Welcome Email' ) ?></label></th>
    204204                                <td>
    205205                                        <textarea name="welcome_email" id="welcome_email" aria-describedby="welcome-email-desc" rows="5" cols="45" class="large-text">
    206 <?php echo esc_textarea( get_site_option( 'welcome_email' ) ) ?></textarea>
     206<?php echo esc_textarea( get_network_option( 'welcome_email' ) ) ?></textarea>
    207207                                        <p class="description" id="welcome-email-desc">
    208208                                                <?php _e( 'The welcome email sent to new site owners.' ) ?>
    209209                                        </p>
    if ( isset( $_GET['updated'] ) ) { 
    213213                                <th scope="row"><label for="welcome_user_email"><?php _e( 'Welcome User Email' ) ?></label></th>
    214214                                <td>
    215215                                        <textarea name="welcome_user_email" id="welcome_user_email" aria-describedby="welcome-user-email-desc" rows="5" cols="45" class="large-text">
    216 <?php echo esc_textarea( get_site_option( 'welcome_user_email' ) ) ?></textarea>
     216<?php echo esc_textarea( get_network_option( 'welcome_user_email' ) ) ?></textarea>
    217217                                        <p class="description" id="welcome-user-email-desc">
    218218                                                <?php _e( 'The welcome email sent to new users.' ) ?>
    219219                                        </p>
    if ( isset( $_GET['updated'] ) ) { 
    223223                                <th scope="row"><label for="first_post"><?php _e( 'First Post' ) ?></label></th>
    224224                                <td>
    225225                                        <textarea name="first_post" id="first_post" aria-describedby="first-post-desc" rows="5" cols="45" class="large-text">
    226 <?php echo esc_textarea( get_site_option( 'first_post' ) ) ?></textarea>
     226<?php echo esc_textarea( get_network_option( 'first_post' ) ) ?></textarea>
    227227                                        <p class="description" id="first-post-desc">
    228228                                                <?php _e( 'The first post on a new site.' ) ?>
    229229                                        </p>
    if ( isset( $_GET['updated'] ) ) { 
    233233                                <th scope="row"><label for="first_page"><?php _e( 'First Page' ) ?></label></th>
    234234                                <td>
    235235                                        <textarea name="first_page" id="first_page" aria-describedby="first-page-desc" rows="5" cols="45" class="large-text">
    236 <?php echo esc_textarea( get_site_option( 'first_page' ) ) ?></textarea>
     236<?php echo esc_textarea( get_network_option( 'first_page' ) ) ?></textarea>
    237237                                        <p class="description" id="first-page-desc">
    238238                                                <?php _e( 'The first page on a new site.' ) ?>
    239239                                        </p>
    if ( isset( $_GET['updated'] ) ) { 
    243243                                <th scope="row"><label for="first_comment"><?php _e( 'First Comment' ) ?></label></th>
    244244                                <td>
    245245                                        <textarea name="first_comment" id="first_comment" aria-describedby="first-comment-desc" rows="5" cols="45" class="large-text">
    246 <?php echo esc_textarea( get_site_option( 'first_comment' ) ) ?></textarea>
     246<?php echo esc_textarea( get_network_option( 'first_comment' ) ) ?></textarea>
    247247                                        <p class="description" id="first-comment-desc">
    248248                                                <?php _e( 'The first comment on a new site.' ) ?>
    249249                                        </p>
    if ( isset( $_GET['updated'] ) ) { 
    252252                        <tr>
    253253                                <th scope="row"><label for="first_comment_author"><?php _e( 'First Comment Author' ) ?></label></th>
    254254                                <td>
    255                                         <input type="text" size="40" name="first_comment_author" id="first_comment_author" aria-describedby="first-comment-author-desc" value="<?php echo get_site_option('first_comment_author') ?>" />
     255                                        <input type="text" size="40" name="first_comment_author" id="first_comment_author" aria-describedby="first-comment-author-desc" value="<?php echo get_network_option('first_comment_author') ?>" />
    256256                                        <p class="description" id="first-comment-author-desc">
    257257                                                <?php _e( 'The author of the first comment on a new site.' ) ?>
    258258                                        </p>
    if ( isset( $_GET['updated'] ) ) { 
    261261                        <tr>
    262262                                <th scope="row"><label for="first_comment_url"><?php _e( 'First Comment URL' ) ?></label></th>
    263263                                <td>
    264                                         <input type="text" size="40" name="first_comment_url" id="first_comment_url" aria-describedby="first-comment-url-desc" value="<?php echo esc_attr( get_site_option( 'first_comment_url' ) ) ?>" />
     264                                        <input type="text" size="40" name="first_comment_url" id="first_comment_url" aria-describedby="first-comment-url-desc" value="<?php echo esc_attr( get_network_option( 'first_comment_url' ) ) ?>" />
    265265                                        <p class="description" id="first-comment-url-desc">
    266266                                                <?php _e( 'The URL for the first comment on a new site.' ) ?>
    267267                                        </p>
    if ( isset( $_GET['updated'] ) ) { 
    273273                        <tr>
    274274                                <th scope="row"><?php _e( 'Site upload space' ) ?></th>
    275275                                <td>
    276                                         <label><input type="checkbox" id="upload_space_check_disabled" name="upload_space_check_disabled" value="0"<?php checked( get_site_option( 'upload_space_check_disabled' ), 0 ) ?>/> <?php printf( __( 'Limit total size of files uploaded to %s MB' ), '</label><label><input name="blog_upload_space" type="number" min="0" style="width: 100px" id="blog_upload_space" aria-describedby="blog-upload-space-desc" value="' . esc_attr( get_site_option('blog_upload_space', 100) ) . '" />' ); ?></label><br />
     276                                        <label><input type="checkbox" id="upload_space_check_disabled" name="upload_space_check_disabled" value="0"<?php checked( get_network_option( 'upload_space_check_disabled' ), 0 ) ?>/> <?php printf( __( 'Limit total size of files uploaded to %s MB' ), '</label><label><input name="blog_upload_space" type="number" min="0" style="width: 100px" id="blog_upload_space" aria-describedby="blog-upload-space-desc" value="' . esc_attr( get_network_option('blog_upload_space', 100) ) . '" />' ); ?></label><br />
    277277                                        <p class="screen-reader-text" id="blog-upload-space-desc">
    278278                                                <?php _e( 'Size in megabytes' ) ?>
    279279                                        </p>
    if ( isset( $_GET['updated'] ) ) { 
    283283                        <tr>
    284284                                <th scope="row"><label for="upload_filetypes"><?php _e( 'Upload file types' ) ?></label></th>
    285285                                <td>
    286                                         <input name="upload_filetypes" type="text" id="upload_filetypes" aria-describedby="upload-filetypes-desc" class="large-text" value="<?php echo esc_attr( get_site_option( 'upload_filetypes', 'jpg jpeg png gif' ) ) ?>" size="45" />
     286                                        <input name="upload_filetypes" type="text" id="upload_filetypes" aria-describedby="upload-filetypes-desc" class="large-text" value="<?php echo esc_attr( get_network_option( 'upload_filetypes', 'jpg jpeg png gif' ) ) ?>" size="45" />
    287287                                        <p class="description" id="upload-filetypes-desc">
    288288                                                <?php _e( 'Allowed file types. Separate types by spaces.' ) ?>
    289289                                        </p>
    if ( isset( $_GET['updated'] ) ) { 
    293293                        <tr>
    294294                                <th scope="row"><label for="fileupload_maxk"><?php _e( 'Max upload file size' ) ?></label></th>
    295295                                <td>
    296                                         <?php printf( _x( '%s KB', 'File size in kilobytes' ), '<input name="fileupload_maxk" type="number" min="0" style="width: 100px" id="fileupload_maxk" aria-describedby="fileupload-maxk-desc" value="' . esc_attr( get_site_option( 'fileupload_maxk', 300 ) ) . '" />' ); ?>
     296                                        <?php printf( _x( '%s KB', 'File size in kilobytes' ), '<input name="fileupload_maxk" type="number" min="0" style="width: 100px" id="fileupload_maxk" aria-describedby="fileupload-maxk-desc" value="' . esc_attr( get_network_option( 'fileupload_maxk', 300 ) ) . '" />' ); ?>
    297297                                        <p class="screen-reader-text" id="fileupload-maxk-desc">
    298298                                                <?php _e( 'Size in kilobytes' ) ?>
    299299                                        </p>
    if ( isset( $_GET['updated'] ) ) { 
    312312                                        <th><label for="WPLANG"><?php _e( 'Default Language' ); ?></label></th>
    313313                                        <td>
    314314                                                <?php
    315                                                 $lang = get_site_option( 'WPLANG' );
     315                                                $lang = get_network_option( 'WPLANG' );
    316316                                                if ( ! in_array( $lang, $languages ) ) {
    317317                                                        $lang = '';
    318318                                                }
    if ( isset( $_GET['updated'] ) ) { 
    339339                                <th scope="row"><?php _e( 'Enable administration menus' ); ?></th>
    340340                                <td>
    341341                        <?php
    342                         $menu_perms = get_site_option( 'menu_items' );
     342                        $menu_perms = get_network_option( 'menu_items' );
    343343                        /**
    344344                         * Filter available network-wide administration menu options.
    345345                         *
  • wp-admin/network/site-new.php

    diff --git a/wp-admin/network/site-new.php b/wp-admin/network/site-new.php
    index ea87438..1f90168 100644
    a b Name: %3$s' ), 
    123123                        get_site_url( $id ),
    124124                        wp_unslash( $title )
    125125                );
    126                 wp_mail( get_site_option('admin_email'), sprintf( __( '[%s] New Site Created' ), $current_site->site_name ), $content_mail, 'From: "Site Admin" <' . get_site_option( 'admin_email' ) . '>' );
     126                wp_mail( get_network_option('admin_email'), sprintf( __( '[%s] New Site Created' ), $current_site->site_name ), $content_mail, 'From: "Site Admin" <' . get_network_option( 'admin_email' ) . '>' );
    127127                wpmu_welcome_notification( $id, $user_id, $password, $title, array( 'public' => 1 ) );
    128128                wp_redirect( add_query_arg( array( 'update' => 'added', 'id' => $id ), 'site-new.php' ) );
    129129                exit;
    if ( ! empty( $messages ) ) { 
    188188                                <td>
    189189                                        <?php
    190190                                        // Network default.
    191                                         $lang = get_site_option( 'WPLANG' );
     191                                        $lang = get_network_option( 'WPLANG' );
    192192
    193193                                        // Use English if the default isn't available.
    194194                                        if ( ! in_array( $lang, $languages ) ) {
  • wp-admin/network/themes.php

    diff --git a/wp-admin/network/themes.php b/wp-admin/network/themes.php
    index 3917014..2aecf57 100644
    a b $_SERVER['REQUEST_URI'] = remove_query_arg( $temp_args, $_SERVER['REQUEST_URI'] 
    2929$referer = remove_query_arg( $temp_args, wp_get_referer() );
    3030
    3131if ( $action ) {
    32         $allowed_themes = get_site_option( 'allowedthemes' );
     32        $allowed_themes = get_network_option( 'allowedthemes' );
    3333        switch ( $action ) {
    3434                case 'enable':
    3535                        check_admin_referer('enable-theme_' . $_GET['theme']);
    3636                        $allowed_themes[ $_GET['theme'] ] = true;
    37                         update_site_option( 'allowedthemes', $allowed_themes );
     37                        update_network_option( 'allowedthemes', $allowed_themes );
    3838                        if ( false === strpos( $referer, '/network/themes.php' ) )
    3939                                wp_redirect( network_admin_url( 'themes.php?enabled=1' ) );
    4040                        else
    if ( $action ) { 
    4343                case 'disable':
    4444                        check_admin_referer('disable-theme_' . $_GET['theme']);
    4545                        unset( $allowed_themes[ $_GET['theme'] ] );
    46                         update_site_option( 'allowedthemes', $allowed_themes );
     46                        update_network_option( 'allowedthemes', $allowed_themes );
    4747                        wp_safe_redirect( add_query_arg( 'disabled', '1', $referer ) );
    4848                        exit;
    4949                case 'enable-selected':
    if ( $action ) { 
    5555                        }
    5656                        foreach ( (array) $themes as $theme )
    5757                                $allowed_themes[ $theme ] = true;
    58                         update_site_option( 'allowedthemes', $allowed_themes );
     58                        update_network_option( 'allowedthemes', $allowed_themes );
    5959                        wp_safe_redirect( add_query_arg( 'enabled', count( $themes ), $referer ) );
    6060                        exit;
    6161                case 'disable-selected':
    if ( $action ) { 
    6767                        }
    6868                        foreach ( (array) $themes as $theme )
    6969                                unset( $allowed_themes[ $theme ] );
    70                         update_site_option( 'allowedthemes', $allowed_themes );
     70                        update_network_option( 'allowedthemes', $allowed_themes );
    7171                        wp_safe_redirect( add_query_arg( 'disabled', count( $themes ), $referer ) );
    7272                        exit;
    7373                case 'update-selected' :
  • wp-admin/network/upgrade.php

    diff --git a/wp-admin/network/upgrade.php b/wp-admin/network/upgrade.php
    index 60d8d89..930913c 100644
    a b switch ( $action ) { 
    5252                         * @global string $wp_db_version
    5353                         */
    5454                        global $wp_db_version;
    55                         update_site_option( 'wpmu_upgrade_site', $wp_db_version );
     55                        update_network_option( 'wpmu_upgrade_site', $wp_db_version );
    5656                }
    5757
    5858                $blogs = $wpdb->get_results( "SELECT blog_id FROM {$wpdb->blogs} WHERE site_id = '{$wpdb->siteid}' AND spam = '0' AND deleted = '0' AND archived = '0' ORDER BY registered DESC LIMIT {$n}, 5", ARRAY_A );
    switch ( $action ) { 
    109109        break;
    110110        case 'show':
    111111        default:
    112                 if ( get_site_option( 'wpmu_upgrade_site' ) != $GLOBALS['wp_db_version'] ) :
     112                if ( get_network_option( 'wpmu_upgrade_site' ) != $GLOBALS['wp_db_version'] ) :
    113113                ?>
    114114                <h3><?php _e( 'Database Upgrade Required' ); ?></h3>
    115115                <p><?php _e( 'WordPress has been updated! Before we send you on your way, we need to individually upgrade the sites in your network.' ); ?></p>
  • wp-admin/options-writing.php

    diff --git a/wp-admin/options-writing.php b/wp-admin/options-writing.php
    index 9fb2db0..3c03461 100644
    a b include( ABSPATH . 'wp-admin/admin-header.php' ); 
    5656<?php settings_fields('writing'); ?>
    5757
    5858<table class="form-table">
    59 <?php if ( get_site_option( 'initial_db_version' ) < 32453 ) : ?>
     59<?php if ( get_network_option( 'initial_db_version' ) < 32453 ) : ?>
    6060<tr>
    6161<th scope="row"><?php _e('Formatting') ?></th>
    6262<td><fieldset><legend class="screen-reader-text"><span><?php _e('Formatting') ?></span></legend>
  • wp-admin/options.php

    diff --git a/wp-admin/options.php b/wp-admin/options.php
    index 6bad0fd..77c158c 100644
    a b $mail_options = array('mailserver_url', 'mailserver_port', 'mailserver_login', ' 
    9595if ( ! in_array( get_option( 'blog_charset' ), array( 'utf8', 'utf-8', 'UTF8', 'UTF-8' ) ) )
    9696        $whitelist_options['reading'][] = 'blog_charset';
    9797
    98 if ( get_site_option( 'initial_db_version' ) < 32453 ) {
     98if ( get_network_option( 'initial_db_version' ) < 32453 ) {
    9999        $whitelist_options['writing'][] = 'use_smilies';
    100100        $whitelist_options['writing'][] = 'use_balanceTags';
    101101}
  • wp-admin/user-edit.php

    diff --git a/wp-admin/user-edit.php b/wp-admin/user-edit.php
    index aa8ab1a..dea516b 100644
    a b else 
    316316if ( is_multisite() && is_network_admin() && ! IS_PROFILE_PAGE && current_user_can( 'manage_network_options' ) && !isset($super_admins) ) { ?>
    317317<tr class="user-super-admin-wrap"><th><?php _e('Super Admin'); ?></th>
    318318<td>
    319 <?php if ( $profileuser->user_email != get_site_option( 'admin_email' ) || ! is_super_admin( $profileuser->ID ) ) : ?>
     319<?php if ( $profileuser->user_email != get_network_option( 'admin_email' ) || ! is_super_admin( $profileuser->ID ) ) : ?>
    320320<p><label><input type="checkbox" id="super_admin" name="super_admin"<?php checked( is_super_admin( $profileuser->ID ) ); ?> /> <?php _e( 'Grant this user super admin privileges for the Network.' ); ?></label></p>
    321321<?php else : ?>
    322322<p><?php _e( 'Super admin privileges cannot be removed because this user has the network admin email.' ); ?></p>
  • wp-includes/capabilities-functions.php

    diff --git a/wp-includes/capabilities-functions.php b/wp-includes/capabilities-functions.php
    index 39bd23c..bad57a4 100644
    a b function map_meta_cap( $cap, $user_id ) { 
    336336                $caps[] = $cap;
    337337                if ( is_multisite() ) {
    338338                        // update_, install_, and delete_ are handled above with is_super_admin().
    339                         $menu_perms = get_site_option( 'menu_items', array() );
     339                        $menu_perms = get_network_option( 'menu_items', array() );
    340340                        if ( empty( $menu_perms['plugins'] ) )
    341341                                $caps[] = 'manage_network_plugins';
    342342                }
    function map_meta_cap( $cap, $user_id ) { 
    352352        case 'create_users':
    353353                if ( !is_multisite() )
    354354                        $caps[] = $cap;
    355                 elseif ( is_super_admin( $user_id ) || get_site_option( 'add_new_users' ) )
     355                elseif ( is_super_admin( $user_id ) || get_network_option( 'add_new_users' ) )
    356356                        $caps[] = $cap;
    357357                else
    358358                        $caps[] = 'do_not_allow';
    function get_super_admins() { 
    578578        if ( isset($super_admins) )
    579579                return $super_admins;
    580580        else
    581                 return get_site_option( 'site_admins', array('admin') );
     581                return get_network_option( 'site_admins', array('admin') );
    582582}
    583583
    584584/**
  • wp-includes/class-wp-theme.php

    diff --git a/wp-includes/class-wp-theme.php b/wp-includes/class-wp-theme.php
    index 7bd9dca..31381ab 100644
    a b final class WP_Theme implements ArrayAccess { 
    11911191        public static function get_allowed_on_network() {
    11921192                static $allowed_themes;
    11931193                if ( ! isset( $allowed_themes ) )
    1194                         $allowed_themes = (array) get_site_option( 'allowedthemes' );
     1194                        $allowed_themes = (array) get_network_option( 'allowedthemes' );
    11951195                return $allowed_themes;
    11961196        }
    11971197
  • wp-includes/default-constants.php

    diff --git a/wp-includes/default-constants.php b/wp-includes/default-constants.php
    index 1ec1b36..62ec64b 100644
    a b function wp_cookie_constants() { 
    189189         * @since 1.5.0
    190190         */
    191191        if ( !defined( 'COOKIEHASH' ) ) {
    192                 $siteurl = get_site_option( 'siteurl' );
     192                $siteurl = get_network_option( 'siteurl' );
    193193                if ( $siteurl )
    194194                        define( 'COOKIEHASH', md5( $siteurl ) );
    195195                else
  • wp-includes/functions.php

    diff --git a/wp-includes/functions.php b/wp-includes/functions.php
    index a275023..814a86b 100644
    a b function wp_upload_dir( $time = null ) { 
    17491749         * Honor the value of UPLOADS. This happens as long as ms-files rewriting is disabled.
    17501750         * We also sometimes obey UPLOADS when rewriting is enabled -- see the next block.
    17511751         */
    1752         if ( defined( 'UPLOADS' ) && ! ( is_multisite() && get_site_option( 'ms_files_rewriting' ) ) ) {
     1752        if ( defined( 'UPLOADS' ) && ! ( is_multisite() && get_network_option( 'ms_files_rewriting' ) ) ) {
    17531753                $dir = ABSPATH . UPLOADS;
    17541754                $url = trailingslashit( $siteurl ) . UPLOADS;
    17551755        }
    function wp_upload_dir( $time = null ) { 
    17571757        // If multisite (and if not the main site in a post-MU network)
    17581758        if ( is_multisite() && ! ( is_main_network() && is_main_site() && defined( 'MULTISITE' ) ) ) {
    17591759
    1760                 if ( ! get_site_option( 'ms_files_rewriting' ) ) {
     1760                if ( ! get_network_option( 'ms_files_rewriting' ) ) {
    17611761                        /*
    17621762                         * If ms-files rewriting is disabled (networks created post-3.5), it is fairly
    17631763                         * straightforward: Append sites/%d if we're not on the main site (for post-MU
    function global_terms_enabled() { 
    40044004                if ( ! is_null( $filter ) )
    40054005                        $global_terms = (bool) $filter;
    40064006                else
    4007                         $global_terms = (bool) get_site_option( 'global_terms_enabled', false );
     4007                        $global_terms = (bool) get_network_option( 'global_terms_enabled', false );
    40084008        }
    40094009        return $global_terms;
    40104010}
  • wp-includes/l10n.php

    diff --git a/wp-includes/l10n.php b/wp-includes/l10n.php
    index 85a020d..9ecb7ef 100644
    a b function get_locale() { 
    5353        if ( is_multisite() ) {
    5454                // Don't check blog option when installing.
    5555                if ( defined( 'WP_INSTALLING' ) || ( false === $ms_locale = get_option( 'WPLANG' ) ) ) {
    56                         $ms_locale = get_site_option( 'WPLANG' );
     56                        $ms_locale = get_network_option( 'WPLANG' );
    5757                }
    5858
    5959                if ( $ms_locale !== false ) {
  • wp-includes/ms-default-constants.php

    diff --git a/wp-includes/ms-default-constants.php b/wp-includes/ms-default-constants.php
    index 05b1eeb..84efad1 100644
    a b function ms_upload_constants() { 
    2323        // This filter is attached in ms-default-filters.php but that file is not included during SHORTINIT.
    2424        add_filter( 'default_site_option_ms_files_rewriting', '__return_true' );
    2525
    26         if ( ! get_site_option( 'ms_files_rewriting' ) )
     26        if ( ! get_network_option( 'ms_files_rewriting' ) )
    2727                return;
    2828
    2929        // Base uploads dir relative to ABSPATH
  • wp-includes/ms-deprecated.php

    diff --git a/wp-includes/ms-deprecated.php b/wp-includes/ms-deprecated.php
    index b3d5607..7db302d 100644
    a b  
    2525 */
    2626function get_dashboard_blog() {
    2727    _deprecated_function( __FUNCTION__, '3.1' );
    28     if ( $blog = get_site_option( 'dashboard_blog' ) )
     28    if ( $blog = get_network_option( 'dashboard_blog' ) )
    2929        return get_blog_details( $blog );
    3030
    3131    return get_blog_details( $GLOBALS['current_site']->blog_id );
  • wp-includes/ms-functions.php

    diff --git a/wp-includes/ms-functions.php b/wp-includes/ms-functions.php
    index 809d164..0440b51 100644
    a b function get_active_blog_for_user( $user_id ) { 
    125125 * @return int
    126126 */
    127127function get_user_count() {
    128         return get_site_option( 'user_count' );
     128        return get_network_option( 'user_count' );
    129129}
    130130
    131131/**
    function get_blog_count( $network_id = 0 ) { 
    142142        if ( func_num_args() )
    143143                _deprecated_argument( __FUNCTION__, '3.1' );
    144144
    145         return get_site_option( 'blog_count' );
     145        return get_network_option( 'blog_count' );
    146146}
    147147
    148148/**
    function get_blog_id_from_url( $domain, $path = '/' ) { 
    402402 * @return bool Returns true when the email address is banned.
    403403 */
    404404function is_email_address_unsafe( $user_email ) {
    405         $banned_names = get_site_option( 'banned_email_domains' );
     405        $banned_names = get_network_option( 'banned_email_domains' );
    406406        if ( $banned_names && ! is_array( $banned_names ) )
    407407                $banned_names = explode( "\n", $banned_names );
    408408
    function wpmu_validate_user_signup($user_name, $user_email) { 
    480480        if ( empty( $user_name ) )
    481481                $errors->add('user_name', __( 'Please enter a username.' ) );
    482482
    483         $illegal_names = get_site_option( 'illegal_names' );
     483        $illegal_names = get_network_option( 'illegal_names' );
    484484        if ( ! is_array( $illegal_names ) ) {
    485485                $illegal_names = array(  'www', 'web', 'root', 'admin', 'main', 'invite', 'administrator' );
    486                 add_site_option( 'illegal_names', $illegal_names );
     486                add_network_option( 'illegal_names', $illegal_names );
    487487        }
    488488        if ( in_array( $user_name, $illegal_names ) )
    489489                $errors->add('user_name',  __( 'That username is not allowed.' ) );
    function wpmu_validate_user_signup($user_name, $user_email) { 
    508508        if ( !is_email( $user_email ) )
    509509                $errors->add('user_email', __( 'Please enter a valid email address.' ) );
    510510
    511         $limited_email_domains = get_site_option( 'limited_email_domains' );
     511        $limited_email_domains = get_network_option( 'limited_email_domains' );
    512512        if ( is_array( $limited_email_domains ) && ! empty( $limited_email_domains ) ) {
    513513                $emaildomain = substr( $user_email, 1 + strpos( $user_email, '@' ) );
    514514                if ( ! in_array( $emaildomain, $limited_email_domains ) ) {
    function wpmu_validate_blog_signup( $blogname, $blog_title, $user = '' ) { 
    602602        $blog_title = substr( $blog_title, 0, 50 );
    603603
    604604        $errors = new WP_Error();
    605         $illegal_names = get_site_option( 'illegal_names' );
     605        $illegal_names = get_network_option( 'illegal_names' );
    606606        if ( $illegal_names == false ) {
    607607                $illegal_names = array( 'www', 'web', 'root', 'admin', 'main', 'invite', 'administrator' );
    608                 add_site_option( 'illegal_names', $illegal_names );
     608                add_network_option( 'illegal_names', $illegal_names );
    609609        }
    610610
    611611        /*
    function wpmu_signup_blog_notification( $domain, $path, $title, $user, $user_ema 
    859859                $activate_url = "http://{$domain}{$path}wp-activate.php?key=$key"; // @todo use *_url() API
    860860
    861861        $activate_url = esc_url($activate_url);
    862         $admin_email = get_site_option( 'admin_email' );
     862        $admin_email = get_network_option( 'admin_email' );
    863863        if ( $admin_email == '' )
    864864                $admin_email = 'support@' . $_SERVER['SERVER_NAME'];
    865         $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) );
     865        $from_name = get_network_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_network_option( 'site_name' ) );
    866866        $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
    867867        $message = sprintf(
    868868                /**
    function wpmu_signup_user_notification( $user, $user_email, $key, $meta = array( 
    952952                return false;
    953953
    954954        // Send email with activation link.
    955         $admin_email = get_site_option( 'admin_email' );
     955        $admin_email = get_network_option( 'admin_email' );
    956956        if ( $admin_email == '' )
    957957                $admin_email = 'support@' . $_SERVER['SERVER_NAME'];
    958         $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) );
     958        $from_name = get_network_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_network_option( 'site_name' ) );
    959959        $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
    960960        $message = sprintf(
    961961                /**
    function wpmu_create_blog( $domain, $path, $title, $user_id, $meta = array(), $s 
    11931193                        update_option( $key, $value );
    11941194        }
    11951195
    1196         add_option( 'WPLANG', get_site_option( 'WPLANG' ) );
     1196        add_option( 'WPLANG', get_network_option( 'WPLANG' ) );
    11971197        update_option( 'blog_public', (int) $meta['public'] );
    11981198
    11991199        if ( ! is_super_admin( $user_id ) && ! get_user_meta( $user_id, 'primary_blog', true ) )
    function wpmu_create_blog( $domain, $path, $title, $user_id, $meta = array(), $s 
    12291229 * @return bool
    12301230 */
    12311231function newblog_notify_siteadmin( $blog_id, $deprecated = '' ) {
    1232         if ( get_site_option( 'registrationnotification' ) != 'yes' )
     1232        if ( get_network_option( 'registrationnotification' ) != 'yes' )
    12331233                return false;
    12341234
    1235         $email = get_site_option( 'admin_email' );
     1235        $email = get_network_option( 'admin_email' );
    12361236        if ( is_email($email) == false )
    12371237                return false;
    12381238
    Disable these notifications: %4$s' ), $blogname, $siteurl, wp_unslash( $_SERVER[ 
    12741274 * @return bool
    12751275 */
    12761276function newuser_notify_siteadmin( $user_id ) {
    1277         if ( get_site_option( 'registrationnotification' ) != 'yes' )
     1277        if ( get_network_option( 'registrationnotification' ) != 'yes' )
    12781278                return false;
    12791279
    1280         $email = get_site_option( 'admin_email' );
     1280        $email = get_network_option( 'admin_email' );
    12811281
    12821282        if ( is_email($email) == false )
    12831283                return false;
    function install_blog( $blog_id, $blog_title = '' ) { 
    14131413        update_option( 'siteurl', $url );
    14141414        update_option( 'home', $url );
    14151415
    1416         if ( get_site_option( 'ms_files_rewriting' ) )
     1416        if ( get_network_option( 'ms_files_rewriting' ) )
    14171417                update_option( 'upload_path', UPLOADBLOGSDIR . "/$blog_id/files" );
    14181418        else
    14191419                update_option( 'upload_path', get_blog_option( get_current_site()->blog_id, 'upload_path' ) );
    function wpmu_welcome_notification( $blog_id, $user_id, $password, $title, $meta 
    14891489        if ( ! apply_filters( 'wpmu_welcome_notification', $blog_id, $user_id, $password, $title, $meta ) )
    14901490                return false;
    14911491
    1492         $welcome_email = get_site_option( 'welcome_email' );
     1492        $welcome_email = get_network_option( 'welcome_email' );
    14931493        if ( $welcome_email == false ) {
    14941494                /* translators: Do not translate USERNAME, SITE_NAME, BLOG_URL, PASSWORD: those are placeholders. */
    14951495                $welcome_email = __( 'Howdy USERNAME,
    We hope you enjoy your new site. Thanks! 
    15321532         * @param array  $meta          Signup meta data.
    15331533         */
    15341534        $welcome_email = apply_filters( 'update_welcome_email', $welcome_email, $blog_id, $user_id, $password, $title, $meta );
    1535         $admin_email = get_site_option( 'admin_email' );
     1535        $admin_email = get_network_option( 'admin_email' );
    15361536
    15371537        if ( $admin_email == '' )
    15381538                $admin_email = 'support@' . $_SERVER['SERVER_NAME'];
    15391539
    1540         $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) );
     1540        $from_name = get_network_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_network_option( 'site_name' ) );
    15411541        $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
    15421542        $message = $welcome_email;
    15431543
    function wpmu_welcome_user_notification( $user_id, $password, $meta = array() ) 
    15881588        if ( ! apply_filters( 'wpmu_welcome_user_notification', $user_id, $password, $meta ) )
    15891589                return false;
    15901590
    1591         $welcome_email = get_site_option( 'welcome_user_email' );
     1591        $welcome_email = get_network_option( 'welcome_user_email' );
    15921592
    15931593        $user = get_userdata( $user_id );
    15941594
    function wpmu_welcome_user_notification( $user_id, $password, $meta = array() ) 
    16101610        $welcome_email = str_replace( 'PASSWORD', $password, $welcome_email );
    16111611        $welcome_email = str_replace( 'LOGINLINK', wp_login_url(), $welcome_email );
    16121612
    1613         $admin_email = get_site_option( 'admin_email' );
     1613        $admin_email = get_network_option( 'admin_email' );
    16141614
    16151615        if ( $admin_email == '' )
    16161616                $admin_email = 'support@' . $_SERVER['SERVER_NAME'];
    16171617
    1618         $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) );
     1618        $from_name = get_network_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_network_option( 'site_name' ) );
    16191619        $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
    16201620        $message = $welcome_email;
    16211621
    function recurse_dirsize( $directory, $exclude = null ) { 
    17871787 * @return array
    17881788 */
    17891789function check_upload_mimes( $mimes ) {
    1790         $site_exts = explode( ' ', get_site_option( 'upload_filetypes', 'jpg jpeg png gif' ) );
     1790        $site_exts = explode( ' ', get_network_option( 'upload_filetypes', 'jpg jpeg png gif' ) );
    17911791        $site_mimes = array();
    17921792        foreach ( $site_exts as $ext ) {
    17931793                foreach ( $mimes as $ext_pattern => $mime ) {
    function redirect_this_site( $deprecated = '' ) { 
    19261926 * @return string|array If the upload is under the size limit, $upload is returned. Otherwise returns an error message.
    19271927 */
    19281928function upload_is_file_too_big( $upload ) {
    1929         if ( ! is_array( $upload ) || defined( 'WP_IMPORTING' ) || get_site_option( 'upload_space_check_disabled' ) )
     1929        if ( ! is_array( $upload ) || defined( 'WP_IMPORTING' ) || get_network_option( 'upload_space_check_disabled' ) )
    19301930                return $upload;
    19311931
    1932         if ( strlen( $upload['bits'] )  > ( 1024 * get_site_option( 'fileupload_maxk', 1500 ) ) )
    1933                 return sprintf( __( 'This file is too big. Files must be less than %d KB in size.' ) . '<br />', get_site_option( 'fileupload_maxk', 1500 ));
     1932        if ( strlen( $upload['bits'] )  > ( 1024 * get_network_option( 'fileupload_maxk', 1500 ) ) )
     1933                return sprintf( __( 'This file is too big. Files must be less than %d KB in size.' ) . '<br />', get_network_option( 'fileupload_maxk', 1500 ));
    19341934
    19351935        return $upload;
    19361936}
    function is_user_option_local( $key, $user_id = 0, $blog_id = 0 ) { 
    21432143 * @return bool
    21442144 */
    21452145function users_can_register_signup_filter() {
    2146         $registration = get_site_option('registration');
     2146        $registration = get_network_option('registration');
    21472147        return ( $registration == 'all' || $registration == 'user' );
    21482148}
    21492149
    LOGINLINK 
    21722172Thanks!
    21732173
    21742174--The Team @ SITE_NAME' );
    2175                 update_site_option( 'welcome_user_email', $text );
     2175                update_network_option( 'welcome_user_email', $text );
    21762176        }
    21772177        return $text;
    21782178}
    function wp_update_network_site_counts() { 
    22982298        global $wpdb;
    22992299
    23002300        $count = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(blog_id) as c FROM $wpdb->blogs WHERE site_id = %d AND spam = '0' AND deleted = '0' and archived = '0'", $wpdb->siteid) );
    2301         update_site_option( 'blog_count', $count );
     2301        update_network_option( 'blog_count', $count );
    23022302}
    23032303
    23042304/**
    function wp_update_network_user_counts() { 
    23122312        global $wpdb;
    23132313
    23142314        $count = $wpdb->get_var( "SELECT COUNT(ID) as c FROM $wpdb->users WHERE spam = '0' AND deleted = '0'" );
    2315         update_site_option( 'user_count', $count );
     2315        update_network_option( 'user_count', $count );
    23162316}
    23172317
    23182318/**
    function get_space_allowed() { 
    23502350        $space_allowed = get_option( 'blog_upload_space' );
    23512351
    23522352        if ( ! is_numeric( $space_allowed ) )
    2353                 $space_allowed = get_site_option( 'blog_upload_space' );
     2353                $space_allowed = get_network_option( 'blog_upload_space' );
    23542354
    23552355        if ( empty( $space_allowed ) || ! is_numeric( $space_allowed ) )
    23562356                $space_allowed = 100;
    function get_space_allowed() { 
    23742374 */
    23752375function get_upload_space_available() {
    23762376        $space_allowed = get_space_allowed() * 1024 * 1024;
    2377         if ( get_site_option( 'upload_space_check_disabled' ) )
     2377        if ( get_network_option( 'upload_space_check_disabled' ) )
    23782378                return $space_allowed;
    23792379
    23802380        $space_used = get_space_used() * 1024 * 1024;
    function get_upload_space_available() { 
    23922392 * @return bool True if space is available, false otherwise.
    23932393 */
    23942394function is_upload_space_available() {
    2395         if ( get_site_option( 'upload_space_check_disabled' ) )
     2395        if ( get_network_option( 'upload_space_check_disabled' ) )
    23962396                return true;
    23972397
    23982398        return (bool) get_upload_space_available();
    function is_upload_space_available() { 
    24042404 * @return int of upload size limit in bytes
    24052405 */
    24062406function upload_size_limit_filter( $size ) {
    2407         $fileupload_maxk = 1024 * get_site_option( 'fileupload_maxk', 1500 );
    2408         if ( get_site_option( 'upload_space_check_disabled' ) )
     2407        $fileupload_maxk = 1024 * get_network_option( 'fileupload_maxk', 1500 );
     2408        if ( get_network_option( 'upload_space_check_disabled' ) )
    24092409                return min( $size, $fileupload_maxk );
    24102410
    24112411        return min( $size, $fileupload_maxk, get_upload_space_available() );
  • wp-includes/ms-load.php

    diff --git a/wp-includes/ms-load.php b/wp-includes/ms-load.php
    index 451e0dc..2c16145 100644
    a b function is_subdomain_install() { 
    3434 * @return array Files to include.
    3535 */
    3636function wp_get_active_network_plugins() {
    37         $active_plugins = (array) get_site_option( 'active_sitewide_plugins', array() );
     37        $active_plugins = (array) get_network_option( 'active_sitewide_plugins', array() );
    3838        if ( empty( $active_plugins ) )
    3939                return array();
    4040
    function ms_site_check() { 
    9696                if ( file_exists( WP_CONTENT_DIR . '/blog-inactive.php' ) )
    9797                        return WP_CONTENT_DIR . '/blog-inactive.php';
    9898                else
    99                         wp_die( sprintf( __( 'This site has not been activated yet. If you are having problems activating your site, please contact <a href="mailto:%1$s">%1$s</a>.' ), str_replace( '@', ' AT ', get_site_option( 'admin_email', 'support@' . get_current_site()->domain ) ) ) );
     99                        wp_die( sprintf( __( 'This site has not been activated yet. If you are having problems activating your site, please contact <a href="mailto:%1$s">%1$s</a>.' ), str_replace( '@', ' AT ', get_network_option( 'admin_email', 'support@' . get_current_site()->domain ) ) ) );
    100100        }
    101101
    102102        if ( $blog->archived == '1' || $blog->spam == '1' ) {
  • wp-includes/ms-settings.php

    diff --git a/wp-includes/ms-settings.php b/wp-includes/ms-settings.php
    index 00da6da..7d0fbc6 100644
    a b if ( ! $current_site instanceof WP_Network ) { 
    222222}
    223223
    224224if ( empty( $current_site->site_name ) ) {
    225         $current_site->site_name = get_site_option( 'site_name' );
     225        $current_site->site_name = get_network_option( 'site_name' );
    226226        if ( ! $current_site->site_name ) {
    227227                $current_site->site_name = ucfirst( $current_site->domain );
    228228        }
  • wp-includes/option.php

    diff --git a/wp-includes/option.php b/wp-includes/option.php
    index ab8f81b..4deda98 100644
    a b function get_option( $option, $default = false ) { 
    8888                                        wp_cache_add( $option, $value, 'options' );
    8989                                } else { // option does not exist, so we must cache its non-existence
    9090                                        if ( ! is_array( $notoptions ) ) {
    91                                                  $notoptions = array();
     91                                                $notoptions = array();
    9292                                        }
    9393                                        $notoptions[$option] = true;
    9494                                        wp_cache_set( 'notoptions', $notoptions, 'options' );
    function get_site_option( $option, $default = false, $use_cache = true ) { 
    10051005         */
    10061006        $pre = apply_filters( 'pre_site_option_' . $option, false, $option );
    10071007
    1008         if ( false !== $pre )
    1009                 return $pre;
     1008        if ( false !== $pre )
     1009                return $pre;
    10101010
    10111011        // prevent non-existent options from triggering multiple queries
    10121012        $notoptions_key = "{$wpdb->siteid}:notoptions";
    function get_site_option( $option, $default = false, $use_cache = true ) { 
    10491049                                wp_cache_set( $cache_key, $value, 'site-options' );
    10501050                        } else {
    10511051                                if ( ! is_array( $notoptions ) ) {
    1052                                          $notoptions = array();
     1052                                        $notoptions = array();
    10531053                                }
    10541054                                $notoptions[$option] = true;
    10551055                                wp_cache_set( $notoptions_key, $notoptions, 'site-options' );
    function set_site_transient( $transient, $value, $expiration = 0 ) { 
    15241524                do_action( 'setted_site_transient', $transient, $value, $expiration );
    15251525        }
    15261526        return $result;
    1527 }
     1527}
     1528 No newline at end of file
  • wp-includes/pluggable.php

    diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php
    index d58f189..0cf05ac 100644
    a b function wp_salt( $scheme = 'auth' ) { 
    19611961                        if ( defined( $const ) && constant( $const ) && empty( $duplicated_keys[ constant( $const ) ] ) ) {
    19621962                                $values[ $type ] = constant( $const );
    19631963                        } elseif ( ! $values[ $type ] ) {
    1964                                 $values[ $type ] = get_site_option( "{$scheme}_{$type}" );
     1964                                $values[ $type ] = get_network_option( "{$scheme}_{$type}" );
    19651965                                if ( ! $values[ $type ] ) {
    19661966                                        $values[ $type ] = wp_generate_password( 64, true, true );
    1967                                         update_site_option( "{$scheme}_{$type}", $values[ $type ] );
     1967                                        update_network_option( "{$scheme}_{$type}", $values[ $type ] );
    19681968                                }
    19691969                        }
    19701970                }
    19711971        } else {
    19721972                if ( ! $values['key'] ) {
    1973                         $values['key'] = get_site_option( 'secret_key' );
     1973                        $values['key'] = get_network_option( 'secret_key' );
    19741974                        if ( ! $values['key'] ) {
    19751975                                $values['key'] = wp_generate_password( 64, true, true );
    1976                                 update_site_option( 'secret_key', $values['key'] );
     1976                                update_network_option( 'secret_key', $values['key'] );
    19771977                        }
    19781978                }
    19791979                $values['salt'] = hash_hmac( 'md5', $scheme, $values['key'] );
  • wp-includes/script-loader.php

    diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php
    index 26a3f8c..1668d1d 100644
    a b function script_concat_settings() { 
    11591159
    11601160        if ( ! isset($compress_scripts) ) {
    11611161                $compress_scripts = defined('COMPRESS_SCRIPTS') ? COMPRESS_SCRIPTS : true;
    1162                 if ( $compress_scripts && ( ! get_site_option('can_compress_scripts') || $compressed_output ) )
     1162                if ( $compress_scripts && ( ! get_network_option('can_compress_scripts') || $compressed_output ) )
    11631163                        $compress_scripts = false;
    11641164        }
    11651165
    11661166        if ( ! isset($compress_css) ) {
    11671167                $compress_css = defined('COMPRESS_CSS') ? COMPRESS_CSS : true;
    1168                 if ( $compress_css && ( ! get_site_option('can_compress_scripts') || $compressed_output ) )
     1168                if ( $compress_css && ( ! get_network_option('can_compress_scripts') || $compressed_output ) )
    11691169                        $compress_css = false;
    11701170        }
    11711171}
  • wp-includes/user-functions.php

    diff --git a/wp-includes/user-functions.php b/wp-includes/user-functions.php
    index 6ee1917..06364fe 100644
    a b function _get_additional_user_keys( $user ) { 
    17991799 */
    18001800function wp_get_user_contact_methods( $user = null ) {
    18011801        $methods = array();
    1802         if ( get_site_option( 'initial_db_version' ) < 23588 ) {
     1802        if ( get_network_option( 'initial_db_version' ) < 23588 ) {
    18031803                $methods = array(
    18041804                        'aim'    => __( 'AIM' ),
    18051805                        'yim'    => __( 'Yahoo IM' ),
  • wp-signup.php

    diff --git a/wp-signup.php b/wp-signup.php
    index fa88ba9..f939dc9 100644
    a b add_action( 'wp_head', 'wp_no_robots' ); 
    77
    88require( dirname( __FILE__ ) . '/wp-blog-header.php' );
    99
    10 if ( is_array( get_site_option( 'illegal_names' )) && isset( $_GET[ 'new' ] ) && in_array( $_GET[ 'new' ], get_site_option( 'illegal_names' ) ) ) {
     10if ( is_array( get_network_option( 'illegal_names' )) && isset( $_GET[ 'new' ] ) && in_array( $_GET[ 'new' ], get_network_option( 'illegal_names' ) ) ) {
    1111        wp_redirect( network_home_url() );
    1212        die();
    1313}
    function confirm_blog_signup( $domain, $path, $blog_title, $user_name = '', $use 
    643643}
    644644
    645645// Main
    646 $active_signup = get_site_option( 'registration', 'none' );
     646$active_signup = get_network_option( 'registration', 'none' );
    647647/**
    648648 * Filter the type of site sign-up.
    649649 *