Make WordPress Core


Ignore:
Timestamp:
01/22/2010 05:27:28 PM (17 years ago)
Author:
ryan
Message:

Introduce WP_User::for_blog() and current_user_can_for_blog() to avoid calls to WP_User::_init_caps(). fixes #11781

File:
1 edited

Legend:

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

    r12778 r12796  
    307307
    308308        if ( is_object( $current_user ) )
    309                 $current_user->_init_caps();
     309                $current_user->for_blog( $blog_id );
    310310
    311311        if ( is_object( $wp_object_cache ) && isset( $wp_object_cache->global_groups ) )
    … …  
    360360
    361361        if ( is_object( $current_user ) )
    362                 $current_user->_init_caps();
     362                $current_user->for_blog( $blog_id );
    363363
    364364        if ( is_object( $wp_object_cache ) && isset( $wp_object_cache->global_groups ) )
Note: See TracChangeset for help on using the changeset viewer.