Ticket #37102: 37102.patch
| File 37102.patch, 6.0 KB (added by , 10 years ago) |
|---|
-
src/wp-admin/includes/ms.php
66 66 switch_to_blog( $blog_id ); 67 67 } 68 68 69 $blog = get_ blog_details( $blog_id );69 $blog = get_site( $blog_id ); 70 70 /** 71 71 * Fires before a site is deleted. 72 72 * -
src/wp-admin/ms-delete-site.php
24 24 } 25 25 } 26 26 27 $blog = get_ blog_details();27 $blog = get_site(); 28 28 $user = wp_get_current_user(); 29 29 30 30 $title = __( 'Delete Site' ); -
src/wp-admin/my-sites.php
23 23 if ( 'updateblogsettings' == $action && isset( $_POST['primary_blog'] ) ) { 24 24 check_admin_referer( 'update-my-sites' ); 25 25 26 $blog = get_ blog_details( (int) $_POST['primary_blog'] );26 $blog = get_site( (int) $_POST['primary_blog'] ); 27 27 if ( $blog && isset( $blog->domain ) ) { 28 28 update_user_option( $current_user->ID, 'primary_blog', (int) $_POST['primary_blog'], true ); 29 29 $updated = true; -
src/wp-includes/class-wp-xmlrpc-server.php
4360 4360 * @return array|IXR_Error 4361 4361 */ 4362 4362 protected function _multisite_getUsersBlogs( $args ) { 4363 $current_blog = get_ blog_details();4363 $current_blog = get_site(); 4364 4364 4365 4365 $domain = $current_blog->domain; 4366 4366 $path = $current_blog->path . 'xmlrpc.php'; -
src/wp-includes/ms-blogs.php
38 38 * @return string Full URL of the blog if found. Empty string if not. 39 39 */ 40 40 function get_blogaddress_by_id( $blog_id ) { 41 $bloginfo = get_ blog_details( (int) $blog_id );41 $bloginfo = get_site( (int) $blog_id ); 42 42 43 43 if ( empty( $bloginfo ) ) { 44 44 return ''; 45 45 } 46 46 47 $scheme = parse_url( $bloginfo->home, PHP_URL_SCHEME );47 $scheme = parse_url( get_blog_option( $blog, 'home' ), PHP_URL_SCHEME ); 48 48 $scheme = empty( $scheme ) ? 'http' : $scheme; 49 49 50 50 return esc_url( $scheme . '://' . $bloginfo->domain . $bloginfo->path ); … … 264 264 $blog_id = get_current_blog_id(); 265 265 } 266 266 267 $details = get_ blog_details( $blog_id, false);267 $details = get_site( $blog_id ); 268 268 if ( ! $details ) { 269 269 // Make sure clean_blog_cache() gets the blog ID 270 270 // when the blog has been previously cached as … … 1035 1035 function get_blog_status( $id, $pref ) { 1036 1036 global $wpdb; 1037 1037 1038 $details = get_ blog_details( $id, false);1038 $details = get_site( $id ); 1039 1039 if ( $details ) 1040 1040 return $details->$pref; 1041 1041 -
src/wp-includes/ms-deprecated.php
19 19 * 20 20 * @since MU 21 21 * @deprecated 3.1.0 Use get_blog_details() 22 * @see get_blog_details() 22 * @deprecated 4.6.0 Use get_site() 23 * @see get_site() 23 24 * 24 25 * @return int Current site ID. 25 26 */ … … 26 27 function get_dashboard_blog() { 27 28 _deprecated_function( __FUNCTION__, '3.1' ); 28 29 if ( $blog = get_site_option( 'dashboard_blog' ) ) 29 return get_ blog_details( $blog );30 return get_site( $blog ); 30 31 31 return get_ blog_details( $GLOBALS['current_site']->blog_id );32 return get_site( $GLOBALS['current_site']->blog_id ); 32 33 } 33 34 34 35 /** -
src/wp-includes/ms-functions.php
53 53 if ( false !== $primary_blog ) { 54 54 if ( ! isset( $blogs[ $primary_blog ] ) ) { 55 55 update_user_meta( $user_id, 'primary_blog', $first_blog->userblog_id ); 56 $primary = get_ blog_details( $first_blog->userblog_id );56 $primary = get_site( $first_blog->userblog_id ); 57 57 } else { 58 $primary = get_ blog_details( $primary_blog );58 $primary = get_site( $primary_blog ); 59 59 } 60 60 } else { 61 61 //TODO Review this call to add_user_to_blog too - to get here the user must have a role on this blog? … … 71 71 foreach ( (array) $blogs as $blog_id => $blog ) { 72 72 if ( $blog->site_id != $wpdb->siteid ) 73 73 continue; 74 $details = get_ blog_details( $blog_id );74 $details = get_site( $blog_id ); 75 75 if ( is_object( $details ) && $details->archived == 0 && $details->spam == 0 && $details->deleted == 0 ) { 76 76 $ret = $blog; 77 77 if ( get_user_meta( $user_id , 'primary_blog', true ) != $blog_id ) … … 161 161 162 162 if ( !get_user_meta($user_id, 'primary_blog', true) ) { 163 163 update_user_meta($user_id, 'primary_blog', $blog_id); 164 $details = get_ blog_details($blog_id);164 $details = get_site( $blog_id ); 165 165 update_user_meta($user_id, 'source_domain', $details->domain); 166 166 } 167 167 -
src/wp-includes/ms-load.php
68 68 * @return true|string Returns true on success, or drop-in file to include. 69 69 */ 70 70 function ms_site_check() { 71 $blog = get_ blog_details();71 $blog = get_site(); 72 72 73 73 /** 74 74 * Filters checking the status of the current blog. -
src/wp-includes/user.php
719 719 $blog_id = get_current_blog_id(); 720 720 } 721 721 722 $blog = get_ blog_details( $blog_id );722 $blog = get_site( $blog_id ); 723 723 724 724 if ( ! $blog || ! isset( $blog->domain ) || $blog->archived || $blog->spam || $blog->deleted ) { 725 725 return false;