Changeset 2759
- Timestamp:
- 02/22/2010 01:08:24 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.2/bp-blogs.php
r2755 r2759 551 551 add_action( 'wp_set_comment_status', 'bp_blogs_manage_comment', 10, 2 ); 552 552 553 function bp_blogs_add_user_to_blog( $user_id, $role, $blog_id ) { 554 if ( $role != 'subscriber' ) { 553 function bp_blogs_add_user_to_blog( $user_id, $role, $blog_id = false ) { 554 global $current_blog; 555 556 if ( empty( $blog_id ) ) 557 $blog_id = $current_blog->blog_id; 558 559 if ( $role != 'subscriber' ) 555 560 bp_blogs_record_blog( $blog_id, $user_id, true ); 556 }557 561 } 558 562 add_action( 'add_user_to_blog', 'bp_blogs_add_user_to_blog', 10, 3 ); 559 563 560 function bp_blogs_remove_user_from_blog( $user_id, $blog_id ) { 564 function bp_blogs_remove_user_from_blog( $user_id, $blog_id = false ) { 565 global $current_blog; 566 567 if ( empty( $blog_id ) ) 568 $blog_id = $current_blog->blog_id; 569 561 570 bp_blogs_remove_blog_for_user( $user_id, $blog_id ); 562 571 }
Note: See TracChangeset
for help on using the changeset viewer.