Changeset 38814
- Timestamp:
- 10/19/2016 04:46:14 AM (8 years ago)
- Location:
- trunk/src
- Files:
-
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/admin-header.php
r38705 r38814 34 34 35 35 if ( is_network_admin() ) 36 $admin_title = sprintf( __( 'Network Admin: %s' ), esc_html( get_ current_site()->site_name ) );36 $admin_title = sprintf( __( 'Network Admin: %s' ), esc_html( get_network()->site_name ) ); 37 37 elseif ( is_user_admin() ) 38 $admin_title = sprintf( __( 'User Dashboard: %s' ), esc_html( get_ current_site()->site_name ) );38 $admin_title = sprintf( __( 'User Dashboard: %s' ), esc_html( get_network()->site_name ) ); 39 39 else 40 40 $admin_title = get_bloginfo( 'name' ); -
trunk/src/wp-admin/includes/class-wp-ms-sites-list-table.php
r38201 r38814 519 519 $actions['edit'] = '<a href="' . esc_url( network_admin_url( 'site-info.php?id=' . $blog['blog_id'] ) ) . '">' . __( 'Edit' ) . '</a>'; 520 520 $actions['backend'] = "<a href='" . esc_url( get_admin_url( $blog['blog_id'] ) ) . "' class='edit'>" . __( 'Dashboard' ) . '</a>'; 521 if ( get_ current_site()->blog_id != $blog['blog_id'] ) {521 if ( get_network()->site_id != $blog['blog_id'] ) { 522 522 if ( $blog['deleted'] == '1' ) { 523 523 $actions['activate'] = '<a href="' . esc_url( wp_nonce_url( network_admin_url( 'sites.php?action=confirm&action2=activateblog&id=' . $blog['blog_id'] ), 'activateblog_' . $blog['blog_id'] ) ) . '">' . __( 'Activate' ) . '</a>'; -
trunk/src/wp-admin/includes/class-wp-ms-users-list-table.php
r37488 r38814 330 330 $path = ( $val->path === '/' ) ? '' : $val->path; 331 331 echo '<span class="site-' . $val->site_id . '" >'; 332 echo '<a href="'. esc_url( network_admin_url( 'site-info.php?id=' . $val->userblog_id ) ) .'">' . str_replace( '.' . get_ current_site()->domain, '', $val->domain . $path ) . '</a>';332 echo '<a href="'. esc_url( network_admin_url( 'site-info.php?id=' . $val->userblog_id ) ) .'">' . str_replace( '.' . get_network()->domain, '', $val->domain . $path ) . '</a>'; 333 333 echo ' <small class="row-actions">'; 334 334 $actions = array(); -
trunk/src/wp-admin/includes/ms.php
r38334 r38814 89 89 update_blog_status( $blog_id, 'deleted', 1 ); 90 90 91 $current_ site = get_current_site();91 $current_network = get_network(); 92 92 93 93 // If a full blog object is not available, do not destroy anything. … … 97 97 98 98 // Don't destroy the initial, main, or root blog. 99 if ( $drop && ( 1 == $blog_id || is_main_site( $blog_id ) || ( $blog->path == $current_ site->path && $blog->domain == $current_site->domain ) ) ) {99 if ( $drop && ( 1 == $blog_id || is_main_site( $blog_id ) || ( $blog->path == $current_network->path && $blog->domain == $current_network->domain ) ) ) { 100 100 $drop = false; 101 101 } -
trunk/src/wp-admin/includes/schema.php
r38590 r38814 528 528 if ( is_multisite() ) { 529 529 /* translators: site tagline */ 530 $options[ 'blogdescription' ] = sprintf(__('Just another %s site'), get_ current_site()->site_name );530 $options[ 'blogdescription' ] = sprintf(__('Just another %s site'), get_network()->site_name ); 531 531 $options[ 'permalink_structure' ] = '/%year%/%monthnum%/%day%/%postname%/'; 532 532 } -
trunk/src/wp-admin/includes/upgrade.php
r38591 r38814 162 162 163 163 $first_post = sprintf( $first_post, 164 sprintf( '<a href="%s">%s</a>', esc_url( network_home_url() ), get_ current_site()->site_name )164 sprintf( '<a href="%s">%s</a>', esc_url( network_home_url() ), get_network()->site_name ) 165 165 ); 166 166 167 167 // Back-compat for pre-4.4 168 168 $first_post = str_replace( 'SITE_URL', esc_url( network_home_url() ), $first_post ); 169 $first_post = str_replace( 'SITE_NAME', get_ current_site()->site_name, $first_post );169 $first_post = str_replace( 'SITE_NAME', get_network()->site_name, $first_post ); 170 170 } else { 171 171 $first_post = __( 'Welcome to WordPress. This is your first post. Edit or delete it, then start writing!' ); -
trunk/src/wp-admin/ms-delete-site.php
r38633 r38814 19 19 if ( hash_equals( get_option( 'delete_blog_hash' ), $_GET['h'] ) ) { 20 20 wpmu_delete_blog( $wpdb->blogid ); 21 wp_die( sprintf( __( 'Thank you for using %s, your site has been deleted. Happy trails to you until we meet again.' ), $current_site->site_name ) );21 wp_die( sprintf( __( 'Thank you for using %s, your site has been deleted. Happy trails to you until we meet again.' ), get_network()->site_name ) ); 22 22 } else { 23 23 wp_die( __( "I'm sorry, the link you clicked is stale. Please select another option." ) ); … … 71 71 $content = str_replace( '###USERNAME###', $user->user_login, $content ); 72 72 $content = str_replace( '###URL_DELETE###', $url_delete, $content ); 73 $content = str_replace( '###SITE_NAME###', $current_site->site_name, $content );73 $content = str_replace( '###SITE_NAME###', get_network()->site_name, $content ); 74 74 75 75 wp_mail( get_option( 'admin_email' ), "[ " . wp_specialchars_decode( get_option( 'blogname' ) ) . " ] ".__( 'Delete My Site' ), $content ); … … 80 80 <?php } else { 81 81 ?> 82 <p><?php printf( __( 'If you do not want to use your %s site any more, you can delete it using the form below. When you click <strong>Delete My Site Permanently</strong> you will be sent an email with a link in it. Click on this link to delete your site.'), $current_site->site_name); ?></p>82 <p><?php printf( __( 'If you do not want to use your %s site any more, you can delete it using the form below. When you click <strong>Delete My Site Permanently</strong> you will be sent an email with a link in it. Click on this link to delete your site.'), get_network()->site_name); ?></p> 83 83 <p><?php _e( 'Remember, once deleted your site cannot be restored.' ) ?></p> 84 84 -
trunk/src/wp-admin/network/settings.php
r38721 r38814 105 105 <th scope="row"><label for="site_name"><?php _e( 'Network Title' ) ?></label></th> 106 106 <td> 107 <input name="site_name" type="text" id="site_name" class="regular-text" value="<?php echo esc_attr( $current_site->site_name ) ?>" />107 <input name="site_name" type="text" id="site_name" class="regular-text" value="<?php echo esc_attr( get_network()->site_name ) ?>" /> 108 108 </td> 109 109 </tr> -
trunk/src/wp-admin/network/site-new.php
r38721 r38814 87 87 88 88 if ( is_subdomain_install() ) { 89 $newdomain = $domain . '.' . preg_replace( '|^www\.|', '', $current_site->domain );90 $path = $current_site->path;89 $newdomain = $domain . '.' . preg_replace( '|^www\.|', '', get_network()->domain ); 90 $path = get_network()->path; 91 91 } else { 92 $newdomain = $current_site->domain;93 $path = $current_site->path . $domain . '/';92 $newdomain = get_network()->domain; 93 $path = get_network()->path . $domain . '/'; 94 94 } 95 95 … … 127 127 128 128 $wpdb->hide_errors(); 129 $id = wpmu_create_blog( $newdomain, $path, $title, $user_id, $meta, $current_site->id);129 $id = wpmu_create_blog( $newdomain, $path, $title, $user_id, $meta, get_current_network_id() ); 130 130 $wpdb->show_errors(); 131 131 if ( ! is_wp_error( $id ) ) { … … 139 139 /* translators: %s: network name */ 140 140 __( '[%s] New Site Created' ), 141 $current_site->site_name141 get_network()->site_name 142 142 ), 143 143 sprintf( … … 199 199 <td> 200 200 <?php if ( is_subdomain_install() ) { ?> 201 <input name="blog[domain]" type="text" class="regular-text" id="site-address" aria-describedby="site-address-desc" autocapitalize="none" autocorrect="off"/><span class="no-break">.<?php echo preg_replace( '|^www\.|', '', $current_site->domain ); ?></span>201 <input name="blog[domain]" type="text" class="regular-text" id="site-address" aria-describedby="site-address-desc" autocapitalize="none" autocorrect="off"/><span class="no-break">.<?php echo preg_replace( '|^www\.|', '', get_network()->domain ); ?></span> 202 202 <?php } else { 203 echo $current_site->domain . $current_site->path ?><input name="blog[domain]" type="text" class="regular-text" id="site-address" aria-describedby="site-address-desc" autocapitalize="none" autocorrect="off" />203 echo get_network()->domain . get_network()->path ?><input name="blog[domain]" type="text" class="regular-text" id="site-address" aria-describedby="site-address-desc" autocapitalize="none" autocorrect="off" /> 204 204 <?php } 205 205 echo '<p class="description" id="site-address-desc">' . __( 'Only lowercase letters (a-z), numbers, and hyphens are allowed.' ) . '</p>'; -
trunk/src/wp-admin/network/sites.php
r38721 r38814 88 88 } 89 89 90 if ( $current_site->blog_id == $id ) {90 if ( get_network()->site_id == $id ) { 91 91 wp_die( __( 'Sorry, you are not allowed to change the current site.' ) ); 92 92 } … … 127 127 128 128 $updated_action = 'not_deleted'; 129 if ( $id != '0' && $id != $current_site->blog_id && current_user_can( 'delete_site', $id ) ) {129 if ( $id != '0' && $id != get_network()->site_id && current_user_can( 'delete_site', $id ) ) { 130 130 wpmu_delete_blog( $id, true ); 131 131 $updated_action = 'delete'; … … 138 138 139 139 foreach ( (array) $_POST['allblogs'] as $key => $val ) { 140 if ( $val != '0' && $val != $current_site->blog_id ) {140 if ( $val != '0' && $val != get_network()->site_id ) { 141 141 switch ( $doaction ) { 142 142 case 'delete': -
trunk/src/wp-admin/network/users.php
r38721 r38814 73 73 $blogs = get_blogs_of_user( $user_id, true ); 74 74 foreach ( (array) $blogs as $details ) { 75 if ( $details->userblog_id != $current_site->blog_id ) // main blog not a spam !75 if ( $details->userblog_id != get_network()->site_id ) // main blog not a spam ! 76 76 update_blog_status( $details->userblog_id, 'spam', '1' ); 77 77 } -
trunk/src/wp-includes/admin-bar.php
r38810 r38814 313 313 if ( is_network_admin() ) { 314 314 /* translators: %s: site name */ 315 $blogname = sprintf( __( 'Network Admin: %s' ), esc_html( get_ current_site()->site_name ) );315 $blogname = sprintf( __( 'Network Admin: %s' ), esc_html( get_network()->site_name ) ); 316 316 } elseif ( is_user_admin() ) { 317 317 /* translators: %s: site name */ 318 $blogname = sprintf( __( 'User Dashboard: %s' ), esc_html( get_ current_site()->site_name ) );318 $blogname = sprintf( __( 'User Dashboard: %s' ), esc_html( get_network()->site_name ) ); 319 319 } 320 320 -
trunk/src/wp-includes/class-wp-xmlrpc-server.php
r38775 r38814 629 629 foreach ( $blogs as $blog ) { 630 630 // Don't include blogs that aren't hosted at this site. 631 if ( $blog->site_id != get_current_ site()->id)631 if ( $blog->site_id != get_current_network_id() ) 632 632 continue; 633 633 -
trunk/src/wp-includes/functions.php
r38810 r38814 4303 4303 * @since 3.0.0 4304 4304 * 4305 * @global object $current_site4306 *4307 4305 * @param int $site_id Optional. Site ID to test. Defaults to current site. 4308 4306 * @return bool True if $site_id is the main site of the network, or if not … … 4310 4308 */ 4311 4309 function is_main_site( $site_id = null ) { 4312 // This is the current network's information; 'site' is old terminology.4313 global $current_site;4314 4315 4310 if ( ! is_multisite() ) 4316 4311 return true; … … 4319 4314 $site_id = get_current_blog_id(); 4320 4315 4321 return (int) $site_id === (int) $current_site->blog_id;4316 return (int) $site_id === (int) get_network()->site_id; 4322 4317 } 4323 4318 … … 4335 4330 } 4336 4331 4337 $current_network_id = (int) get_current_site()->id;4338 4339 4332 if ( null === $network_id ) { 4340 $network_id = $current_network_id;4333 $network_id = get_current_network_id(); 4341 4334 } 4342 4335 … … 4358 4351 } 4359 4352 4360 $current_ site = get_current_site();4353 $current_network = get_network(); 4361 4354 4362 4355 if ( defined( 'PRIMARY_NETWORK_ID' ) ) { 4363 4356 $main_network_id = PRIMARY_NETWORK_ID; 4364 } elseif ( isset( $current_ site->id ) && 1 === (int) $current_site->id ) {4357 } elseif ( isset( $current_network->id ) && 1 === (int) $current_network->id ) { 4365 4358 // If the current network has an ID of 1, assume it is the main network. 4366 4359 $main_network_id = 1; -
trunk/src/wp-includes/http.php
r38730 r38814 618 618 if ( $is_external ) 619 619 return $is_external; 620 if ( $host === get_ current_site()->domain )620 if ( $host === get_network()->domain ) 621 621 return true; 622 622 if ( isset( $queried[ $host ] ) ) -
trunk/src/wp-includes/link-template.php
r38698 r38814 3256 3256 return site_url($path, $scheme); 3257 3257 3258 $current_ site = get_current_site();3258 $current_network = get_network(); 3259 3259 3260 3260 if ( 'relative' == $scheme ) 3261 $url = $current_ site->path;3261 $url = $current_network->path; 3262 3262 else 3263 $url = set_url_scheme( 'http://' . $current_ site->domain . $current_site->path, $scheme );3263 $url = set_url_scheme( 'http://' . $current_network->domain . $current_network->path, $scheme ); 3264 3264 3265 3265 if ( $path && is_string( $path ) ) … … 3298 3298 return home_url($path, $scheme); 3299 3299 3300 $current_ site = get_current_site();3300 $current_network = get_network(); 3301 3301 $orig_scheme = $scheme; 3302 3302 … … 3305 3305 3306 3306 if ( 'relative' == $scheme ) 3307 $url = $current_ site->path;3307 $url = $current_network->path; 3308 3308 else 3309 $url = set_url_scheme( 'http://' . $current_ site->domain . $current_site->path, $scheme );3309 $url = set_url_scheme( 'http://' . $current_network->domain . $current_network->path, $scheme ); 3310 3310 3311 3311 if ( $path && is_string( $path ) ) -
trunk/src/wp-includes/load.php
r38636 r38814 815 815 * @since 4.6.0 816 816 * 817 * @global WP_Network $current_site The current network.818 *819 817 * @return int The ID of the current network. 820 818 */ … … 824 822 } 825 823 826 $current_ site = get_current_site();827 828 if ( ! isset( $current_ site->id ) ) {824 $current_network = get_network(); 825 826 if ( ! isset( $current_network->id ) ) { 829 827 return get_main_network_id(); 830 828 } 831 829 832 return absint( $current_ site->id );830 return absint( $current_network->id ); 833 831 } 834 832 -
trunk/src/wp-includes/ms-blogs.php
r38659 r38814 82 82 */ 83 83 function get_id_from_blogname( $slug ) { 84 $current_ site = get_current_site();84 $current_network = get_network(); 85 85 $slug = trim( $slug, '/' ); 86 86 87 87 if ( is_subdomain_install() ) { 88 $domain = $slug . '.' . preg_replace( '|^www\.|', '', $current_ site->domain );89 $path = $current_ site->path;88 $domain = $slug . '.' . preg_replace( '|^www\.|', '', $current_network->domain ); 89 $path = $current_network->path; 90 90 } else { 91 $domain = $current_ site->domain;92 $path = $current_ site->path . $slug . '/';91 $domain = $current_network->domain; 92 $path = $current_network->path . $slug . '/'; 93 93 } 94 94 -
trunk/src/wp-includes/ms-default-constants.php
r37985 r38814 48 48 */ 49 49 function ms_cookie_constants( ) { 50 $current_ site = get_current_site();50 $current_network = get_network(); 51 51 52 52 /** … … 54 54 */ 55 55 if ( !defined( 'COOKIEPATH' ) ) 56 define( 'COOKIEPATH', $current_ site->path );56 define( 'COOKIEPATH', $current_network->path ); 57 57 58 58 /** … … 60 60 */ 61 61 if ( !defined( 'SITECOOKIEPATH' ) ) 62 define( 'SITECOOKIEPATH', $current_ site->path );62 define( 'SITECOOKIEPATH', $current_network->path ); 63 63 64 64 /** … … 77 77 */ 78 78 if ( !defined('COOKIE_DOMAIN') && is_subdomain_install() ) { 79 if ( !empty( $current_ site->cookie_domain ) )80 define('COOKIE_DOMAIN', '.' . $current_ site->cookie_domain);79 if ( !empty( $current_network->cookie_domain ) ) 80 define('COOKIE_DOMAIN', '.' . $current_network->cookie_domain); 81 81 else 82 define('COOKIE_DOMAIN', '.' . $current_ site->domain);82 define('COOKIE_DOMAIN', '.' . $current_network->domain); 83 83 } 84 84 } -
trunk/src/wp-includes/ms-deprecated.php
r38458 r38814 29 29 return get_blog_details( $blog ); 30 30 31 return get_blog_details( get_ current_site()->blog_id );31 return get_blog_details( get_network()->site_id ); 32 32 } 33 33 -
trunk/src/wp-includes/ms-functions.php
r38655 r38814 547 547 global $wpdb, $domain; 548 548 549 $current_ site = get_current_site();550 $base = $current_ site->path;549 $current_network = get_network(); 550 $base = $current_network->path; 551 551 552 552 $blog_title = strip_tags( $blog_title ); … … 581 581 582 582 // do not allow users to create a blog that conflicts with a page on the main blog. 583 if ( !is_subdomain_install() && $wpdb->get_var( $wpdb->prepare( "SELECT post_name FROM " . $wpdb->get_blog_prefix( $current_ site->blog_id ) . "posts WHERE post_type = 'page' AND post_name = %s", $blogname ) ) )583 if ( !is_subdomain_install() && $wpdb->get_var( $wpdb->prepare( "SELECT post_name FROM " . $wpdb->get_blog_prefix( $current_network->site_id ) . "posts WHERE post_type = 'page' AND post_name = %s", $blogname ) ) ) 584 584 $errors->add( 'blogname', __( 'Sorry, you may not use that site name.' ) ); 585 585 … … 613 613 $path = $base.$blogname.'/'; 614 614 } 615 if ( domain_exists($mydomain, $path, $current_ site->id) )615 if ( domain_exists($mydomain, $path, $current_network->id) ) 616 616 $errors->add( 'blogname', __( 'Sorry, that site already exists!' ) ); 617 617 … … 790 790 791 791 // Send email with activation link. 792 if ( !is_subdomain_install() || get_current_ site()->id!= 1 )792 if ( !is_subdomain_install() || get_current_network_id() != 1 ) 793 793 $activate_url = network_site_url("wp-activate.php?key=$key"); 794 794 else … … 1335 1335 */ 1336 1336 function install_blog( $blog_id, $blog_title = '' ) { 1337 global $wpdb, $wp_roles , $current_site;1337 global $wpdb, $wp_roles; 1338 1338 1339 1339 // Cast for security … … 1364 1364 $siteurl = set_url_scheme( $siteurl, 'https' ); 1365 1365 } 1366 if ( 'https' === parse_url( get_home_url( $current_site->blog_id ), PHP_URL_SCHEME ) ) {1366 if ( 'https' === parse_url( get_home_url( get_network()->site_id ), PHP_URL_SCHEME ) ) { 1367 1367 $home = set_url_scheme( $home, 'https' ); 1368 1368 } … … 1376 1376 update_option( 'upload_path', UPLOADBLOGSDIR . "/$blog_id/files" ); 1377 1377 else 1378 update_option( 'upload_path', get_blog_option( get_ current_site()->blog_id, 'upload_path' ) );1378 update_option( 'upload_path', get_blog_option( get_network()->site_id, 'upload_path' ) ); 1379 1379 1380 1380 update_option( 'blogname', wp_unslash( $blog_title ) ); … … 1431 1431 */ 1432 1432 function wpmu_welcome_notification( $blog_id, $user_id, $password, $title, $meta = array() ) { 1433 $current_ site = get_current_site();1433 $current_network = get_network(); 1434 1434 1435 1435 /** … … 1471 1471 $user = get_userdata( $user_id ); 1472 1472 1473 $welcome_email = str_replace( 'SITE_NAME', $current_ site->site_name, $welcome_email );1473 $welcome_email = str_replace( 'SITE_NAME', $current_network->site_name, $welcome_email ); 1474 1474 $welcome_email = str_replace( 'BLOG_TITLE', $title, $welcome_email ); 1475 1475 $welcome_email = str_replace( 'BLOG_URL', $url, $welcome_email ); … … 1501 1501 $message = $welcome_email; 1502 1502 1503 if ( empty( $current_ site->site_name ) )1504 $current_ site->site_name = 'WordPress';1503 if ( empty( $current_network->site_name ) ) 1504 $current_network->site_name = 'WordPress'; 1505 1505 1506 1506 /** … … 1511 1511 * @param string $subject Subject of the email. 1512 1512 */ 1513 $subject = apply_filters( 'update_welcome_subject', sprintf( __( 'New %1$s Site: %2$s' ), $current_ site->site_name, wp_unslash( $title ) ) );1513 $subject = apply_filters( 'update_welcome_subject', sprintf( __( 'New %1$s Site: %2$s' ), $current_network->site_name, wp_unslash( $title ) ) ); 1514 1514 wp_mail( $user->user_email, wp_specialchars_decode( $subject ), $message, $message_headers ); 1515 1515 return true; … … 1532 1532 */ 1533 1533 function wpmu_welcome_user_notification( $user_id, $password, $meta = array() ) { 1534 $current_ site = get_current_site();1534 $current_network = get_network(); 1535 1535 1536 1536 /** … … 1565 1565 */ 1566 1566 $welcome_email = apply_filters( 'update_welcome_user_email', $welcome_email, $user_id, $password, $meta ); 1567 $welcome_email = str_replace( 'SITE_NAME', $current_ site->site_name, $welcome_email );1567 $welcome_email = str_replace( 'SITE_NAME', $current_network->site_name, $welcome_email ); 1568 1568 $welcome_email = str_replace( 'USERNAME', $user->user_login, $welcome_email ); 1569 1569 $welcome_email = str_replace( 'PASSWORD', $password, $welcome_email ); … … 1579 1579 $message = $welcome_email; 1580 1580 1581 if ( empty( $current_ site->site_name ) )1582 $current_ site->site_name = 'WordPress';1581 if ( empty( $current_network->site_name ) ) 1582 $current_network->site_name = 'WordPress'; 1583 1583 1584 1584 /** … … 1589 1589 * @param string $subject Subject of the email. 1590 1590 */ 1591 $subject = apply_filters( 'update_welcome_user_subject', sprintf( __( 'New %1$s User: %2$s' ), $current_ site->site_name, $user->user_login) );1591 $subject = apply_filters( 'update_welcome_user_subject', sprintf( __( 'New %1$s User: %2$s' ), $current_network->site_name, $user->user_login) ); 1592 1592 wp_mail( $user->user_email, wp_specialchars_decode( $subject ), $message, $message_headers ); 1593 1593 return true; … … 1878 1878 */ 1879 1879 function redirect_this_site( $deprecated = '' ) { 1880 return array( get_ current_site()->domain );1880 return array( get_network()->domain ); 1881 1881 } 1882 1882 … … 2025 2025 $blog_id = $meta[ 'add_to_blog' ]; 2026 2026 $role = $meta[ 'new_role' ]; 2027 remove_user_from_blog($user_id, get_ current_site()->blog_id); // remove user from main blog.2027 remove_user_from_blog($user_id, get_network()->site_id); // remove user from main blog. 2028 2028 add_user_to_blog( $blog_id, $user_id, $role ); 2029 2029 update_user_meta( $user_id, 'primary_blog', $blog_id ); … … 2039 2039 */ 2040 2040 function fix_phpmailer_messageid( $phpmailer ) { 2041 $phpmailer->Hostname = get_ current_site()->domain;2041 $phpmailer->Hostname = get_network()->domain; 2042 2042 } 2043 2043 -
trunk/src/wp-includes/ms-load.php
r38781 r38814 98 98 return WP_CONTENT_DIR . '/blog-inactive.php'; 99 99 } else { 100 $admin_email = str_replace( '@', ' AT ', get_site_option( 'admin_email', 'support@' . get_ current_site()->domain ) );100 $admin_email = str_replace( '@', ' AT ', get_site_option( 'admin_email', 'support@' . get_network()->domain ) ); 101 101 wp_die( 102 102 /* translators: %s: admin email link */ -
trunk/src/wp-includes/option.php
r38687 r38814 1070 1070 * @see get_option() 1071 1071 * 1072 * @global wpdb $wpdb 1073 * @global object $current_site 1072 * @global wpdb $wpdb 1074 1073 * 1075 1074 * @param int $network_id ID of the network. Can be null to default to the current network ID. … … 1079 1078 */ 1080 1079 function get_network_option( $network_id, $option, $default = false ) { 1081 global $wpdb , $current_site;1080 global $wpdb; 1082 1081 1083 1082 if ( $network_id && ! is_numeric( $network_id ) ) { … … 1088 1087 1089 1088 // Fallback to the current network if a network ID is not specified. 1090 if ( ! $network_id && is_multisite()) {1091 $network_id = $current_site->id;1089 if ( ! $network_id ) { 1090 $network_id = get_current_network_id(); 1092 1091 } 1093 1092 … … 1187 1186 * @see add_option() 1188 1187 * 1189 * @global wpdb $wpdb 1190 * @global object $current_site 1188 * @global wpdb $wpdb 1191 1189 * 1192 1190 * @param int $network_id ID of the network. Can be null to default to the current network ID. … … 1196 1194 */ 1197 1195 function add_network_option( $network_id, $option, $value ) { 1198 global $wpdb , $current_site;1196 global $wpdb; 1199 1197 1200 1198 if ( $network_id && ! is_numeric( $network_id ) ) { … … 1205 1203 1206 1204 // Fallback to the current network if a network ID is not specified. 1207 if ( ! $network_id && is_multisite()) {1208 $network_id = $current_site->id;1205 if ( ! $network_id ) { 1206 $network_id = get_current_network_id(); 1209 1207 } 1210 1208 … … 1297 1295 * @see delete_option() 1298 1296 * 1299 * @global wpdb $wpdb 1300 * @global object $current_site 1297 * @global wpdb $wpdb 1301 1298 * 1302 1299 * @param int $network_id ID of the network. Can be null to default to the current network ID. … … 1305 1302 */ 1306 1303 function delete_network_option( $network_id, $option ) { 1307 global $wpdb , $current_site;1304 global $wpdb; 1308 1305 1309 1306 if ( $network_id && ! is_numeric( $network_id ) ) { … … 1314 1311 1315 1312 // Fallback to the current network if a network ID is not specified. 1316 if ( ! $network_id && is_multisite()) {1317 $network_id = $current_site->id;1313 if ( ! $network_id ) { 1314 $network_id = get_current_network_id(); 1318 1315 } 1319 1316 … … 1379 1376 * @see update_option() 1380 1377 * 1381 * @global wpdb $wpdb 1382 * @global object $current_site 1378 * @global wpdb $wpdb 1383 1379 * 1384 1380 * @param int $network_id ID of the network. Can be null to default to the current network ID. … … 1388 1384 */ 1389 1385 function update_network_option( $network_id, $option, $value ) { 1390 global $wpdb , $current_site;1386 global $wpdb; 1391 1387 1392 1388 if ( $network_id && ! is_numeric( $network_id ) ) { … … 1397 1393 1398 1394 // Fallback to the current network if a network ID is not specified. 1399 if ( ! $network_id && is_multisite()) {1400 $network_id = $current_site->id;1395 if ( ! $network_id ) { 1396 $network_id = get_current_network_id(); 1401 1397 } 1402 1398 -
trunk/src/wp-login.php
r38739 r38814 99 99 if ( is_multisite() ) { 100 100 $login_header_url = network_home_url(); 101 $login_header_title = get_ current_site()->site_name;101 $login_header_title = get_network()->site_name; 102 102 } else { 103 103 $login_header_url = __( 'https://wordpress.org/' ); … … 333 333 334 334 if ( is_multisite() ) { 335 $blogname = get_ current_site()->site_name;335 $blogname = get_network()->site_name; 336 336 } else { 337 337 /* -
trunk/src/wp-signup.php
r37551 r38814 101 101 } 102 102 103 $current_ site = get_current_site();103 $current_network = get_network(); 104 104 // Blog name 105 105 if ( !is_subdomain_install() ) … … 113 113 114 114 if ( !is_subdomain_install() ) 115 echo '<span class="prefix_address">' . $current_ site->domain . $current_site->path . '</span><input name="blogname" type="text" id="blogname" value="'. esc_attr($blogname) .'" maxlength="60" /><br />';115 echo '<span class="prefix_address">' . $current_network->domain . $current_network->path . '</span><input name="blogname" type="text" id="blogname" value="'. esc_attr($blogname) .'" maxlength="60" /><br />'; 116 116 else 117 echo '<input name="blogname" type="text" id="blogname" value="'.esc_attr($blogname).'" maxlength="60" /><span class="suffix_address">.' . ( $site_domain = preg_replace( '|^www\.|', '', $current_ site->domain ) ) . '</span><br />';117 echo '<input name="blogname" type="text" id="blogname" value="'.esc_attr($blogname).'" maxlength="60" /><span class="suffix_address">.' . ( $site_domain = preg_replace( '|^www\.|', '', $current_network->domain ) ) . '</span><br />'; 118 118 119 119 if ( ! is_user_logged_in() ) { 120 120 if ( ! is_subdomain_install() ) { 121 $site = $current_ site->domain . $current_site->path . __( 'sitename' );121 $site = $current_network->domain . $current_network->path . __( 'sitename' ); 122 122 } else { 123 $site = __( 'domain' ) . '.' . $site_domain . $current_ site->path;123 $site = __( 'domain' ) . '.' . $site_domain . $current_network->path; 124 124 } 125 125 … … 305 305 $errors = $filtered_results['errors']; 306 306 307 echo '<h2>' . sprintf( __( 'Get <em>another</em> %s site in seconds' ), get_ current_site()->site_name ) . '</h2>';307 echo '<h2>' . sprintf( __( 'Get <em>another</em> %s site in seconds' ), get_network()->site_name ) . '</h2>'; 308 308 309 309 if ( $errors->get_error_code() ) { … … 533 533 <h2><?php 534 534 /* translators: %s: name of the network */ 535 printf( __( 'Get your own %s account in seconds' ), get_ current_site()->site_name );535 printf( __( 'Get your own %s account in seconds' ), get_network()->site_name ); 536 536 ?></h2> 537 537 <form id="setupform" method="post" action="wp-signup.php" novalidate="novalidate">
Note: See TracChangeset
for help on using the changeset viewer.