WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/31/2016 04:55:01 AM (3 years ago)
Author:
wonderboymusic
Message:

Multisite: use get_current_blog_id() where applicable, in lieu of plucking the $blog_id global from outer space.

See #37699.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/ms-functions.php

    r38388 r38457  
    19671967 * @since MU
    19681968 *
    1969  * @global int $blog_id
    1970  *
    19711969 * @param array $details
    19721970 * @return true|WP_Error|void
    19731971 */
    19741972function add_existing_user_to_blog( $details = false ) {
    1975     global $blog_id;
    1976 
    19771973    if ( is_array( $details ) ) {
     1974        $blog_id = get_current_blog_id();
    19781975        $result = add_user_to_blog( $blog_id, $details[ 'user_id' ], $details[ 'role' ] );
    19791976        /**
Note: See TracChangeset for help on using the changeset viewer.