mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-03 16:50:13 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user