Changeset 26120 for trunk/src/wp-includes/ms-functions.php
- Timestamp:
- 11/13/2013 03:22:48 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/ms-functions.php
r25862 r26120 536 536 * @return array Contains the new site data and error messages. 537 537 */ 538 function wpmu_validate_blog_signup($blogname, $blog_title, $user = '') { 539 global $wpdb, $domain, $current_site; 540 538 function wpmu_validate_blog_signup( $blogname, $blog_title, $user = '' ) { 539 global $wpdb, $domain; 540 541 $current_site = get_current_site(); 541 542 $base = $current_site->path; 542 543 … … 710 711 */ 711 712 function wpmu_signup_blog_notification( $domain, $path, $title, $user, $user_email, $key, $meta = array() ) { 712 global $current_site;713 714 713 if ( !apply_filters('wpmu_signup_blog_notification', $domain, $path, $title, $user, $user_email, $key, $meta) ) 715 714 return false; 716 715 717 716 // Send email with activation link. 718 if ( !is_subdomain_install() || $current_site->id != 1 )717 if ( !is_subdomain_install() || get_current_site()->id != 1 ) 719 718 $activate_url = network_site_url("wp-activate.php?key=$key"); 720 719 else … … 1123 1122 * @param string $blog_title The title of the new site. 1124 1123 */ 1125 function install_blog( $blog_id, $blog_title = '') {1126 global $wpdb, $wp_roles , $current_site;1124 function install_blog( $blog_id, $blog_title = '' ) { 1125 global $wpdb, $wp_roles; 1127 1126 1128 1127 // Cast for security … … 1152 1151 update_option( 'upload_path', UPLOADBLOGSDIR . "/$blog_id/files" ); 1153 1152 else 1154 update_option( 'upload_path', get_blog_option( $current_site->blog_id, 'upload_path' ) );1153 update_option( 'upload_path', get_blog_option( get_current_site()->blog_id, 'upload_path' ) ); 1155 1154 1156 1155 update_option( 'blogname', wp_unslash( $blog_title ) ); … … 1206 1205 */ 1207 1206 function wpmu_welcome_notification( $blog_id, $user_id, $password, $title, $meta = array() ) { 1208 global $current_site;1207 $current_site = get_current_site(); 1209 1208 1210 1209 if ( !apply_filters('wpmu_welcome_notification', $blog_id, $user_id, $password, $title, $meta) ) … … 1270 1269 */ 1271 1270 function wpmu_welcome_user_notification( $user_id, $password, $meta = array() ) { 1272 global $current_site;1271 $current_site = get_current_site(); 1273 1272 1274 1273 if ( !apply_filters('wpmu_welcome_user_notification', $user_id, $password, $meta) ) … … 1561 1560 */ 1562 1561 function redirect_this_site( $deprecated = '' ) { 1563 global $current_site; 1564 return array( $current_site->domain ); 1562 return array( get_current_site()->domain ); 1565 1563 } 1566 1564 … … 1690 1688 */ 1691 1689 function add_new_user_to_blog( $user_id, $password, $meta ) { 1692 global $current_site;1693 1690 if ( !empty( $meta[ 'add_to_blog' ] ) ) { 1694 1691 $blog_id = $meta[ 'add_to_blog' ]; 1695 1692 $role = $meta[ 'new_role' ]; 1696 remove_user_from_blog($user_id, $current_site->blog_id); // remove user from main blog.1693 remove_user_from_blog($user_id, get_current_site()->blog_id); // remove user from main blog. 1697 1694 add_user_to_blog( $blog_id, $user_id, $role ); 1698 1695 update_user_meta( $user_id, 'primary_blog', $blog_id ); … … 1706 1703 */ 1707 1704 function fix_phpmailer_messageid( $phpmailer ) { 1708 global $current_site; 1709 $phpmailer->Hostname = $current_site->domain; 1705 $phpmailer->Hostname = get_current_site()->domain; 1710 1706 } 1711 1707
Note: See TracChangeset
for help on using the changeset viewer.