Changeset 4107 for trunk/bp-blogs/bp-blogs-functions.php
- Timestamp:
- 03/11/2011 06:02:47 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-blogs/bp-blogs-functions.php
r3940 r4107 265 265 266 266 function bp_blogs_add_user_to_blog( $user_id, $role = false, $blog_id = 0 ) { 267 global $wpdb , $current_blog;268 269 if ( empty( $blog_id ) && isset( $ current_blog) )270 $blog_id = $ current_blog->blog_id;267 global $wpdb; 268 269 if ( empty( $blog_id ) && isset( $wpdb->blogid ) ) 270 $blog_id = $wpdb->blogid; 271 271 else 272 272 $blog_id = BP_ROOT_BLOG; … … 291 291 292 292 function bp_blogs_remove_user_from_blog( $user_id, $blog_id = 0 ) { 293 global $ current_blog;293 global $wpdb; 294 294 295 295 if ( empty( $blog_id ) ) 296 $blog_id = $ current_blog->blog_id;296 $blog_id = $wpdb->blogid; 297 297 298 298 bp_blogs_remove_blog_for_user( $user_id, $blog_id ); … … 330 330 331 331 function bp_blogs_remove_post( $post_id, $blog_id = 0, $user_id = 0 ) { 332 global $ current_blog, $bp;333 334 if ( empty( $ current_blog->blog_id ) )332 global $wpdb, $bp; 333 334 if ( empty( $wpdb->blogid ) ) 335 335 return false; 336 336 … … 338 338 339 339 if ( !$blog_id ) 340 $blog_id = (int)$ current_blog->blog_id;340 $blog_id = (int)$wpdb->blogid; 341 341 342 342 if ( !$user_id )
Note: See TracChangeset
for help on using the changeset viewer.