Deprecate get_blog_option(), add_blog_option(), update_blog_option(), and delete_blog_option().

Use the regular option functions wrapped in switch_to_blog() and restore_current_blog() instead.

Group multiple operations within a single switch where possible.

fixes #21432


git-svn-id: https://develop.svn.wordpress.org/trunk@21414 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2012-08-03 17:51:42 +00:00
parent a5c7405975
commit ce960f67a0
10 changed files with 208 additions and 166 deletions

View File

@@ -475,13 +475,15 @@ class wp_xmlrpc_server extends IXR_Server {
$blog_id = $blog->userblog_id;
$is_admin = current_user_can_for_blog( $blog_id, 'manage_options' );
switch_to_blog( $blog_id );
$struct[] = array(
'isAdmin' => $is_admin,
'url' => get_home_url( $blog_id, '/' ),
'url' => home_url( '/' ),
'blogid' => (string) $blog_id,
'blogName' => get_blog_option( $blog_id, 'blogname' ),
'xmlrpc' => get_site_url( $blog_id, 'xmlrpc.php' )
'blogName' => get_option( 'blogname' ),
'xmlrpc' => site_url( 'xmlrpc.php' )
);
restore_current_blog();
}
return $struct;