WordPress.org

Make WordPress Core

Changeset 34778


Ignore:
Timestamp:
10/02/2015 07:07:23 PM (4 years ago)
Author:
jeremyfelt
Message:

MS: Use *_network_option() functions throughout core.

Replaces all uses of *_site_option() with the corresponding "network" function.

This excludes one usage in wp-admin/admin-footer.php that needs more investigation.

Props spacedmonkey.
See #28290.

Location:
trunk/src
Files:
36 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/ajax-actions.php

    r34714 r34778  
    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    }
     
    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    }
  • trunk/src/wp-admin/includes/class-wp-plugins-list-table.php

    r34551 r34778  
    131131
    132132        if ( $screen->in_admin( 'network' ) ) {
    133             $recently_activated = get_site_option( 'recently_activated', array() );
     133            $recently_activated = get_network_option( 'recently_activated', array() );
    134134        } else {
    135135            $recently_activated = get_option( 'recently_activated', array() );
     
    143143
    144144        if ( $screen->in_admin( 'network' ) ) {
    145             update_site_option( 'recently_activated', $recently_activated );
     145            update_network_option( 'recently_activated', $recently_activated );
    146146        } else {
    147147            update_option( 'recently_activated', $recently_activated );
  • trunk/src/wp-admin/includes/class-wp-themes-list-table.php

    r33492 r34778  
    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
  • trunk/src/wp-admin/includes/class-wp-upgrader.php

    r34751 r34778  
    23692369            return false;
    23702370
    2371         $failure_data = get_site_option( 'auto_core_update_failed' );
     2371        $failure_data = get_network_option( 'auto_core_update_failed' );
    23722372        if ( $failure_data ) {
    23732373            // If this was a critical update failure, cannot update.
     
    27812781     */
    27822782    protected function send_core_update_notification_email( $item ) {
    2783         $notified = get_site_option( 'auto_core_update_notified' );
     2783        $notified = get_network_option( 'auto_core_update_notified' );
    27842784
    27852785        // Don't notify if we've already notified the same email address of the same version.
    2786         if ( $notified && $notified['email'] == get_site_option( 'admin_email' ) && $notified['version'] == $item->current )
     2786        if ( $notified && $notified['email'] == get_network_option( 'admin_email' ) && $notified['version'] == $item->current )
    27872787            return false;
    27882788
     
    31093109                $critical_data['rollback_data'] = $rollback_result->get_error_data();
    31103110            }
    3111             update_site_option( 'auto_core_update_failed', $critical_data );
     3111            update_network_option( 'auto_core_update_failed', $critical_data );
    31123112            $this->send_email( 'critical', $core_update, $result );
    31133113            return;
     
    31273127        $send = true;
    31283128        $transient_failures = array( 'incompatible_archive', 'download_failed', 'insane_distro' );
    3129         if ( in_array( $error_code, $transient_failures ) && ! get_site_option( 'auto_core_update_failed' ) ) {
     3129        if ( in_array( $error_code, $transient_failures ) && ! get_network_option( 'auto_core_update_failed' ) ) {
    31303130            wp_schedule_single_event( time() + HOUR_IN_SECONDS, 'wp_maybe_auto_update' );
    31313131            $send = false;
    31323132        }
    31333133
    3134         $n = get_site_option( 'auto_core_update_notified' );
     3134        $n = get_network_option( 'auto_core_update_notified' );
    31353135        // Don't notify if we've already notified the same email address of the same version of the same notification type.
    3136         if ( $n && 'fail' == $n['type'] && $n['email'] == get_site_option( 'admin_email' ) && $n['version'] == $core_update->current )
     3136        if ( $n && 'fail' == $n['type'] && $n['email'] == get_network_option( 'admin_email' ) && $n['version'] == $core_update->current )
    31373137            $send = false;
    31383138
    3139         update_site_option( 'auto_core_update_failed', array(
     3139        update_network_option( 'auto_core_update_failed', array(
    31403140            'attempted'  => $core_update->current,
    31413141            'current'    => $wp_version,
     
    31633163     */
    31643164    protected function send_email( $type, $core_update, $result = null ) {
    3165         update_site_option( 'auto_core_update_notified', array(
     3165        update_network_option( 'auto_core_update_notified', array(
    31663166            'type'      => $type,
    3167             'email'     => get_site_option( 'admin_email' ),
     3167            'email'     => get_network_option( 'admin_email' ),
    31683168            'version'   => $core_update->current,
    31693169            'timestamp' => time(),
     
    33213321        }
    33223322
    3323         $to  = get_site_option( 'admin_email' );
     3323        $to  = get_network_option( 'admin_email' );
    33243324        $headers = '';
    33253325
     
    34953495
    34963496        $email = array(
    3497             'to'      => get_site_option( 'admin_email' ),
     3497            'to'      => get_network_option( 'admin_email' ),
    34983498            'subject' => $subject,
    34993499            'body'    => implode( "\n", $body ),
  • trunk/src/wp-admin/includes/dashboard.php

    r34566 r34778  
    11971197*/
    11981198function wp_dashboard_quota() {
    1199     if ( !is_multisite() || !current_user_can( 'upload_files' ) || get_site_option( 'upload_space_check_disabled' ) )
     1199    if ( !is_multisite() || !current_user_can( 'upload_files' ) || get_network_option( 'upload_space_check_disabled' ) )
    12001200        return true;
    12011201
  • trunk/src/wp-admin/includes/ms.php

    r34034 r34778  
    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
     
    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.' );
     
    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    }
     
    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
     
    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
     
    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
     
    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}
     
    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">
     
    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        /**
     
    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            /**
  • trunk/src/wp-admin/includes/network.php

    r34299 r34778  
    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">
     
    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";
  • trunk/src/wp-admin/includes/plugin.php

    r34566 r34778  
    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;
     
    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 {
     
    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() );
     
    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;
     
    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
     
    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    }
  • trunk/src/wp-admin/includes/schema.php

    r34562 r34778  
    936936        }
    937937    } else {
    938         $site_admins = get_site_option( 'site_admins' );
     938        $site_admins = get_network_option( 'site_admins' );
    939939    }
    940940
     
    986986        'siteurl' => get_option( 'siteurl' ) . '/',
    987987        'add_new_users' => '0',
    988         'upload_space_check_disabled' => is_multisite() ? get_site_option( 'upload_space_check_disabled' ) : '1',
     988        'upload_space_check_disabled' => is_multisite() ? get_network_option( 'upload_space_check_disabled' ) : '1',
    989989        'subdomain_install' => intval( $subdomain_install ),
    990990        'global_terms_enabled' => global_terms_enabled() ? '1' : '0',
    991         'ms_files_rewriting' => is_multisite() ? get_site_option( 'ms_files_rewriting' ) : '0',
     991        'ms_files_rewriting' => is_multisite() ? get_network_option( 'ms_files_rewriting' ) : '0',
    992992        'initial_db_version' => get_option( 'initial_db_version' ),
    993993        'active_sitewide_plugins' => array(),
  • trunk/src/wp-admin/includes/update-core.php

    r34467 r34778  
    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;
  • trunk/src/wp-admin/includes/update.php

    r34296 r34778  
    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 ) )
     
    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
     
    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
     
    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
     
    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.
  • trunk/src/wp-admin/includes/upgrade.php

    r34529 r34778  
    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) )
     
    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(
     
    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(
     
    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.
     
    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 )
     
    16521652                $sitewide_plugins = array_merge( (array) $active_sitewide_plugins, (array) $wpmu_sitewide_plugins );
    16531653
    1654             update_site_option( 'active_sitewide_plugins', $sitewide_plugins );
    1655         }
    1656         delete_site_option( 'wpmu_sitewide_plugins' );
    1657         delete_site_option( 'deactivated_sitewide_plugins' );
     1654            update_network_option( 'active_sitewide_plugins', $sitewide_plugins );
     1655        }
     1656        delete_network_option( 'wpmu_sitewide_plugins' );
     1657        delete_network_option( 'deactivated_sitewide_plugins' );
    16581658
    16591659        $start = 0;
     
    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            }
     
    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
     
    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();
     
    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    }
     
    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    }
  • trunk/src/wp-admin/network/settings.php

    r34695 r34778  
    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
     
    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.' ); ?>
     
    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>
     
    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>
     
    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>
     
    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.' ) ?>
     
    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">
     
    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.' ) ?>
     
    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.' ) ?>
     
    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.' ) ?>
     
    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.' ) ?>
     
    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.' ) ?>
     
    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.' ) ?>
     
    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.' ) ?>
     
    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.' ) ?>
     
    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' ) ?>
     
    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.' ) ?>
     
    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' ) ?>
     
    313313                    <td>
    314314                        <?php
    315                         $lang = get_site_option( 'WPLANG' );
     315                        $lang = get_network_option( 'WPLANG' );
    316316                        if ( ! in_array( $lang, $languages ) ) {
    317317                            $lang = '';
     
    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.
  • trunk/src/wp-admin/network/site-new.php

    r34673 r34778  
    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' ) );
     
    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.
  • trunk/src/wp-admin/network/themes.php

    r33734 r34778  
    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' ) );
     
    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;
     
    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;
     
    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;
  • trunk/src/wp-admin/network/upgrade.php

    r34701 r34778  
    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
     
    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        <h2><?php _e( 'Database Upgrade Required' ); ?></h2>
  • trunk/src/wp-admin/options-writing.php

    r34096 r34778  
    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>
  • trunk/src/wp-admin/options.php

    r34561 r34778  
    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';
  • trunk/src/wp-admin/plugin-editor.php

    r34551 r34778  
    7575                update_option( 'recently_activated', array( $file => time() ) + (array) get_option( 'recently_activated' ) );
    7676            } else {
    77                 update_site_option( 'recently_activated', array( $file => time() ) + (array) get_site_option( 'recently_activated' ) );
     77                update_network_option( 'recently_activated', array( $file => time() ) + (array) get_network_option( 'recently_activated' ) );
    7878            }
    7979
  • trunk/src/wp-admin/plugins.php

    r34591 r34778  
    5656                update_option( 'recently_activated', $recent );
    5757            } else {
    58                 $recent = (array) get_site_option( 'recently_activated' );
     58                $recent = (array) get_network_option( 'recently_activated' );
    5959                unset( $recent[ $plugin ] );
    60                 update_site_option( 'recently_activated', $recent );
     60                update_network_option( 'recently_activated', $recent );
    6161            }
    6262
     
    102102                $recent = (array) get_option('recently_activated' );
    103103            } else {
    104                 $recent = (array) get_site_option('recently_activated' );
     104                $recent = (array) get_network_option( 'recently_activated' );
    105105            }
    106106
     
    112112                update_option( 'recently_activated', $recent );
    113113            } else {
    114                 update_site_option( 'recently_activated', $recent );
     114                update_network_option( 'recently_activated', $recent );
    115115            }
    116116
     
    183183                update_option( 'recently_activated', array( $plugin => time() ) + (array) get_option( 'recently_activated' ) );
    184184            } else {
    185                 update_site_option( 'recently_activated', array( $plugin => time() ) + (array) get_site_option( 'recently_activated' ) );
     185                update_network_option( 'recently_activated', array( $plugin => time() ) + (array) get_network_option( 'recently_activated' ) );
    186186            }
    187187
     
    221221                update_option( 'recently_activated', $deactivated + (array) get_option( 'recently_activated' ) );
    222222            } else {
    223                 update_site_option( 'recently_activated', $deactivated + (array) get_site_option( 'recently_activated' ) );
     223                update_network_option( 'recently_activated', $deactivated + (array) get_network_option( 'recently_activated' ) );
    224224            }
    225225
     
    383383                update_option( 'recently_activated', array() );
    384384            } else {
    385                 update_site_option( 'recently_activated', array() );
     385                update_network_option( 'recently_activated', array() );
    386386            }
    387387            break;
  • trunk/src/wp-admin/user-edit.php

    r34593 r34778  
    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 : ?>
  • trunk/src/wp-includes/capabilities-functions.php

    r34412 r34778  
    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';
     
    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
     
    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
  • trunk/src/wp-includes/class-wp-theme.php

    r34236 r34778  
    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    }
  • trunk/src/wp-includes/default-constants.php

    r33737 r34778  
    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 ) );
  • trunk/src/wp-includes/functions.php

    r34700 r34778  
    17631763     * We also sometimes obey UPLOADS when rewriting is enabled -- see the next block.
    17641764     */
    1765     if ( defined( 'UPLOADS' ) && ! ( is_multisite() && get_site_option( 'ms_files_rewriting' ) ) ) {
     1765    if ( defined( 'UPLOADS' ) && ! ( is_multisite() && get_network_option( 'ms_files_rewriting' ) ) ) {
    17661766        $dir = ABSPATH . UPLOADS;
    17671767        $url = trailingslashit( $siteurl ) . UPLOADS;
     
    17711771    if ( is_multisite() && ! ( is_main_network() && is_main_site() && defined( 'MULTISITE' ) ) ) {
    17721772
    1773         if ( ! get_site_option( 'ms_files_rewriting' ) ) {
     1773        if ( ! get_network_option( 'ms_files_rewriting' ) ) {
    17741774            /*
    17751775             * If ms-files rewriting is disabled (networks created post-3.5), it is fairly
     
    40044004            $global_terms = (bool) $filter;
    40054005        else
    4006             $global_terms = (bool) get_site_option( 'global_terms_enabled', false );
     4006            $global_terms = (bool) get_network_option( 'global_terms_enabled', false );
    40074007    }
    40084008    return $global_terms;
  • trunk/src/wp-includes/l10n.php

    r34485 r34778  
    5555        // Don't check blog option when installing.
    5656        if ( defined( 'WP_INSTALLING' ) || ( false === $ms_locale = get_option( 'WPLANG' ) ) ) {
    57             $ms_locale = get_site_option( 'WPLANG' );
     57            $ms_locale = get_network_option( 'WPLANG' );
    5858        }
    5959
  • trunk/src/wp-includes/ms-default-constants.php

    r32611 r34778  
    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
  • trunk/src/wp-includes/ms-deprecated.php

    r34755 r34778  
    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
  • trunk/src/wp-includes/ms-functions.php

    r34755 r34778  
    101101 */
    102102function get_user_count() {
    103     return get_site_option( 'user_count' );
     103    return get_network_option( 'user_count' );
    104104}
    105105
     
    118118        _deprecated_argument( __FUNCTION__, '3.1' );
    119119
    120     return get_site_option( 'blog_count' );
     120    return get_network_option( 'blog_count' );
    121121}
    122122
     
    345345 */
    346346function is_email_address_unsafe( $user_email ) {
    347     $banned_names = get_site_option( 'banned_email_domains' );
     347    $banned_names = get_network_option( 'banned_email_domains' );
    348348    if ( $banned_names && ! is_array( $banned_names ) )
    349349        $banned_names = explode( "\n", $banned_names );
     
    423423        $errors->add('user_name', __( 'Please enter a username.' ) );
    424424
    425     $illegal_names = get_site_option( 'illegal_names' );
     425    $illegal_names = get_network_option( 'illegal_names' );
    426426    if ( ! is_array( $illegal_names ) ) {
    427427        $illegal_names = array(  'www', 'web', 'root', 'admin', 'main', 'invite', 'administrator' );
    428         add_site_option( 'illegal_names', $illegal_names );
     428        add_network_option( 'illegal_names', $illegal_names );
    429429    }
    430430    if ( in_array( $user_name, $illegal_names ) )
     
    451451        $errors->add('user_email', __( 'Please enter a valid email address.' ) );
    452452
    453     $limited_email_domains = get_site_option( 'limited_email_domains' );
     453    $limited_email_domains = get_network_option( 'limited_email_domains' );
    454454    if ( is_array( $limited_email_domains ) && ! empty( $limited_email_domains ) ) {
    455455        $emaildomain = substr( $user_email, 1 + strpos( $user_email, '@' ) );
     
    545545
    546546    $errors = new WP_Error();
    547     $illegal_names = get_site_option( 'illegal_names' );
     547    $illegal_names = get_network_option( 'illegal_names' );
    548548    if ( $illegal_names == false ) {
    549549        $illegal_names = array( 'www', 'web', 'root', 'admin', 'main', 'invite', 'administrator' );
    550         add_site_option( 'illegal_names', $illegal_names );
     550        add_network_option( 'illegal_names', $illegal_names );
    551551    }
    552552
     
    802802
    803803    $activate_url = esc_url($activate_url);
    804     $admin_email = get_site_option( 'admin_email' );
     804    $admin_email = get_network_option( 'admin_email' );
    805805    if ( $admin_email == '' )
    806806        $admin_email = 'support@' . $_SERVER['SERVER_NAME'];
    807     $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) );
     807    $from_name = get_network_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_network_option( 'site_name' ) );
    808808    $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
    809809    $message = sprintf(
     
    895895
    896896    // Send email with activation link.
    897     $admin_email = get_site_option( 'admin_email' );
     897    $admin_email = get_network_option( 'admin_email' );
    898898    if ( $admin_email == '' )
    899899        $admin_email = 'support@' . $_SERVER['SERVER_NAME'];
    900     $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) );
     900    $from_name = get_network_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_network_option( 'site_name' ) );
    901901    $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
    902902    $message = sprintf(
     
    11361136    }
    11371137
    1138     add_option( 'WPLANG', get_site_option( 'WPLANG' ) );
     1138    add_option( 'WPLANG', get_network_option( 'WPLANG' ) );
    11391139    update_option( 'blog_public', (int) $meta['public'] );
    11401140
     
    11721172 */
    11731173function newblog_notify_siteadmin( $blog_id, $deprecated = '' ) {
    1174     if ( get_site_option( 'registrationnotification' ) != 'yes' )
     1174    if ( get_network_option( 'registrationnotification' ) != 'yes' )
    11751175        return false;
    11761176
    1177     $email = get_site_option( 'admin_email' );
     1177    $email = get_network_option( 'admin_email' );
    11781178    if ( is_email($email) == false )
    11791179        return false;
     
    12171217 */
    12181218function newuser_notify_siteadmin( $user_id ) {
    1219     if ( get_site_option( 'registrationnotification' ) != 'yes' )
     1219    if ( get_network_option( 'registrationnotification' ) != 'yes' )
    12201220        return false;
    12211221
    1222     $email = get_site_option( 'admin_email' );
     1222    $email = get_network_option( 'admin_email' );
    12231223
    12241224    if ( is_email($email) == false )
     
    13561356    update_option( 'home', $url );
    13571357
    1358     if ( get_site_option( 'ms_files_rewriting' ) )
     1358    if ( get_network_option( 'ms_files_rewriting' ) )
    13591359        update_option( 'upload_path', UPLOADBLOGSDIR . "/$blog_id/files" );
    13601360    else
     
    14321432        return false;
    14331433
    1434     $welcome_email = get_site_option( 'welcome_email' );
     1434    $welcome_email = get_network_option( 'welcome_email' );
    14351435    if ( $welcome_email == false ) {
    14361436        /* translators: Do not translate USERNAME, SITE_NAME, BLOG_URL, PASSWORD: those are placeholders. */
     
    14751475     */
    14761476    $welcome_email = apply_filters( 'update_welcome_email', $welcome_email, $blog_id, $user_id, $password, $title, $meta );
    1477     $admin_email = get_site_option( 'admin_email' );
     1477    $admin_email = get_network_option( 'admin_email' );
    14781478
    14791479    if ( $admin_email == '' )
    14801480        $admin_email = 'support@' . $_SERVER['SERVER_NAME'];
    14811481
    1482     $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) );
     1482    $from_name = get_network_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_network_option( 'site_name' ) );
    14831483    $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
    14841484    $message = $welcome_email;
     
    15311531        return false;
    15321532
    1533     $welcome_email = get_site_option( 'welcome_user_email' );
     1533    $welcome_email = get_network_option( 'welcome_user_email' );
    15341534
    15351535    $user = get_userdata( $user_id );
     
    15531553    $welcome_email = str_replace( 'LOGINLINK', wp_login_url(), $welcome_email );
    15541554
    1555     $admin_email = get_site_option( 'admin_email' );
     1555    $admin_email = get_network_option( 'admin_email' );
    15561556
    15571557    if ( $admin_email == '' )
    15581558        $admin_email = 'support@' . $_SERVER['SERVER_NAME'];
    15591559
    1560     $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) );
     1560    $from_name = get_network_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_network_option( 'site_name' ) );
    15611561    $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
    15621562    $message = $welcome_email;
     
    17301730 */
    17311731function check_upload_mimes( $mimes ) {
    1732     $site_exts = explode( ' ', get_site_option( 'upload_filetypes', 'jpg jpeg png gif' ) );
     1732    $site_exts = explode( ' ', get_network_option( 'upload_filetypes', 'jpg jpeg png gif' ) );
    17331733    $site_mimes = array();
    17341734    foreach ( $site_exts as $ext ) {
     
    18711871 */
    18721872function upload_is_file_too_big( $upload ) {
    1873     if ( ! is_array( $upload ) || defined( 'WP_IMPORTING' ) || get_site_option( 'upload_space_check_disabled' ) )
     1873    if ( ! is_array( $upload ) || defined( 'WP_IMPORTING' ) || get_network_option( 'upload_space_check_disabled' ) )
    18741874        return $upload;
    18751875
    1876     if ( strlen( $upload['bits'] )  > ( 1024 * get_site_option( 'fileupload_maxk', 1500 ) ) )
    1877         return sprintf( __( 'This file is too big. Files must be less than %d KB in size.' ) . '<br />', get_site_option( 'fileupload_maxk', 1500 ));
     1876    if ( strlen( $upload['bits'] )  > ( 1024 * get_network_option( 'fileupload_maxk', 1500 ) ) )
     1877        return sprintf( __( 'This file is too big. Files must be less than %d KB in size.' ) . '<br />', get_network_option( 'fileupload_maxk', 1500 ) );
    18781878
    18791879    return $upload;
     
    20882088 */
    20892089function users_can_register_signup_filter() {
    2090     $registration = get_site_option('registration');
     2090    $registration = get_network_option( 'registration' );
    20912091    return ( $registration == 'all' || $registration == 'user' );
    20922092}
     
    21172117
    21182118--The Team @ SITE_NAME' );
    2119         update_site_option( 'welcome_user_email', $text );
     2119        update_network_option( 'welcome_user_email', $text );
    21202120    }
    21212121    return $text;
     
    22432243
    22442244    $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) );
    2245     update_site_option( 'blog_count', $count );
     2245    update_network_option( 'blog_count', $count );
    22462246}
    22472247
     
    22572257
    22582258    $count = $wpdb->get_var( "SELECT COUNT(ID) as c FROM $wpdb->users WHERE spam = '0' AND deleted = '0'" );
    2259     update_site_option( 'user_count', $count );
     2259    update_network_option( 'user_count', $count );
    22602260}
    22612261
     
    22952295
    22962296    if ( ! is_numeric( $space_allowed ) )
    2297         $space_allowed = get_site_option( 'blog_upload_space' );
     2297        $space_allowed = get_network_option( 'blog_upload_space' );
    22982298
    22992299    if ( empty( $space_allowed ) || ! is_numeric( $space_allowed ) )
     
    23232323    }
    23242324    $space_allowed = $allowed * 1024 * 1024;
    2325     if ( get_site_option( 'upload_space_check_disabled' ) )
     2325    if ( get_network_option( 'upload_space_check_disabled' ) )
    23262326        return $space_allowed;
    23272327
     
    23412341 */
    23422342function is_upload_space_available() {
    2343     if ( get_site_option( 'upload_space_check_disabled' ) )
     2343    if ( get_network_option( 'upload_space_check_disabled' ) )
    23442344        return true;
    23452345
     
    23532353 */
    23542354function upload_size_limit_filter( $size ) {
    2355     $fileupload_maxk = 1024 * get_site_option( 'fileupload_maxk', 1500 );
    2356     if ( get_site_option( 'upload_space_check_disabled' ) )
     2355    $fileupload_maxk = 1024 * get_network_option( 'fileupload_maxk', 1500 );
     2356    if ( get_network_option( 'upload_space_check_disabled' ) )
    23572357        return min( $size, $fileupload_maxk );
    23582358
  • trunk/src/wp-includes/ms-load.php

    r34099 r34778  
    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();
     
    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
  • trunk/src/wp-includes/ms-settings.php

    r34099 r34778  
    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 );
  • trunk/src/wp-includes/option.php

    r34777 r34778  
    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;
     
    14671467        $option_timeout = '_site_transient_timeout_' . $transient;
    14681468        $option = '_site_transient_' . $transient;
    1469         $result = delete_site_option( $option );
     1469        $result = delete_network_option( $option );
    14701470        if ( $result )
    1471             delete_site_option( $option_timeout );
     1471            delete_network_option( $option_timeout );
    14721472    }
    14731473    if ( $result ) {
     
    15301530        if ( ! in_array( $transient, $no_timeout ) ) {
    15311531            $transient_timeout = '_site_transient_timeout_' . $transient;
    1532             $timeout = get_site_option( $transient_timeout );
     1532            $timeout = get_network_option( $transient_timeout );
    15331533            if ( false !== $timeout && $timeout < time() ) {
    1534                 delete_site_option( $transient_option  );
    1535                 delete_site_option( $transient_timeout );
     1534                delete_network_option( $transient_option  );
     1535                delete_network_option( $transient_timeout );
    15361536                $value = false;
    15371537            }
     
    15391539
    15401540        if ( ! isset( $value ) )
    1541             $value = get_site_option( $transient_option );
     1541            $value = get_network_option( $transient_option );
    15421542    }
    15431543
     
    15941594        $transient_timeout = '_site_transient_timeout_' . $transient;
    15951595        $option = '_site_transient_' . $transient;
    1596         if ( false === get_site_option( $option ) ) {
     1596        if ( false === get_network_option( $option ) ) {
    15971597            if ( $expiration )
    1598                 add_site_option( $transient_timeout, time() + $expiration );
    1599             $result = add_site_option( $option, $value );
     1598                add_network_option( $transient_timeout, time() + $expiration );
     1599            $result = add_network_option( $option, $value );
    16001600        } else {
    16011601            if ( $expiration )
    1602                 update_site_option( $transient_timeout, time() + $expiration );
    1603             $result = update_site_option( $option, $value );
     1602                update_network_option( $transient_timeout, time() + $expiration );
     1603            $result = update_network_option( $option, $value );
    16041604        }
    16051605    }
  • trunk/src/wp-includes/pluggable.php

    r34348 r34778  
    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            }
     
    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        }
  • trunk/src/wp-includes/script-loader.php

    r34467 r34778  
    11621162    if ( ! isset($compress_scripts) ) {
    11631163        $compress_scripts = defined('COMPRESS_SCRIPTS') ? COMPRESS_SCRIPTS : true;
    1164         if ( $compress_scripts && ( ! get_site_option('can_compress_scripts') || $compressed_output ) )
     1164        if ( $compress_scripts && ( ! get_network_option( 'can_compress_scripts' ) || $compressed_output ) )
    11651165            $compress_scripts = false;
    11661166    }
     
    11681168    if ( ! isset($compress_css) ) {
    11691169        $compress_css = defined('COMPRESS_CSS') ? COMPRESS_CSS : true;
    1170         if ( $compress_css && ( ! get_site_option('can_compress_scripts') || $compressed_output ) )
     1170        if ( $compress_css && ( ! get_network_option( 'can_compress_scripts' ) || $compressed_output ) )
    11711171            $compress_css = false;
    11721172    }
  • trunk/src/wp-includes/user-functions.php

    r34705 r34778  
    18101810function wp_get_user_contact_methods( $user = null ) {
    18111811    $methods = array();
    1812     if ( get_site_option( 'initial_db_version' ) < 23588 ) {
     1812    if ( get_network_option( 'initial_db_version' ) < 23588 ) {
    18131813        $methods = array(
    18141814            'aim'    => __( 'AIM' ),
  • trunk/src/wp-signup.php

    r34665 r34778  
    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();
     
    645645
    646646// Main
    647 $active_signup = get_site_option( 'registration', 'none' );
     647$active_signup = get_network_option( 'registration', 'none' );
    648648/**
    649649 * Filter the type of site sign-up.
Note: See TracChangeset for help on using the changeset viewer.