Make WordPress Core


Ignore:
Timestamp:
08/03/2012 05:51:42 PM (13 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-xmlrpc-server.php

    r21194 r21414  
    476476            $is_admin = current_user_can_for_blog( $blog_id, 'manage_options' );
    477477
     478            switch_to_blog( $blog_id );
    478479            $struct[] = array(
    479480                'isAdmin'       => $is_admin,
    480                 'url'           => get_home_url( $blog_id, '/' ),
     481                'url'           => home_url( '/' ),
    481482                'blogid'        => (string) $blog_id,
    482                 'blogName'      => get_blog_option( $blog_id, 'blogname' ),
    483                 'xmlrpc'        => get_site_url( $blog_id, 'xmlrpc.php' )
     483                'blogName'      => get_option( 'blogname' ),
     484                'xmlrpc'        => site_url( 'xmlrpc.php' )
    484485            );
     486            restore_current_blog();
    485487        }
    486488
Note: See TracChangeset for help on using the changeset viewer.