Changeset 34912
- Timestamp:
- 10/07/2015 05:11:01 PM (9 years ago)
- Location:
- trunk/src
- Files:
-
- 35 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/ajax-actions.php
r34778 r34912 166 166 167 167 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); 169 169 wp_die( 0 ); 170 170 } … … 197 197 wp_die(); 198 198 } elseif ( 'no' == $_GET['test'] ) { 199 update_ network_option( 'can_compress_scripts', 0);199 update_site_option('can_compress_scripts', 0); 200 200 } elseif ( 'yes' == $_GET['test'] ) { 201 update_ network_option( 'can_compress_scripts', 1);201 update_site_option('can_compress_scripts', 1); 202 202 } 203 203 } -
trunk/src/wp-admin/includes/class-wp-plugins-list-table.php
r34786 r34912 131 131 132 132 if ( $screen->in_admin( 'network' ) ) { 133 $recently_activated = get_ network_option( 'recently_activated', array() );133 $recently_activated = get_site_option( 'recently_activated', array() ); 134 134 } else { 135 135 $recently_activated = get_option( 'recently_activated', array() ); … … 143 143 144 144 if ( $screen->in_admin( 'network' ) ) { 145 update_ network_option( 'recently_activated', $recently_activated );145 update_site_option( 'recently_activated', $recently_activated ); 146 146 } else { 147 147 update_option( 'recently_activated', $recently_activated ); -
trunk/src/wp-admin/includes/class-wp-themes-list-table.php
r34778 r34912 103 103 } 104 104 // 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' ) ); 106 106 } 107 107 -
trunk/src/wp-admin/includes/class-wp-upgrader.php
r34828 r34912 2369 2369 return false; 2370 2370 2371 $failure_data = get_ network_option( 'auto_core_update_failed' );2371 $failure_data = get_site_option( 'auto_core_update_failed' ); 2372 2372 if ( $failure_data ) { 2373 2373 // If this was a critical update failure, cannot update. … … 2781 2781 */ 2782 2782 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' ); 2784 2784 2785 2785 // 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 ) 2787 2787 return false; 2788 2788 … … 3109 3109 $critical_data['rollback_data'] = $rollback_result->get_error_data(); 3110 3110 } 3111 update_ network_option( 'auto_core_update_failed', $critical_data );3111 update_site_option( 'auto_core_update_failed', $critical_data ); 3112 3112 $this->send_email( 'critical', $core_update, $result ); 3113 3113 return; … … 3127 3127 $send = true; 3128 3128 $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' ) ) { 3130 3130 wp_schedule_single_event( time() + HOUR_IN_SECONDS, 'wp_maybe_auto_update' ); 3131 3131 $send = false; 3132 3132 } 3133 3133 3134 $n = get_ network_option( 'auto_core_update_notified' );3134 $n = get_site_option( 'auto_core_update_notified' ); 3135 3135 // 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 ) 3137 3137 $send = false; 3138 3138 3139 update_ network_option( 'auto_core_update_failed', array(3139 update_site_option( 'auto_core_update_failed', array( 3140 3140 'attempted' => $core_update->current, 3141 3141 'current' => $wp_version, … … 3163 3163 */ 3164 3164 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( 3166 3166 'type' => $type, 3167 'email' => get_ network_option( 'admin_email' ),3167 'email' => get_site_option( 'admin_email' ), 3168 3168 'version' => $core_update->current, 3169 3169 'timestamp' => time(), … … 3321 3321 } 3322 3322 3323 $to = get_ network_option( 'admin_email' );3323 $to = get_site_option( 'admin_email' ); 3324 3324 $headers = ''; 3325 3325 … … 3495 3495 3496 3496 $email = array( 3497 'to' => get_ network_option( 'admin_email' ),3497 'to' => get_site_option( 'admin_email' ), 3498 3498 'subject' => $subject, 3499 3499 'body' => implode( "\n", $body ), -
trunk/src/wp-admin/includes/dashboard.php
r34783 r34912 1197 1197 */ 1198 1198 function 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' ) ) 1200 1200 return true; 1201 1201 -
trunk/src/wp-admin/includes/ms.php
r34778 r34912 17 17 */ 18 18 function check_upload_size( $file ) { 19 if ( get_ network_option( 'upload_space_check_disabled' ) )19 if ( get_site_option( 'upload_space_check_disabled' ) ) 20 20 return $file; 21 21 … … 31 31 if ( $space_left < $file_size ) 32 32 $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 ) ); 35 35 if ( upload_is_user_over_quota( false ) ) { 36 36 $file['error'] = __( 'You have used your space quota. Please delete files before uploading.' ); … … 99 99 100 100 // 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 ) ) { 102 102 $drop = false; 103 103 } … … 307 307 $content = str_replace( '###ADMIN_URL###', esc_url( admin_url( 'options.php?adminhash='.$hash ) ), $content ); 308 308 $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 ); 310 310 $content = str_replace( '###SITEURL###', network_home_url(), $content ); 311 311 … … 386 386 $content = str_replace( '###ADMIN_URL###', esc_url( admin_url( 'profile.php?newuseremail='.$hash ) ), $content ); 387 387 $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 ); 389 389 $content = str_replace( '###SITEURL###', network_home_url(), $content ); 390 390 … … 414 414 */ 415 415 function 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' ) ) 417 417 return false; 418 418 … … 747 747 if ( !is_super_admin() ) 748 748 return false; 749 if ( get_ network_option( 'wpmu_upgrade_site' ) != $wp_db_version )749 if ( get_site_option( 'wpmu_upgrade_site' ) != $wp_db_version ) 750 750 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>"; 751 751 } … … 829 829 </td> 830 830 </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' ) ) ) : ?> 832 832 <tr> 833 833 <th scope="row" colspan="2" class="th-full"> … … 871 871 872 872 // 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' ) ); 874 874 875 875 $user = get_userdata( $user_id ); 876 876 if ( $user && ! in_array( $user->user_login, $super_admins ) ) { 877 877 $super_admins[] = $user->user_login; 878 update_ network_option( 'site_admins' , $super_admins );878 update_site_option( 'site_admins' , $super_admins ); 879 879 880 880 /** … … 918 918 919 919 // 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' ) ); 921 921 922 922 $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' ) ) ) { 924 924 if ( false !== ( $key = array_search( $user->user_login, $super_admins ) ) ) { 925 925 unset( $super_admins[$key] ); 926 update_ network_option( 'site_admins', $super_admins );926 update_site_option( 'site_admins', $super_admins ); 927 927 928 928 /** -
trunk/src/wp-admin/includes/network.php
r34778 r34912 451 451 <action type="None" /> 452 452 </rule>'; 453 if ( is_multisite() && get_ network_option( 'ms_files_rewriting' ) ) {453 if ( is_multisite() && get_site_option( 'ms_files_rewriting' ) ) { 454 454 $web_config_file .= ' 455 455 <rule name="WordPress Rule for Files" stopProcessing="true"> … … 507 507 508 508 $ms_files_rewriting = ''; 509 if ( is_multisite() && get_ network_option( 'ms_files_rewriting' ) ) {509 if ( is_multisite() && get_site_option( 'ms_files_rewriting' ) ) { 510 510 $ms_files_rewriting = "\n# uploaded files\nRewriteRule ^"; 511 511 $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 463 463 return false; 464 464 465 $plugins = get_ network_option( 'active_sitewide_plugins');465 $plugins = get_site_option( 'active_sitewide_plugins'); 466 466 if ( isset($plugins[$plugin]) ) 467 467 return true; … … 521 521 if ( is_multisite() && ( $network_wide || is_network_only_plugin($plugin) ) ) { 522 522 $network_wide = true; 523 $current = get_ network_option( 'active_sitewide_plugins', array() );523 $current = get_site_option( 'active_sitewide_plugins', array() ); 524 524 $_GET['networkwide'] = 1; // Back compat for plugins looking for this value. 525 525 } else { … … 574 574 575 575 if ( $network_wide ) { 576 $current = get_ network_option( 'active_sitewide_plugins', array() );576 $current = get_site_option( 'active_sitewide_plugins', array() ); 577 577 $current[$plugin] = time(); 578 update_ network_option( 'active_sitewide_plugins', $current );578 update_site_option( 'active_sitewide_plugins', $current ); 579 579 } else { 580 580 $current = get_option( 'active_plugins', array() ); … … 625 625 function deactivate_plugins( $plugins, $silent = false, $network_wide = null ) { 626 626 if ( is_multisite() ) 627 $network_current = get_ network_option( 'active_sitewide_plugins', array() );627 $network_current = get_site_option( 'active_sitewide_plugins', array() ); 628 628 $current = get_option( 'active_plugins', array() ); 629 629 $do_blog = $do_network = false; … … 706 706 update_option('active_plugins', $current); 707 707 if ( $do_network ) 708 update_ network_option( 'active_sitewide_plugins', $network_current );708 update_site_option( 'active_sitewide_plugins', $network_current ); 709 709 } 710 710 … … 878 878 879 879 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() ); 881 881 $plugins = array_merge( $plugins, array_keys( $network_plugins ) ); 882 882 } -
trunk/src/wp-admin/includes/schema.php
r34778 r34912 936 936 } 937 937 } else { 938 $site_admins = get_ network_option( 'site_admins' );938 $site_admins = get_site_option( 'site_admins' ); 939 939 } 940 940 … … 986 986 'siteurl' => get_option( 'siteurl' ) . '/', 987 987 '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', 989 989 'subdomain_install' => intval( $subdomain_install ), 990 990 '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', 992 992 'initial_db_version' => get_option( 'initial_db_version' ), 993 993 'active_sitewide_plugins' => array(), -
trunk/src/wp-admin/includes/update-core.php
r34778 r34912 1103 1103 1104 1104 // 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' ); 1107 1107 1108 1108 return $wp_version; -
trunk/src/wp-admin/includes/update.php
r34778 r34912 30 30 function get_core_updates( $options = array() ) { 31 31 $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' ); 33 33 34 34 if ( ! is_array( $dismissed ) ) … … 135 135 */ 136 136 function dismiss_core_update( $update ) { 137 $dismissed = get_ network_option( 'dismissed_update_core' );137 $dismissed = get_site_option( 'dismissed_update_core' ); 138 138 $dismissed[ $update->current . '|' . $update->locale ] = true; 139 return update_ network_option( 'dismissed_update_core', $dismissed );139 return update_site_option( 'dismissed_update_core', $dismissed ); 140 140 } 141 141 … … 147 147 */ 148 148 function undismiss_core_update( $version, $locale ) { 149 $dismissed = get_ network_option( 'dismissed_update_core' );149 $dismissed = get_site_option( 'dismissed_update_core' ); 150 150 $key = $version . '|' . $locale; 151 151 … … 154 154 155 155 unset( $dismissed[$key] ); 156 return update_ network_option( 'dismissed_update_core', $dismissed );156 return update_site_option( 'dismissed_update_core', $dismissed ); 157 157 } 158 158 … … 479 479 $nag = isset( $upgrading ); 480 480 if ( ! $nag ) { 481 $failed = get_ network_option( 'auto_core_update_failed' );481 $failed = get_site_option( 'auto_core_update_failed' ); 482 482 /* 483 483 * 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 154 154 155 155 if ( is_multisite() ) { 156 $first_post = get_ network_option( 'first_post' );156 $first_post = get_site_option( 'first_post' ); 157 157 158 158 if ( empty($first_post) ) … … 190 190 To delete a comment, just log in and view the post's comments. There you will have the option to edit or delete them.'); 191 191 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 ); 195 195 } 196 196 $wpdb->insert( $wpdb->comments, array( … … 215 215 As 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() ); 216 216 if ( is_multisite() ) 217 $first_page = get_ network_option( 'first_page', $first_page );217 $first_page = get_site_option( 'first_page', $first_page ); 218 218 $first_post_guid = get_option('home') . '/?page_id=2'; 219 219 $wpdb->insert( $wpdb->posts, array( … … 1256 1256 populate_roles_300(); 1257 1257 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', '' ); 1260 1260 1261 1261 // 3.0 screen options key name changes. … … 1644 1644 // 2.8. 1645 1645 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' ); 1648 1648 if ( $wpmu_sitewide_plugins ) { 1649 1649 if ( !$active_sitewide_plugins ) … … 1652 1652 $sitewide_plugins = array_merge( (array) $active_sitewide_plugins, (array) $wpmu_sitewide_plugins ); 1653 1653 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' ); 1658 1658 1659 1659 $start = 0; … … 1664 1664 $value = stripslashes( $value ); 1665 1665 if ( $value !== $row->meta_value ) { 1666 update_ network_option( $row->meta_key, $value );1666 update_site_option( $row->meta_key, $value ); 1667 1667 } 1668 1668 } … … 1673 1673 // 3.0 1674 1674 if ( $wp_current_db_version < 13576 ) 1675 update_ network_option( 'global_terms_enabled', '1' );1675 update_site_option( 'global_terms_enabled', '1' ); 1676 1676 1677 1677 // 3.3 1678 1678 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 ); 1680 1680 1681 1681 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() ); 1684 1684 } 1685 1685 … … 1687 1687 if ( $wp_current_db_version < 20148 ) { 1688 1688 // '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' ); 1691 1691 if ( false === $allowedthemes && is_array( $allowed_themes ) && $allowed_themes ) { 1692 1692 $converted = array(); … … 1696 1696 $converted[ $stylesheet ] = true; 1697 1697 } 1698 update_ network_option( 'allowedthemes', $converted );1699 delete_ network_option( 'allowed_themes' );1698 update_site_option( 'allowedthemes', $converted ); 1699 delete_site_option( 'allowed_themes' ); 1700 1700 } 1701 1701 } … … 1703 1703 // 3.5 1704 1704 if ( $wp_current_db_version < 21823 ) 1705 update_ network_option( 'ms_files_rewriting', '1' );1705 update_site_option( 'ms_files_rewriting', '1' ); 1706 1706 1707 1707 // 3.5.2 1708 1708 if ( $wp_current_db_version < 24448 ) { 1709 $illegal_names = get_ network_option( 'illegal_names' );1709 $illegal_names = get_site_option( 'illegal_names' ); 1710 1710 if ( is_array( $illegal_names ) && count( $illegal_names ) === 1 ) { 1711 1711 $illegal_name = reset( $illegal_names ); 1712 1712 $illegal_names = explode( ' ', $illegal_name ); 1713 update_ network_option( 'illegal_names', $illegal_names );1713 update_site_option( 'illegal_names', $illegal_names ); 1714 1714 } 1715 1715 } -
trunk/src/wp-admin/network/settings.php
r34778 r34912 77 77 continue; 78 78 $value = wp_unslash( $_POST[$option_name] ); 79 update_ network_option( $option_name, $value );79 update_site_option( $option_name, $value ); 80 80 } 81 81 … … 114 114 <th scope="row"><label for="admin_email"><?php _e( 'Network Admin Email' ) ?></label></th> 115 115 <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' ) ) ?>" /> 117 117 <p class="description" id="admin-email-desc"> 118 118 <?php _e( 'This email address will receive notifications. Registration and support emails will also come from this address.' ); ?> … … 126 126 <th scope="row"><?php _e( 'Allow new registrations' ) ?></th> 127 127 <?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' ); 131 131 ?> 132 132 <td> … … 147 147 <th scope="row"><?php _e( 'Registration notification' ) ?></th> 148 148 <?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' ); 151 151 ?> 152 152 <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> 154 154 </td> 155 155 </tr> … … 158 158 <th scope="row"><?php _e( 'Add New Users' ) ?></th> 159 159 <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 → 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 → Add New" page.' ); ?></label> 161 161 </td> 162 162 </tr> … … 165 165 <th scope="row"><label for="illegal_names"><?php _e( 'Banned Names' ) ?></label></th> 166 166 <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" /> 168 168 <p class="description" id="illegal-names-desc"> 169 169 <?php _e( 'Users are not allowed to register these sites. Separate names by spaces.' ) ?> … … 175 175 <th scope="row"><label for="limited_email_domains"><?php _e( 'Limited Email Registrations' ) ?></label></th> 176 176 <td> 177 <?php $limited_email_domains = get_ network_option( 'limited_email_domains' );177 <?php $limited_email_domains = get_site_option( 'limited_email_domains' ); 178 178 $limited_email_domains = str_replace( ' ', "\n", $limited_email_domains ); ?> 179 179 <textarea name="limited_email_domains" id="limited_email_domains" aria-describedby="limited-email-domains-desc" cols="45" rows="5"> … … 189 189 <td> 190 190 <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> 192 192 <p class="description" id="banned-email-domains-desc"> 193 193 <?php _e( 'If you want to ban domains from site registrations. One domain per line.' ) ?> … … 204 204 <td> 205 205 <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> 207 207 <p class="description" id="welcome-email-desc"> 208 208 <?php _e( 'The welcome email sent to new site owners.' ) ?> … … 214 214 <td> 215 215 <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> 217 217 <p class="description" id="welcome-user-email-desc"> 218 218 <?php _e( 'The welcome email sent to new users.' ) ?> … … 224 224 <td> 225 225 <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> 227 227 <p class="description" id="first-post-desc"> 228 228 <?php _e( 'The first post on a new site.' ) ?> … … 234 234 <td> 235 235 <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> 237 237 <p class="description" id="first-page-desc"> 238 238 <?php _e( 'The first page on a new site.' ) ?> … … 244 244 <td> 245 245 <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> 247 247 <p class="description" id="first-comment-desc"> 248 248 <?php _e( 'The first comment on a new site.' ) ?> … … 253 253 <th scope="row"><label for="first_comment_author"><?php _e( 'First Comment Author' ) ?></label></th> 254 254 <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') ?>" /> 256 256 <p class="description" id="first-comment-author-desc"> 257 257 <?php _e( 'The author of the first comment on a new site.' ) ?> … … 262 262 <th scope="row"><label for="first_comment_url"><?php _e( 'First Comment URL' ) ?></label></th> 263 263 <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' ) ) ?>" /> 265 265 <p class="description" id="first-comment-url-desc"> 266 266 <?php _e( 'The URL for the first comment on a new site.' ) ?> … … 274 274 <th scope="row"><?php _e( 'Site upload space' ) ?></th> 275 275 <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 /> 277 277 <p class="screen-reader-text" id="blog-upload-space-desc"> 278 278 <?php _e( 'Size in megabytes' ) ?> … … 284 284 <th scope="row"><label for="upload_filetypes"><?php _e( 'Upload file types' ) ?></label></th> 285 285 <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" /> 287 287 <p class="description" id="upload-filetypes-desc"> 288 288 <?php _e( 'Allowed file types. Separate types by spaces.' ) ?> … … 294 294 <th scope="row"><label for="fileupload_maxk"><?php _e( 'Max upload file size' ) ?></label></th> 295 295 <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 ) ) . '" />' ); ?> 297 297 <p class="screen-reader-text" id="fileupload-maxk-desc"> 298 298 <?php _e( 'Size in kilobytes' ) ?> … … 313 313 <td> 314 314 <?php 315 $lang = get_ network_option( 'WPLANG' );315 $lang = get_site_option( 'WPLANG' ); 316 316 if ( ! in_array( $lang, $languages ) ) { 317 317 $lang = ''; … … 340 340 <td> 341 341 <?php 342 $menu_perms = get_ network_option( 'menu_items' );342 $menu_perms = get_site_option( 'menu_items' ); 343 343 /** 344 344 * Filter available network-wide administration menu options. -
trunk/src/wp-admin/network/site-new.php
r34854 r34912 125 125 wp_unslash( $title ) 126 126 ); 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' ) . '>' ); 128 128 wpmu_welcome_notification( $id, $user_id, $password, $title, array( 'public' => 1 ) ); 129 129 wp_redirect( add_query_arg( array( 'update' => 'added', 'id' => $id ), 'site-new.php' ) ); … … 190 190 <?php 191 191 // Network default. 192 $lang = get_ network_option( 'WPLANG' );192 $lang = get_site_option( 'WPLANG' ); 193 193 194 194 // Use English if the default isn't available. -
trunk/src/wp-admin/network/themes.php
r34891 r34912 30 30 31 31 if ( $action ) { 32 $allowed_themes = get_ network_option( 'allowedthemes' );32 $allowed_themes = get_site_option( 'allowedthemes' ); 33 33 switch ( $action ) { 34 34 case 'enable': 35 35 check_admin_referer('enable-theme_' . $_GET['theme']); 36 36 $allowed_themes[ $_GET['theme'] ] = true; 37 update_ network_option( 'allowedthemes', $allowed_themes );37 update_site_option( 'allowedthemes', $allowed_themes ); 38 38 if ( false === strpos( $referer, '/network/themes.php' ) ) 39 39 wp_redirect( network_admin_url( 'themes.php?enabled=1' ) ); … … 44 44 check_admin_referer('disable-theme_' . $_GET['theme']); 45 45 unset( $allowed_themes[ $_GET['theme'] ] ); 46 update_ network_option( 'allowedthemes', $allowed_themes );46 update_site_option( 'allowedthemes', $allowed_themes ); 47 47 wp_safe_redirect( add_query_arg( 'disabled', '1', $referer ) ); 48 48 exit; … … 56 56 foreach ( (array) $themes as $theme ) 57 57 $allowed_themes[ $theme ] = true; 58 update_ network_option( 'allowedthemes', $allowed_themes );58 update_site_option( 'allowedthemes', $allowed_themes ); 59 59 wp_safe_redirect( add_query_arg( 'enabled', count( $themes ), $referer ) ); 60 60 exit; … … 68 68 foreach ( (array) $themes as $theme ) 69 69 unset( $allowed_themes[ $theme ] ); 70 update_ network_option( 'allowedthemes', $allowed_themes );70 update_site_option( 'allowedthemes', $allowed_themes ); 71 71 wp_safe_redirect( add_query_arg( 'disabled', count( $themes ), $referer ) ); 72 72 exit; -
trunk/src/wp-admin/network/upgrade.php
r34778 r34912 53 53 */ 54 54 global $wp_db_version; 55 update_ network_option( 'wpmu_upgrade_site', $wp_db_version );55 update_site_option( 'wpmu_upgrade_site', $wp_db_version ); 56 56 } 57 57 … … 110 110 case 'show': 111 111 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'] ) : 113 113 ?> 114 114 <h2><?php _e( 'Database Upgrade Required' ); ?></h2> -
trunk/src/wp-admin/options-writing.php
r34778 r34912 57 57 58 58 <table class="form-table"> 59 <?php if ( get_ network_option( 'initial_db_version' ) < 32453 ) : ?>59 <?php if ( get_site_option( 'initial_db_version' ) < 32453 ) : ?> 60 60 <tr> 61 61 <th scope="row"><?php _e('Formatting') ?></th> -
trunk/src/wp-admin/options.php
r34778 r34912 96 96 $whitelist_options['reading'][] = 'blog_charset'; 97 97 98 if ( get_ network_option( 'initial_db_version' ) < 32453 ) {98 if ( get_site_option( 'initial_db_version' ) < 32453 ) { 99 99 $whitelist_options['writing'][] = 'use_smilies'; 100 100 $whitelist_options['writing'][] = 'use_balanceTags'; -
trunk/src/wp-admin/plugin-editor.php
r34783 r34912 75 75 update_option( 'recently_activated', array( $file => time() ) + (array) get_option( 'recently_activated' ) ); 76 76 } 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' ) ); 78 78 } 79 79 -
trunk/src/wp-admin/plugins.php
r34891 r34912 56 56 update_option( 'recently_activated', $recent ); 57 57 } else { 58 $recent = (array) get_ network_option( 'recently_activated' );58 $recent = (array) get_site_option( 'recently_activated' ); 59 59 unset( $recent[ $plugin ] ); 60 update_ network_option( 'recently_activated', $recent );60 update_site_option( 'recently_activated', $recent ); 61 61 } 62 62 … … 102 102 $recent = (array) get_option('recently_activated' ); 103 103 } else { 104 $recent = (array) get_ network_option('recently_activated' );104 $recent = (array) get_site_option('recently_activated' ); 105 105 } 106 106 … … 112 112 update_option( 'recently_activated', $recent ); 113 113 } else { 114 update_ network_option( 'recently_activated', $recent );114 update_site_option( 'recently_activated', $recent ); 115 115 } 116 116 … … 183 183 update_option( 'recently_activated', array( $plugin => time() ) + (array) get_option( 'recently_activated' ) ); 184 184 } 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' ) ); 186 186 } 187 187 … … 221 221 update_option( 'recently_activated', $deactivated + (array) get_option( 'recently_activated' ) ); 222 222 } 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' ) ); 224 224 } 225 225 … … 383 383 update_option( 'recently_activated', array() ); 384 384 } else { 385 update_ network_option( 'recently_activated', array() );385 update_site_option( 'recently_activated', array() ); 386 386 } 387 387 break; -
trunk/src/wp-admin/user-edit.php
r34778 r34912 317 317 <tr class="user-super-admin-wrap"><th><?php _e('Super Admin'); ?></th> 318 318 <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 ) ) : ?> 320 320 <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> 321 321 <?php else : ?> -
trunk/src/wp-includes/capabilities-functions.php
r34778 r34912 337 337 if ( is_multisite() ) { 338 338 // 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() ); 340 340 if ( empty( $menu_perms['plugins'] ) ) 341 341 $caps[] = 'manage_network_plugins'; … … 353 353 if ( !is_multisite() ) 354 354 $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' ) ) 356 356 $caps[] = $cap; 357 357 else … … 579 579 return $super_admins; 580 580 else 581 return get_ network_option( 'site_admins', array('admin') );581 return get_site_option( 'site_admins', array('admin') ); 582 582 } 583 583 -
trunk/src/wp-includes/class-wp-theme.php
r34778 r34912 1192 1192 static $allowed_themes; 1193 1193 if ( ! isset( $allowed_themes ) ) 1194 $allowed_themes = (array) get_ network_option( 'allowedthemes' );1194 $allowed_themes = (array) get_site_option( 'allowedthemes' ); 1195 1195 return $allowed_themes; 1196 1196 } -
trunk/src/wp-includes/default-constants.php
r34778 r34912 190 190 */ 191 191 if ( !defined( 'COOKIEHASH' ) ) { 192 $siteurl = get_ network_option( 'siteurl' );192 $siteurl = get_site_option( 'siteurl' ); 193 193 if ( $siteurl ) 194 194 define( 'COOKIEHASH', md5( $siteurl ) ); -
trunk/src/wp-includes/functions.php
r34896 r34912 1761 1761 * We also sometimes obey UPLOADS when rewriting is enabled -- see the next block. 1762 1762 */ 1763 if ( defined( 'UPLOADS' ) && ! ( is_multisite() && get_ network_option( 'ms_files_rewriting' ) ) ) {1763 if ( defined( 'UPLOADS' ) && ! ( is_multisite() && get_site_option( 'ms_files_rewriting' ) ) ) { 1764 1764 $dir = ABSPATH . UPLOADS; 1765 1765 $url = trailingslashit( $siteurl ) . UPLOADS; … … 1769 1769 if ( is_multisite() && ! ( is_main_network() && is_main_site() && defined( 'MULTISITE' ) ) ) { 1770 1770 1771 if ( ! get_ network_option( 'ms_files_rewriting' ) ) {1771 if ( ! get_site_option( 'ms_files_rewriting' ) ) { 1772 1772 /* 1773 1773 * If ms-files rewriting is disabled (networks created post-3.5), it is fairly … … 4004 4004 $global_terms = (bool) $filter; 4005 4005 else 4006 $global_terms = (bool) get_ network_option( 'global_terms_enabled', false );4006 $global_terms = (bool) get_site_option( 'global_terms_enabled', false ); 4007 4007 } 4008 4008 return $global_terms; -
trunk/src/wp-includes/l10n.php
r34828 r34912 55 55 // Don't check blog option when installing. 56 56 if ( wp_installing() || ( false === $ms_locale = get_option( 'WPLANG' ) ) ) { 57 $ms_locale = get_ network_option( 'WPLANG' );57 $ms_locale = get_site_option( 'WPLANG' ); 58 58 } 59 59 -
trunk/src/wp-includes/ms-default-constants.php
r34778 r34912 24 24 add_filter( 'default_site_option_ms_files_rewriting', '__return_true' ); 25 25 26 if ( ! get_ network_option( 'ms_files_rewriting' ) )26 if ( ! get_site_option( 'ms_files_rewriting' ) ) 27 27 return; 28 28 -
trunk/src/wp-includes/ms-deprecated.php
r34778 r34912 26 26 function get_dashboard_blog() { 27 27 _deprecated_function( __FUNCTION__, '3.1' ); 28 if ( $blog = get_ network_option( 'dashboard_blog' ) )28 if ( $blog = get_site_option( 'dashboard_blog' ) ) 29 29 return get_blog_details( $blog ); 30 30 -
trunk/src/wp-includes/ms-functions.php
r34854 r34912 101 101 */ 102 102 function get_user_count() { 103 return get_ network_option( 'user_count' );103 return get_site_option( 'user_count' ); 104 104 } 105 105 … … 118 118 _deprecated_argument( __FUNCTION__, '3.1' ); 119 119 120 return get_ network_option( 'blog_count' );120 return get_site_option( 'blog_count' ); 121 121 } 122 122 … … 345 345 */ 346 346 function is_email_address_unsafe( $user_email ) { 347 $banned_names = get_ network_option( 'banned_email_domains' );347 $banned_names = get_site_option( 'banned_email_domains' ); 348 348 if ( $banned_names && ! is_array( $banned_names ) ) 349 349 $banned_names = explode( "\n", $banned_names ); … … 423 423 $errors->add('user_name', __( 'Please enter a username.' ) ); 424 424 425 $illegal_names = get_ network_option( 'illegal_names' );425 $illegal_names = get_site_option( 'illegal_names' ); 426 426 if ( ! is_array( $illegal_names ) ) { 427 427 $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 ); 429 429 } 430 430 if ( in_array( $user_name, $illegal_names ) ) … … 451 451 $errors->add('user_email', __( 'Please enter a valid email address.' ) ); 452 452 453 $limited_email_domains = get_ network_option( 'limited_email_domains' );453 $limited_email_domains = get_site_option( 'limited_email_domains' ); 454 454 if ( is_array( $limited_email_domains ) && ! empty( $limited_email_domains ) ) { 455 455 $emaildomain = substr( $user_email, 1 + strpos( $user_email, '@' ) ); … … 545 545 546 546 $errors = new WP_Error(); 547 $illegal_names = get_ network_option( 'illegal_names' );547 $illegal_names = get_site_option( 'illegal_names' ); 548 548 if ( $illegal_names == false ) { 549 549 $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 ); 551 551 } 552 552 … … 790 790 791 791 $activate_url = esc_url($activate_url); 792 $admin_email = get_ network_option( 'admin_email' );792 $admin_email = get_site_option( 'admin_email' ); 793 793 if ( $admin_email == '' ) 794 794 $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' ) ); 796 796 $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n"; 797 797 $message = sprintf( … … 883 883 884 884 // Send email with activation link. 885 $admin_email = get_ network_option( 'admin_email' );885 $admin_email = get_site_option( 'admin_email' ); 886 886 if ( $admin_email == '' ) 887 887 $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' ) ); 889 889 $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n"; 890 890 $message = sprintf( … … 1125 1125 } 1126 1126 1127 add_option( 'WPLANG', get_ network_option( 'WPLANG' ) );1127 add_option( 'WPLANG', get_site_option( 'WPLANG' ) ); 1128 1128 update_option( 'blog_public', (int) $meta['public'] ); 1129 1129 … … 1161 1161 */ 1162 1162 function newblog_notify_siteadmin( $blog_id, $deprecated = '' ) { 1163 if ( get_ network_option( 'registrationnotification' ) != 'yes' )1163 if ( get_site_option( 'registrationnotification' ) != 'yes' ) 1164 1164 return false; 1165 1165 1166 $email = get_ network_option( 'admin_email' );1166 $email = get_site_option( 'admin_email' ); 1167 1167 if ( is_email($email) == false ) 1168 1168 return false; … … 1206 1206 */ 1207 1207 function newuser_notify_siteadmin( $user_id ) { 1208 if ( get_ network_option( 'registrationnotification' ) != 'yes' )1208 if ( get_site_option( 'registrationnotification' ) != 'yes' ) 1209 1209 return false; 1210 1210 1211 $email = get_ network_option( 'admin_email' );1211 $email = get_site_option( 'admin_email' ); 1212 1212 1213 1213 if ( is_email($email) == false ) … … 1345 1345 update_option( 'home', $url ); 1346 1346 1347 if ( get_ network_option( 'ms_files_rewriting' ) )1347 if ( get_site_option( 'ms_files_rewriting' ) ) 1348 1348 update_option( 'upload_path', UPLOADBLOGSDIR . "/$blog_id/files" ); 1349 1349 else … … 1421 1421 return false; 1422 1422 1423 $welcome_email = get_ network_option( 'welcome_email' );1423 $welcome_email = get_site_option( 'welcome_email' ); 1424 1424 if ( $welcome_email == false ) { 1425 1425 /* translators: Do not translate USERNAME, SITE_NAME, BLOG_URL, PASSWORD: those are placeholders. */ … … 1464 1464 */ 1465 1465 $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' ); 1467 1467 1468 1468 if ( $admin_email == '' ) 1469 1469 $admin_email = 'support@' . $_SERVER['SERVER_NAME']; 1470 1470 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' ) ); 1472 1472 $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n"; 1473 1473 $message = $welcome_email; … … 1520 1520 return false; 1521 1521 1522 $welcome_email = get_ network_option( 'welcome_user_email' );1522 $welcome_email = get_site_option( 'welcome_user_email' ); 1523 1523 1524 1524 $user = get_userdata( $user_id ); … … 1542 1542 $welcome_email = str_replace( 'LOGINLINK', wp_login_url(), $welcome_email ); 1543 1543 1544 $admin_email = get_ network_option( 'admin_email' );1544 $admin_email = get_site_option( 'admin_email' ); 1545 1545 1546 1546 if ( $admin_email == '' ) 1547 1547 $admin_email = 'support@' . $_SERVER['SERVER_NAME']; 1548 1548 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' ) ); 1550 1550 $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n"; 1551 1551 $message = $welcome_email; … … 1719 1719 */ 1720 1720 function 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' ) ); 1722 1722 $site_mimes = array(); 1723 1723 foreach ( $site_exts as $ext ) { … … 1860 1860 */ 1861 1861 function 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' ) ) 1863 1863 return $upload; 1864 1864 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 )); 1867 1867 1868 1868 return $upload; … … 2077 2077 */ 2078 2078 function users_can_register_signup_filter() { 2079 $registration = get_ network_option( 'registration');2079 $registration = get_site_option('registration'); 2080 2080 return ( $registration == 'all' || $registration == 'user' ); 2081 2081 } … … 2106 2106 2107 2107 --The Team @ SITE_NAME' ); 2108 update_ network_option( 'welcome_user_email', $text );2108 update_site_option( 'welcome_user_email', $text ); 2109 2109 } 2110 2110 return $text; … … 2232 2232 2233 2233 $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 ); 2235 2235 } 2236 2236 … … 2246 2246 2247 2247 $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 ); 2249 2249 } 2250 2250 … … 2284 2284 2285 2285 if ( ! is_numeric( $space_allowed ) ) 2286 $space_allowed = get_ network_option( 'blog_upload_space' );2286 $space_allowed = get_site_option( 'blog_upload_space' ); 2287 2287 2288 2288 if ( empty( $space_allowed ) || ! is_numeric( $space_allowed ) ) … … 2312 2312 } 2313 2313 $space_allowed = $allowed * 1024 * 1024; 2314 if ( get_ network_option( 'upload_space_check_disabled' ) )2314 if ( get_site_option( 'upload_space_check_disabled' ) ) 2315 2315 return $space_allowed; 2316 2316 … … 2330 2330 */ 2331 2331 function is_upload_space_available() { 2332 if ( get_ network_option( 'upload_space_check_disabled' ) )2332 if ( get_site_option( 'upload_space_check_disabled' ) ) 2333 2333 return true; 2334 2334 … … 2342 2342 */ 2343 2343 function 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' ) ) 2346 2346 return min( $size, $fileupload_maxk ); 2347 2347 -
trunk/src/wp-includes/ms-load.php
r34778 r34912 35 35 */ 36 36 function 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() ); 38 38 if ( empty( $active_plugins ) ) 39 39 return array(); … … 97 97 return WP_CONTENT_DIR . '/blog-inactive.php'; 98 98 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 ) ) ) ); 100 100 } 101 101 -
trunk/src/wp-includes/option.php
r34878 r34912 89 89 } else { // option does not exist, so we must cache its non-existence 90 90 if ( ! is_array( $notoptions ) ) { 91 $notoptions = array();91 $notoptions = array(); 92 92 } 93 93 $notoptions[$option] = true; … … 1481 1481 $option_timeout = '_site_transient_timeout_' . $transient; 1482 1482 $option = '_site_transient_' . $transient; 1483 $result = delete_ network_option( $option );1483 $result = delete_site_option( $option ); 1484 1484 if ( $result ) 1485 delete_ network_option( $option_timeout );1485 delete_site_option( $option_timeout ); 1486 1486 } 1487 1487 if ( $result ) { … … 1544 1544 if ( ! in_array( $transient, $no_timeout ) ) { 1545 1545 $transient_timeout = '_site_transient_timeout_' . $transient; 1546 $timeout = get_ network_option( $transient_timeout );1546 $timeout = get_site_option( $transient_timeout ); 1547 1547 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 ); 1550 1550 $value = false; 1551 1551 } … … 1553 1553 1554 1554 if ( ! isset( $value ) ) 1555 $value = get_ network_option( $transient_option );1555 $value = get_site_option( $transient_option ); 1556 1556 } 1557 1557 … … 1621 1621 $transient_timeout = '_site_transient_timeout_' . $transient; 1622 1622 $option = '_site_transient_' . $transient; 1623 if ( false === get_ network_option( $option ) ) {1623 if ( false === get_site_option( $option ) ) { 1624 1624 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 ); 1627 1627 } else { 1628 1628 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 ); 1631 1631 } 1632 1632 } -
trunk/src/wp-includes/pluggable.php
r34778 r34912 1962 1962 $values[ $type ] = constant( $const ); 1963 1963 } elseif ( ! $values[ $type ] ) { 1964 $values[ $type ] = get_ network_option( "{$scheme}_{$type}" );1964 $values[ $type ] = get_site_option( "{$scheme}_{$type}" ); 1965 1965 if ( ! $values[ $type ] ) { 1966 1966 $values[ $type ] = wp_generate_password( 64, true, true ); 1967 update_ network_option( "{$scheme}_{$type}", $values[ $type ] );1967 update_site_option( "{$scheme}_{$type}", $values[ $type ] ); 1968 1968 } 1969 1969 } … … 1971 1971 } else { 1972 1972 if ( ! $values['key'] ) { 1973 $values['key'] = get_ network_option( 'secret_key' );1973 $values['key'] = get_site_option( 'secret_key' ); 1974 1974 if ( ! $values['key'] ) { 1975 1975 $values['key'] = wp_generate_password( 64, true, true ); 1976 update_ network_option( 'secret_key', $values['key'] );1976 update_site_option( 'secret_key', $values['key'] ); 1977 1977 } 1978 1978 } -
trunk/src/wp-includes/script-loader.php
r34903 r34912 1164 1164 if ( ! isset($compress_scripts) ) { 1165 1165 $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 ) ) 1167 1167 $compress_scripts = false; 1168 1168 } … … 1170 1170 if ( ! isset($compress_css) ) { 1171 1171 $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 ) ) 1173 1173 $compress_css = false; 1174 1174 } -
trunk/src/wp-includes/user-functions.php
r34856 r34912 1812 1812 function wp_get_user_contact_methods( $user = null ) { 1813 1813 $methods = array(); 1814 if ( get_ network_option( 'initial_db_version' ) < 23588 ) {1814 if ( get_site_option( 'initial_db_version' ) < 23588 ) { 1815 1815 $methods = array( 1816 1816 'aim' => __( 'AIM' ), -
trunk/src/wp-signup.php
r34840 r34912 8 8 require( dirname( __FILE__ ) . '/wp-blog-header.php' ); 9 9 10 if ( is_array( get_ network_option( 'illegal_names' ) ) && isset( $_GET[ 'new' ] ) && in_array( $_GET[ 'new' ], get_network_option( 'illegal_names' ) ) ) {10 if ( is_array( get_site_option( 'illegal_names' )) && isset( $_GET[ 'new' ] ) && in_array( $_GET[ 'new' ], get_site_option( 'illegal_names' ) ) ) { 11 11 wp_redirect( network_home_url() ); 12 12 die(); … … 674 674 675 675 // Main 676 $active_signup = get_ network_option( 'registration', 'none' );676 $active_signup = get_site_option( 'registration', 'none' ); 677 677 /** 678 678 * Filter the type of site sign-up.
Note: See TracChangeset
for help on using the changeset viewer.