Make WordPress Core

Changeset 34912


Ignore:
Timestamp:
10/07/2015 05:11:01 PM (9 years ago)
Author:
jeremyfelt
Message:

Revert [34778], continue using _site_option() for the current network.

The _network_option() parameter order will be changing to accept $network_id first. The _site_option() functions will remain in use throughout core as our way of retrieving a network option for the current network.

See #28290.

Location:
trunk/src
Files:
35 edited

Legend:

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

    r34778 r34912  
    166166
    167167    if ( ini_get('zlib.output_compression') || 'ob_gzhandler' == ini_get('output_handler') ) {
    168         update_network_option( 'can_compress_scripts', 0 );
     168        update_site_option('can_compress_scripts', 0);
    169169        wp_die( 0 );
    170170    }
     
    197197            wp_die();
    198198        } elseif ( 'no' == $_GET['test'] ) {
    199             update_network_option( 'can_compress_scripts', 0 );
     199            update_site_option('can_compress_scripts', 0);
    200200        } elseif ( 'yes' == $_GET['test'] ) {
    201             update_network_option( 'can_compress_scripts', 1 );
     201            update_site_option('can_compress_scripts', 1);
    202202        }
    203203    }
  • trunk/src/wp-admin/includes/class-wp-plugins-list-table.php

    r34786 r34912  
    131131
    132132        if ( $screen->in_admin( 'network' ) ) {
    133             $recently_activated = get_network_option( 'recently_activated', array() );
     133            $recently_activated = get_site_option( 'recently_activated', array() );
    134134        } else {
    135135            $recently_activated = get_option( 'recently_activated', array() );
     
    143143
    144144        if ( $screen->in_admin( 'network' ) ) {
    145             update_network_option( 'recently_activated', $recently_activated );
     145            update_site_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

    r34778 r34912  
    103103        }
    104104        // Fallthrough.
    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' ) );
     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' ) );
    106106    }
    107107
  • trunk/src/wp-admin/includes/class-wp-upgrader.php

    r34828 r34912  
    23692369            return false;
    23702370
    2371         $failure_data = get_network_option( 'auto_core_update_failed' );
     2371        $failure_data = get_site_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_network_option( 'auto_core_update_notified' );
     2783        $notified = get_site_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_network_option( 'admin_email' ) && $notified['version'] == $item->current )
     2786        if ( $notified && $notified['email'] == get_site_option( 'admin_email' ) && $notified['version'] == $item->current )
    27872787            return false;
    27882788
     
    31093109                $critical_data['rollback_data'] = $rollback_result->get_error_data();
    31103110            }
    3111             update_network_option( 'auto_core_update_failed', $critical_data );
     3111            update_site_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_network_option( 'auto_core_update_failed' ) ) {
     3129        if ( in_array( $error_code, $transient_failures ) && ! get_site_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_network_option( 'auto_core_update_notified' );
     3134        $n = get_site_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_network_option( 'admin_email' ) && $n['version'] == $core_update->current )
     3136        if ( $n && 'fail' == $n['type'] && $n['email'] == get_site_option( 'admin_email' ) && $n['version'] == $core_update->current )
    31373137            $send = false;
    31383138
    3139         update_network_option( 'auto_core_update_failed', array(
     3139        update_site_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_network_option( 'auto_core_update_notified', array(
     3165        update_site_option( 'auto_core_update_notified', array(
    31663166            'type'      => $type,
    3167             'email'     => get_network_option( 'admin_email' ),
     3167            'email'     => get_site_option( 'admin_email' ),
    31683168            'version'   => $core_update->current,
    31693169            'timestamp' => time(),
     
    33213321        }
    33223322
    3323         $to  = get_network_option( 'admin_email' );
     3323        $to  = get_site_option( 'admin_email' );
    33243324        $headers = '';
    33253325
     
    34953495
    34963496        $email = array(
    3497             'to'      => get_network_option( 'admin_email' ),
     3497            'to'      => get_site_option( 'admin_email' ),
    34983498            'subject' => $subject,
    34993499            'body'    => implode( "\n", $body ),
  • trunk/src/wp-admin/includes/dashboard.php

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

    r34778 r34912  
    1717 */
    1818function check_upload_size( $file ) {
    19     if ( get_network_option( 'upload_space_check_disabled' ) )
     19    if ( get_site_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_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 ) );
     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 ) );
    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_network_option( 'ms_files_rewriting' ) && empty( $upload_path ) ) {
     101    if ( $drop && get_site_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_network_option( 'site_name' ), $content );
     309    $content = str_replace( '###SITENAME###', get_site_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_network_option( 'site_name' ), $content );
     388        $content = str_replace( '###SITENAME###', get_site_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_network_option( 'upload_space_check_disabled' ) )
     416    if ( get_site_option( 'upload_space_check_disabled' ) )
    417417        return false;
    418418
     
    747747    if ( !is_super_admin() )
    748748        return false;
    749     if ( get_network_option( 'wpmu_upgrade_site' ) != $wp_db_version )
     749    if ( get_site_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_network_option( 'registration' ), array( 'all', 'blog' ) ) ) : ?>
     831    <?php if ( in_array( get_site_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_network_option( 'site_admins', array( 'admin' ) );
     873    $super_admins = get_site_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_network_option( 'site_admins' , $super_admins );
     878        update_site_option( 'site_admins' , $super_admins );
    879879
    880880        /**
     
    918918
    919919    // Directly fetch site_admins instead of using get_super_admins()
    920     $super_admins = get_network_option( 'site_admins', array( 'admin' ) );
     920    $super_admins = get_site_option( 'site_admins', array( 'admin' ) );
    921921
    922922    $user = get_userdata( $user_id );
    923     if ( $user && 0 !== strcasecmp( $user->user_email, get_network_option( 'admin_email' ) ) ) {
     923    if ( $user && 0 !== strcasecmp( $user->user_email, get_site_option( 'admin_email' ) ) ) {
    924924        if ( false !== ( $key = array_search( $user->user_login, $super_admins ) ) ) {
    925925            unset( $super_admins[$key] );
    926             update_network_option( 'site_admins', $super_admins );
     926            update_site_option( 'site_admins', $super_admins );
    927927
    928928            /**
  • trunk/src/wp-admin/includes/network.php

    r34778 r34912  
    451451                    <action type="None" />
    452452                </rule>';
    453                 if ( is_multisite() && get_network_option( 'ms_files_rewriting' ) ) {
     453                if ( is_multisite() && get_site_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_network_option( 'ms_files_rewriting' ) ) {
     509        if ( is_multisite() && get_site_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

    r34825 r34912  
    463463        return false;
    464464
    465     $plugins = get_network_option( 'active_sitewide_plugins' );
     465    $plugins = get_site_option( 'active_sitewide_plugins');
    466466    if ( isset($plugins[$plugin]) )
    467467        return true;
     
    521521    if ( is_multisite() && ( $network_wide || is_network_only_plugin($plugin) ) ) {
    522522        $network_wide = true;
    523         $current = get_network_option( 'active_sitewide_plugins', array() );
     523        $current = get_site_option( 'active_sitewide_plugins', array() );
    524524        $_GET['networkwide'] = 1; // Back compat for plugins looking for this value.
    525525    } else {
     
    574574
    575575        if ( $network_wide ) {
    576             $current = get_network_option( 'active_sitewide_plugins', array() );
     576            $current = get_site_option( 'active_sitewide_plugins', array() );
    577577            $current[$plugin] = time();
    578             update_network_option( 'active_sitewide_plugins', $current );
     578            update_site_option( 'active_sitewide_plugins', $current );
    579579        } else {
    580580            $current = get_option( 'active_plugins', array() );
     
    625625function deactivate_plugins( $plugins, $silent = false, $network_wide = null ) {
    626626    if ( is_multisite() )
    627         $network_current = get_network_option( 'active_sitewide_plugins', array() );
     627        $network_current = get_site_option( 'active_sitewide_plugins', array() );
    628628    $current = get_option( 'active_plugins', array() );
    629629    $do_blog = $do_network = false;
     
    706706        update_option('active_plugins', $current);
    707707    if ( $do_network )
    708         update_network_option( 'active_sitewide_plugins', $network_current );
     708        update_site_option( 'active_sitewide_plugins', $network_current );
    709709}
    710710
     
    878878
    879879    if ( is_multisite() && current_user_can( 'manage_network_plugins' ) ) {
    880         $network_plugins = (array) get_network_option( 'active_sitewide_plugins', array() );
     880        $network_plugins = (array) get_site_option( 'active_sitewide_plugins', array() );
    881881        $plugins = array_merge( $plugins, array_keys( $network_plugins ) );
    882882    }
  • trunk/src/wp-admin/includes/schema.php

    r34778 r34912  
    936936        }
    937937    } else {
    938         $site_admins = get_network_option( 'site_admins' );
     938        $site_admins = get_site_option( 'site_admins' );
    939939    }
    940940
     
    986986        'siteurl' => get_option( 'siteurl' ) . '/',
    987987        'add_new_users' => '0',
    988         'upload_space_check_disabled' => is_multisite() ? get_network_option( 'upload_space_check_disabled' ) : '1',
     988        'upload_space_check_disabled' => is_multisite() ? get_site_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_network_option( 'ms_files_rewriting' ) : '0',
     991        'ms_files_rewriting' => is_multisite() ? get_site_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

    r34778 r34912  
    11031103
    11041104    // Clear the option that blocks auto updates after failures, now that we've been successful.
    1105     if ( function_exists( 'delete_network_option' ) )
    1106         delete_network_option( 'auto_core_update_failed' );
     1105    if ( function_exists( 'delete_site_option' ) )
     1106        delete_site_option( 'auto_core_update_failed' );
    11071107
    11081108    return $wp_version;
  • trunk/src/wp-admin/includes/update.php

    r34778 r34912  
    3030function get_core_updates( $options = array() ) {
    3131    $options = array_merge( array( 'available' => true, 'dismissed' => false ), $options );
    32     $dismissed = get_network_option( 'dismissed_update_core' );
     32    $dismissed = get_site_option( 'dismissed_update_core' );
    3333
    3434    if ( ! is_array( $dismissed ) )
     
    135135 */
    136136function dismiss_core_update( $update ) {
    137     $dismissed = get_network_option( 'dismissed_update_core' );
     137    $dismissed = get_site_option( 'dismissed_update_core' );
    138138    $dismissed[ $update->current . '|' . $update->locale ] = true;
    139     return update_network_option( 'dismissed_update_core', $dismissed );
     139    return update_site_option( 'dismissed_update_core', $dismissed );
    140140}
    141141
     
    147147 */
    148148function undismiss_core_update( $version, $locale ) {
    149     $dismissed = get_network_option( 'dismissed_update_core' );
     149    $dismissed = get_site_option( 'dismissed_update_core' );
    150150    $key = $version . '|' . $locale;
    151151
     
    154154
    155155    unset( $dismissed[$key] );
    156     return update_network_option( 'dismissed_update_core', $dismissed );
     156    return update_site_option( 'dismissed_update_core', $dismissed );
    157157}
    158158
     
    479479    $nag = isset( $upgrading );
    480480    if ( ! $nag ) {
    481         $failed = get_network_option( 'auto_core_update_failed' );
     481        $failed = get_site_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

    r34778 r34912  
    154154
    155155    if ( is_multisite() ) {
    156         $first_post = get_network_option( 'first_post' );
     156        $first_post = get_site_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_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 );
     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 );
    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_network_option( 'first_page', $first_page );
     217        $first_page = get_site_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_network_option( 'siteurl' ) === false )
    1259         add_network_option( 'siteurl', '' );
     1258    if ( $wp_current_db_version < 14139 && is_multisite() && is_main_site() && ! defined( 'MULTISITE' ) && get_site_option( 'siteurl' ) === false )
     1259        add_site_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_network_option( 'wpmu_sitewide_plugins' );
    1647         $active_sitewide_plugins = get_network_option( 'active_sitewide_plugins' );
     1646        $wpmu_sitewide_plugins = get_site_option( 'wpmu_sitewide_plugins' );
     1647        $active_sitewide_plugins = get_site_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_network_option( 'active_sitewide_plugins', $sitewide_plugins );
    1655         }
    1656         delete_network_option( 'wpmu_sitewide_plugins' );
    1657         delete_network_option( 'deactivated_sitewide_plugins' );
     1654            update_site_option( 'active_sitewide_plugins', $sitewide_plugins );
     1655        }
     1656        delete_site_option( 'wpmu_sitewide_plugins' );
     1657        delete_site_option( 'deactivated_sitewide_plugins' );
    16581658
    16591659        $start = 0;
     
    16641664                    $value = stripslashes( $value );
    16651665                if ( $value !== $row->meta_value ) {
    1666                     update_network_option( $row->meta_key, $value );
     1666                    update_site_option( $row->meta_key, $value );
    16671667                }
    16681668            }
     
    16731673    // 3.0
    16741674    if ( $wp_current_db_version < 13576 )
    1675         update_network_option( 'global_terms_enabled', '1' );
     1675        update_site_option( 'global_terms_enabled', '1' );
    16761676
    16771677    // 3.3
    16781678    if ( $wp_current_db_version < 19390 )
    1679         update_network_option( 'initial_db_version', $wp_current_db_version );
     1679        update_site_option( 'initial_db_version', $wp_current_db_version );
    16801680
    16811681    if ( $wp_current_db_version < 19470 ) {
    1682         if ( false === get_network_option( 'active_sitewide_plugins' ) )
    1683             update_network_option( 'active_sitewide_plugins', array() );
     1682        if ( false === get_site_option( 'active_sitewide_plugins' ) )
     1683            update_site_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_network_option( 'allowedthemes'  );
    1690         $allowed_themes = get_network_option( 'allowed_themes' );
     1689        $allowedthemes  = get_site_option( 'allowedthemes'  );
     1690        $allowed_themes = get_site_option( 'allowed_themes' );
    16911691        if ( false === $allowedthemes && is_array( $allowed_themes ) && $allowed_themes ) {
    16921692            $converted = array();
     
    16961696                    $converted[ $stylesheet ] = true;
    16971697            }
    1698             update_network_option( 'allowedthemes', $converted );
    1699             delete_network_option( 'allowed_themes' );
     1698            update_site_option( 'allowedthemes', $converted );
     1699            delete_site_option( 'allowed_themes' );
    17001700        }
    17011701    }
     
    17031703    // 3.5
    17041704    if ( $wp_current_db_version < 21823 )
    1705         update_network_option( 'ms_files_rewriting', '1' );
     1705        update_site_option( 'ms_files_rewriting', '1' );
    17061706
    17071707    // 3.5.2
    17081708    if ( $wp_current_db_version < 24448 ) {
    1709         $illegal_names = get_network_option( 'illegal_names' );
     1709        $illegal_names = get_site_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_network_option( 'illegal_names', $illegal_names );
     1713            update_site_option( 'illegal_names', $illegal_names );
    17141714        }
    17151715    }
  • trunk/src/wp-admin/network/settings.php

    r34778 r34912  
    7777            continue;
    7878        $value = wp_unslash( $_POST[$option_name] );
    79         update_network_option( $option_name, $value );
     79        update_site_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_network_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_site_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_network_option( 'registration' ) )
    129                     update_network_option( 'registration', 'none' );
    130                 $reg = get_network_option( 'registration' );
     128                if ( !get_site_option( 'registration' ) )
     129                    update_site_option( 'registration', 'none' );
     130                $reg = get_site_option( 'registration' );
    131131                ?>
    132132                <td>
     
    147147                <th scope="row"><?php _e( 'Registration notification' ) ?></th>
    148148                <?php
    149                 if ( !get_network_option( 'registrationnotification' ) )
    150                     update_network_option( 'registrationnotification', 'yes' );
     149                if ( !get_site_option( 'registrationnotification' ) )
     150                    update_site_option( 'registrationnotification', 'yes' );
    151151                ?>
    152152                <td>
    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>
     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>
    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_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>
     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>
    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_network_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_site_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_network_option( 'limited_email_domains' );
     177                    <?php $limited_email_domains = get_site_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_network_option( 'banned_email_domains' ) == '' ? '' : implode( "\n", (array) get_network_option( 'banned_email_domains' ) ) ); ?></textarea>
     191<?php echo esc_textarea( get_site_option( 'banned_email_domains' ) == '' ? '' : implode( "\n", (array) get_site_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_network_option( 'welcome_email' ) ) ?></textarea>
     206<?php echo esc_textarea( get_site_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_network_option( 'welcome_user_email' ) ) ?></textarea>
     216<?php echo esc_textarea( get_site_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_network_option( 'first_post' ) ) ?></textarea>
     226<?php echo esc_textarea( get_site_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_network_option( 'first_page' ) ) ?></textarea>
     236<?php echo esc_textarea( get_site_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_network_option( 'first_comment' ) ) ?></textarea>
     246<?php echo esc_textarea( get_site_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_network_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_site_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_network_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_site_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_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 />
     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 />
    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_network_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_site_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_network_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_site_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_network_option( 'WPLANG' );
     315                        $lang = get_site_option( 'WPLANG' );
    316316                        if ( ! in_array( $lang, $languages ) ) {
    317317                            $lang = '';
     
    340340                <td>
    341341            <?php
    342             $menu_perms = get_network_option( 'menu_items' );
     342            $menu_perms = get_site_option( 'menu_items' );
    343343            /**
    344344             * Filter available network-wide administration menu options.
  • trunk/src/wp-admin/network/site-new.php

    r34854 r34912  
    125125            wp_unslash( $title )
    126126        );
    127         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' ) . '>' );
     127        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' ) . '>' );
    128128        wpmu_welcome_notification( $id, $user_id, $password, $title, array( 'public' => 1 ) );
    129129        wp_redirect( add_query_arg( array( 'update' => 'added', 'id' => $id ), 'site-new.php' ) );
     
    190190                    <?php
    191191                    // Network default.
    192                     $lang = get_network_option( 'WPLANG' );
     192                    $lang = get_site_option( 'WPLANG' );
    193193
    194194                    // Use English if the default isn't available.
  • trunk/src/wp-admin/network/themes.php

    r34891 r34912  
    3030
    3131if ( $action ) {
    32     $allowed_themes = get_network_option( 'allowedthemes' );
     32    $allowed_themes = get_site_option( 'allowedthemes' );
    3333    switch ( $action ) {
    3434        case 'enable':
    3535            check_admin_referer('enable-theme_' . $_GET['theme']);
    3636            $allowed_themes[ $_GET['theme'] ] = true;
    37             update_network_option( 'allowedthemes', $allowed_themes );
     37            update_site_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_network_option( 'allowedthemes', $allowed_themes );
     46            update_site_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_network_option( 'allowedthemes', $allowed_themes );
     58            update_site_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_network_option( 'allowedthemes', $allowed_themes );
     70            update_site_option( 'allowedthemes', $allowed_themes );
    7171            wp_safe_redirect( add_query_arg( 'disabled', count( $themes ), $referer ) );
    7272            exit;
  • trunk/src/wp-admin/network/upgrade.php

    r34778 r34912  
    5353             */
    5454            global $wp_db_version;
    55             update_network_option( 'wpmu_upgrade_site', $wp_db_version );
     55            update_site_option( 'wpmu_upgrade_site', $wp_db_version );
    5656        }
    5757
     
    110110    case 'show':
    111111    default:
    112         if ( get_network_option( 'wpmu_upgrade_site' ) != $GLOBALS['wp_db_version'] ) :
     112        if ( get_site_option( 'wpmu_upgrade_site' ) != $GLOBALS['wp_db_version'] ) :
    113113        ?>
    114114        <h2><?php _e( 'Database Upgrade Required' ); ?></h2>
  • trunk/src/wp-admin/options-writing.php

    r34778 r34912  
    5757
    5858<table class="form-table">
    59 <?php if ( get_network_option( 'initial_db_version' ) < 32453 ) : ?>
     59<?php if ( get_site_option( 'initial_db_version' ) < 32453 ) : ?>
    6060<tr>
    6161<th scope="row"><?php _e('Formatting') ?></th>
  • trunk/src/wp-admin/options.php

    r34778 r34912  
    9696    $whitelist_options['reading'][] = 'blog_charset';
    9797
    98 if ( get_network_option( 'initial_db_version' ) < 32453 ) {
     98if ( get_site_option( 'initial_db_version' ) < 32453 ) {
    9999    $whitelist_options['writing'][] = 'use_smilies';
    100100    $whitelist_options['writing'][] = 'use_balanceTags';
  • trunk/src/wp-admin/plugin-editor.php

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

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

    r34778 r34912  
    317317<tr class="user-super-admin-wrap"><th><?php _e('Super Admin'); ?></th>
    318318<td>
    319 <?php if ( $profileuser->user_email != get_network_option( 'admin_email' ) || ! is_super_admin( $profileuser->ID ) ) : ?>
     319<?php if ( $profileuser->user_email != get_site_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

    r34778 r34912  
    337337        if ( is_multisite() ) {
    338338            // update_, install_, and delete_ are handled above with is_super_admin().
    339             $menu_perms = get_network_option( 'menu_items', array() );
     339            $menu_perms = get_site_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_network_option( 'add_new_users' ) )
     355        elseif ( is_super_admin( $user_id ) || get_site_option( 'add_new_users' ) )
    356356            $caps[] = $cap;
    357357        else
     
    579579        return $super_admins;
    580580    else
    581         return get_network_option( 'site_admins', array('admin') );
     581        return get_site_option( 'site_admins', array('admin') );
    582582}
    583583
  • trunk/src/wp-includes/class-wp-theme.php

    r34778 r34912  
    11921192        static $allowed_themes;
    11931193        if ( ! isset( $allowed_themes ) )
    1194             $allowed_themes = (array) get_network_option( 'allowedthemes' );
     1194            $allowed_themes = (array) get_site_option( 'allowedthemes' );
    11951195        return $allowed_themes;
    11961196    }
  • trunk/src/wp-includes/default-constants.php

    r34778 r34912  
    190190     */
    191191    if ( !defined( 'COOKIEHASH' ) ) {
    192         $siteurl = get_network_option( 'siteurl' );
     192        $siteurl = get_site_option( 'siteurl' );
    193193        if ( $siteurl )
    194194            define( 'COOKIEHASH', md5( $siteurl ) );
  • trunk/src/wp-includes/functions.php

    r34896 r34912  
    17611761     * We also sometimes obey UPLOADS when rewriting is enabled -- see the next block.
    17621762     */
    1763     if ( defined( 'UPLOADS' ) && ! ( is_multisite() && get_network_option( 'ms_files_rewriting' ) ) ) {
     1763    if ( defined( 'UPLOADS' ) && ! ( is_multisite() && get_site_option( 'ms_files_rewriting' ) ) ) {
    17641764        $dir = ABSPATH . UPLOADS;
    17651765        $url = trailingslashit( $siteurl ) . UPLOADS;
     
    17691769    if ( is_multisite() && ! ( is_main_network() && is_main_site() && defined( 'MULTISITE' ) ) ) {
    17701770
    1771         if ( ! get_network_option( 'ms_files_rewriting' ) ) {
     1771        if ( ! get_site_option( 'ms_files_rewriting' ) ) {
    17721772            /*
    17731773             * 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_network_option( 'global_terms_enabled', false );
     4006            $global_terms = (bool) get_site_option( 'global_terms_enabled', false );
    40074007    }
    40084008    return $global_terms;
  • trunk/src/wp-includes/l10n.php

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

    r34778 r34912  
    2424    add_filter( 'default_site_option_ms_files_rewriting', '__return_true' );
    2525
    26     if ( ! get_network_option( 'ms_files_rewriting' ) )
     26    if ( ! get_site_option( 'ms_files_rewriting' ) )
    2727        return;
    2828
  • trunk/src/wp-includes/ms-deprecated.php

    r34778 r34912  
    2626function get_dashboard_blog() {
    2727    _deprecated_function( __FUNCTION__, '3.1' );
    28     if ( $blog = get_network_option( 'dashboard_blog' ) )
     28    if ( $blog = get_site_option( 'dashboard_blog' ) )
    2929        return get_blog_details( $blog );
    3030
  • trunk/src/wp-includes/ms-functions.php

    r34854 r34912  
    101101 */
    102102function get_user_count() {
    103     return get_network_option( 'user_count' );
     103    return get_site_option( 'user_count' );
    104104}
    105105
     
    118118        _deprecated_argument( __FUNCTION__, '3.1' );
    119119
    120     return get_network_option( 'blog_count' );
     120    return get_site_option( 'blog_count' );
    121121}
    122122
     
    345345 */
    346346function is_email_address_unsafe( $user_email ) {
    347     $banned_names = get_network_option( 'banned_email_domains' );
     347    $banned_names = get_site_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_network_option( 'illegal_names' );
     425    $illegal_names = get_site_option( 'illegal_names' );
    426426    if ( ! is_array( $illegal_names ) ) {
    427427        $illegal_names = array(  'www', 'web', 'root', 'admin', 'main', 'invite', 'administrator' );
    428         add_network_option( 'illegal_names', $illegal_names );
     428        add_site_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_network_option( 'limited_email_domains' );
     453    $limited_email_domains = get_site_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_network_option( 'illegal_names' );
     547    $illegal_names = get_site_option( 'illegal_names' );
    548548    if ( $illegal_names == false ) {
    549549        $illegal_names = array( 'www', 'web', 'root', 'admin', 'main', 'invite', 'administrator' );
    550         add_network_option( 'illegal_names', $illegal_names );
     550        add_site_option( 'illegal_names', $illegal_names );
    551551    }
    552552
     
    790790
    791791    $activate_url = esc_url($activate_url);
    792     $admin_email = get_network_option( 'admin_email' );
     792    $admin_email = get_site_option( 'admin_email' );
    793793    if ( $admin_email == '' )
    794794        $admin_email = 'support@' . $_SERVER['SERVER_NAME'];
    795     $from_name = get_network_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_network_option( 'site_name' ) );
     795    $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) );
    796796    $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
    797797    $message = sprintf(
     
    883883
    884884    // Send email with activation link.
    885     $admin_email = get_network_option( 'admin_email' );
     885    $admin_email = get_site_option( 'admin_email' );
    886886    if ( $admin_email == '' )
    887887        $admin_email = 'support@' . $_SERVER['SERVER_NAME'];
    888     $from_name = get_network_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_network_option( 'site_name' ) );
     888    $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) );
    889889    $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
    890890    $message = sprintf(
     
    11251125    }
    11261126
    1127     add_option( 'WPLANG', get_network_option( 'WPLANG' ) );
     1127    add_option( 'WPLANG', get_site_option( 'WPLANG' ) );
    11281128    update_option( 'blog_public', (int) $meta['public'] );
    11291129
     
    11611161 */
    11621162function newblog_notify_siteadmin( $blog_id, $deprecated = '' ) {
    1163     if ( get_network_option( 'registrationnotification' ) != 'yes' )
     1163    if ( get_site_option( 'registrationnotification' ) != 'yes' )
    11641164        return false;
    11651165
    1166     $email = get_network_option( 'admin_email' );
     1166    $email = get_site_option( 'admin_email' );
    11671167    if ( is_email($email) == false )
    11681168        return false;
     
    12061206 */
    12071207function newuser_notify_siteadmin( $user_id ) {
    1208     if ( get_network_option( 'registrationnotification' ) != 'yes' )
     1208    if ( get_site_option( 'registrationnotification' ) != 'yes' )
    12091209        return false;
    12101210
    1211     $email = get_network_option( 'admin_email' );
     1211    $email = get_site_option( 'admin_email' );
    12121212
    12131213    if ( is_email($email) == false )
     
    13451345    update_option( 'home', $url );
    13461346
    1347     if ( get_network_option( 'ms_files_rewriting' ) )
     1347    if ( get_site_option( 'ms_files_rewriting' ) )
    13481348        update_option( 'upload_path', UPLOADBLOGSDIR . "/$blog_id/files" );
    13491349    else
     
    14211421        return false;
    14221422
    1423     $welcome_email = get_network_option( 'welcome_email' );
     1423    $welcome_email = get_site_option( 'welcome_email' );
    14241424    if ( $welcome_email == false ) {
    14251425        /* translators: Do not translate USERNAME, SITE_NAME, BLOG_URL, PASSWORD: those are placeholders. */
     
    14641464     */
    14651465    $welcome_email = apply_filters( 'update_welcome_email', $welcome_email, $blog_id, $user_id, $password, $title, $meta );
    1466     $admin_email = get_network_option( 'admin_email' );
     1466    $admin_email = get_site_option( 'admin_email' );
    14671467
    14681468    if ( $admin_email == '' )
    14691469        $admin_email = 'support@' . $_SERVER['SERVER_NAME'];
    14701470
    1471     $from_name = get_network_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_network_option( 'site_name' ) );
     1471    $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) );
    14721472    $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
    14731473    $message = $welcome_email;
     
    15201520        return false;
    15211521
    1522     $welcome_email = get_network_option( 'welcome_user_email' );
     1522    $welcome_email = get_site_option( 'welcome_user_email' );
    15231523
    15241524    $user = get_userdata( $user_id );
     
    15421542    $welcome_email = str_replace( 'LOGINLINK', wp_login_url(), $welcome_email );
    15431543
    1544     $admin_email = get_network_option( 'admin_email' );
     1544    $admin_email = get_site_option( 'admin_email' );
    15451545
    15461546    if ( $admin_email == '' )
    15471547        $admin_email = 'support@' . $_SERVER['SERVER_NAME'];
    15481548
    1549     $from_name = get_network_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_network_option( 'site_name' ) );
     1549    $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) );
    15501550    $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
    15511551    $message = $welcome_email;
     
    17191719 */
    17201720function check_upload_mimes( $mimes ) {
    1721     $site_exts = explode( ' ', get_network_option( 'upload_filetypes', 'jpg jpeg png gif' ) );
     1721    $site_exts = explode( ' ', get_site_option( 'upload_filetypes', 'jpg jpeg png gif' ) );
    17221722    $site_mimes = array();
    17231723    foreach ( $site_exts as $ext ) {
     
    18601860 */
    18611861function upload_is_file_too_big( $upload ) {
    1862     if ( ! is_array( $upload ) || defined( 'WP_IMPORTING' ) || get_network_option( 'upload_space_check_disabled' ) )
     1862    if ( ! is_array( $upload ) || defined( 'WP_IMPORTING' ) || get_site_option( 'upload_space_check_disabled' ) )
    18631863        return $upload;
    18641864
    1865     if ( strlen( $upload['bits'] )  > ( 1024 * get_network_option( 'fileupload_maxk', 1500 ) ) )
    1866         return sprintf( __( 'This file is too big. Files must be less than %d KB in size.' ) . '<br />', get_network_option( 'fileupload_maxk', 1500 ) );
     1865    if ( strlen( $upload['bits'] )  > ( 1024 * get_site_option( 'fileupload_maxk', 1500 ) ) )
     1866        return sprintf( __( 'This file is too big. Files must be less than %d KB in size.' ) . '<br />', get_site_option( 'fileupload_maxk', 1500 ));
    18671867
    18681868    return $upload;
     
    20772077 */
    20782078function users_can_register_signup_filter() {
    2079     $registration = get_network_option( 'registration' );
     2079    $registration = get_site_option('registration');
    20802080    return ( $registration == 'all' || $registration == 'user' );
    20812081}
     
    21062106
    21072107--The Team @ SITE_NAME' );
    2108         update_network_option( 'welcome_user_email', $text );
     2108        update_site_option( 'welcome_user_email', $text );
    21092109    }
    21102110    return $text;
     
    22322232
    22332233    $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) );
    2234     update_network_option( 'blog_count', $count );
     2234    update_site_option( 'blog_count', $count );
    22352235}
    22362236
     
    22462246
    22472247    $count = $wpdb->get_var( "SELECT COUNT(ID) as c FROM $wpdb->users WHERE spam = '0' AND deleted = '0'" );
    2248     update_network_option( 'user_count', $count );
     2248    update_site_option( 'user_count', $count );
    22492249}
    22502250
     
    22842284
    22852285    if ( ! is_numeric( $space_allowed ) )
    2286         $space_allowed = get_network_option( 'blog_upload_space' );
     2286        $space_allowed = get_site_option( 'blog_upload_space' );
    22872287
    22882288    if ( empty( $space_allowed ) || ! is_numeric( $space_allowed ) )
     
    23122312    }
    23132313    $space_allowed = $allowed * 1024 * 1024;
    2314     if ( get_network_option( 'upload_space_check_disabled' ) )
     2314    if ( get_site_option( 'upload_space_check_disabled' ) )
    23152315        return $space_allowed;
    23162316
     
    23302330 */
    23312331function is_upload_space_available() {
    2332     if ( get_network_option( 'upload_space_check_disabled' ) )
     2332    if ( get_site_option( 'upload_space_check_disabled' ) )
    23332333        return true;
    23342334
     
    23422342 */
    23432343function upload_size_limit_filter( $size ) {
    2344     $fileupload_maxk = 1024 * get_network_option( 'fileupload_maxk', 1500 );
    2345     if ( get_network_option( 'upload_space_check_disabled' ) )
     2344    $fileupload_maxk = 1024 * get_site_option( 'fileupload_maxk', 1500 );
     2345    if ( get_site_option( 'upload_space_check_disabled' ) )
    23462346        return min( $size, $fileupload_maxk );
    23472347
  • trunk/src/wp-includes/ms-load.php

    r34778 r34912  
    3535 */
    3636function wp_get_active_network_plugins() {
    37     $active_plugins = (array) get_network_option( 'active_sitewide_plugins', array() );
     37    $active_plugins = (array) get_site_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_network_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_site_option( 'admin_email', 'support@' . get_current_site()->domain ) ) ) );
    100100    }
    101101
  • trunk/src/wp-includes/option.php

    r34878 r34912  
    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;
     
    14811481        $option_timeout = '_site_transient_timeout_' . $transient;
    14821482        $option = '_site_transient_' . $transient;
    1483         $result = delete_network_option( $option );
     1483        $result = delete_site_option( $option );
    14841484        if ( $result )
    1485             delete_network_option( $option_timeout );
     1485            delete_site_option( $option_timeout );
    14861486    }
    14871487    if ( $result ) {
     
    15441544        if ( ! in_array( $transient, $no_timeout ) ) {
    15451545            $transient_timeout = '_site_transient_timeout_' . $transient;
    1546             $timeout = get_network_option( $transient_timeout );
     1546            $timeout = get_site_option( $transient_timeout );
    15471547            if ( false !== $timeout && $timeout < time() ) {
    1548                 delete_network_option( $transient_option  );
    1549                 delete_network_option( $transient_timeout );
     1548                delete_site_option( $transient_option  );
     1549                delete_site_option( $transient_timeout );
    15501550                $value = false;
    15511551            }
     
    15531553
    15541554        if ( ! isset( $value ) )
    1555             $value = get_network_option( $transient_option );
     1555            $value = get_site_option( $transient_option );
    15561556    }
    15571557
     
    16211621        $transient_timeout = '_site_transient_timeout_' . $transient;
    16221622        $option = '_site_transient_' . $transient;
    1623         if ( false === get_network_option( $option ) ) {
     1623        if ( false === get_site_option( $option ) ) {
    16241624            if ( $expiration )
    1625                 add_network_option( $transient_timeout, time() + $expiration );
    1626             $result = add_network_option( $option, $value );
     1625                add_site_option( $transient_timeout, time() + $expiration );
     1626            $result = add_site_option( $option, $value );
    16271627        } else {
    16281628            if ( $expiration )
    1629                 update_network_option( $transient_timeout, time() + $expiration );
    1630             $result = update_network_option( $option, $value );
     1629                update_site_option( $transient_timeout, time() + $expiration );
     1630            $result = update_site_option( $option, $value );
    16311631        }
    16321632    }
  • trunk/src/wp-includes/pluggable.php

    r34778 r34912  
    19621962                $values[ $type ] = constant( $const );
    19631963            } elseif ( ! $values[ $type ] ) {
    1964                 $values[ $type ] = get_network_option( "{$scheme}_{$type}" );
     1964                $values[ $type ] = get_site_option( "{$scheme}_{$type}" );
    19651965                if ( ! $values[ $type ] ) {
    19661966                    $values[ $type ] = wp_generate_password( 64, true, true );
    1967                     update_network_option( "{$scheme}_{$type}", $values[ $type ] );
     1967                    update_site_option( "{$scheme}_{$type}", $values[ $type ] );
    19681968                }
    19691969            }
     
    19711971    } else {
    19721972        if ( ! $values['key'] ) {
    1973             $values['key'] = get_network_option( 'secret_key' );
     1973            $values['key'] = get_site_option( 'secret_key' );
    19741974            if ( ! $values['key'] ) {
    19751975                $values['key'] = wp_generate_password( 64, true, true );
    1976                 update_network_option( 'secret_key', $values['key'] );
     1976                update_site_option( 'secret_key', $values['key'] );
    19771977            }
    19781978        }
  • trunk/src/wp-includes/script-loader.php

    r34903 r34912  
    11641164    if ( ! isset($compress_scripts) ) {
    11651165        $compress_scripts = defined('COMPRESS_SCRIPTS') ? COMPRESS_SCRIPTS : true;
    1166         if ( $compress_scripts && ( ! get_network_option( 'can_compress_scripts' ) || $compressed_output ) )
     1166        if ( $compress_scripts && ( ! get_site_option('can_compress_scripts') || $compressed_output ) )
    11671167            $compress_scripts = false;
    11681168    }
     
    11701170    if ( ! isset($compress_css) ) {
    11711171        $compress_css = defined('COMPRESS_CSS') ? COMPRESS_CSS : true;
    1172         if ( $compress_css && ( ! get_network_option( 'can_compress_scripts' ) || $compressed_output ) )
     1172        if ( $compress_css && ( ! get_site_option('can_compress_scripts') || $compressed_output ) )
    11731173            $compress_css = false;
    11741174    }
  • trunk/src/wp-includes/user-functions.php

    r34856 r34912  
    18121812function wp_get_user_contact_methods( $user = null ) {
    18131813    $methods = array();
    1814     if ( get_network_option( 'initial_db_version' ) < 23588 ) {
     1814    if ( get_site_option( 'initial_db_version' ) < 23588 ) {
    18151815        $methods = array(
    18161816            'aim'    => __( 'AIM' ),
  • trunk/src/wp-signup.php

    r34840 r34912  
    88require( dirname( __FILE__ ) . '/wp-blog-header.php' );
    99
    10 if ( is_array( get_network_option( 'illegal_names' ) ) && isset( $_GET[ 'new' ] ) && in_array( $_GET[ 'new' ], get_network_option( 'illegal_names' ) ) ) {
     10if ( is_array( get_site_option( 'illegal_names' )) && isset( $_GET[ 'new' ] ) && in_array( $_GET[ 'new' ], get_site_option( 'illegal_names' ) ) ) {
    1111    wp_redirect( network_home_url() );
    1212    die();
     
    674674
    675675// Main
    676 $active_signup = get_network_option( 'registration', 'none' );
     676$active_signup = get_site_option( 'registration', 'none' );
    677677/**
    678678 * Filter the type of site sign-up.
Note: See TracChangeset for help on using the changeset viewer.