Changeset 371 for trunk/bp-blogs.php
- Timestamp:
- 10/02/2008 05:47:14 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/bp-blogs.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-blogs.php
r365 r371 250 250 global $bp; 251 251 252 if ( !$bp ) { 253 bp_core_setup_globals(); 254 bp_blogs_setup_globals(); 255 } 256 252 257 if ( !$user_id ) 253 258 $user_id = $bp['loggedin_userid']; … … 270 275 function bp_blogs_record_post($post_id = '') { 271 276 global $bp, $current_blog; 277 278 if ( !$bp ) { 279 bp_core_setup_globals(); 280 bp_blogs_setup_globals(); 281 } 272 282 273 283 $post_id = (int)$post_id; … … 398 408 399 409 function bp_blogs_remove_post( $post_id = '' ) { 400 global $current_blog; 410 global $current_blog, $bp; 411 412 if ( !$bp ) { 413 bp_core_setup_globals(); 414 bp_blogs_setup_globals(); 415 } 401 416 402 417 $post_id = (int)$post_id; 403 418 $blog_id = (int)$current_blog->blog_id; 404 419 405 BP_Blogs_Post::delete( $post_id, $blog_id );420 BP_Blogs_Post::delete( $post_id, $blog_id, $bp['loggedin_userid'] ); 406 421 } 407 422 add_action( 'delete_post', 'bp_blogs_remove_post' ); 408 423 409 424 function bp_blogs_remove_comment( $comment_id = '' ) { 410 global $current_blog; 425 global $current_blog, $bp; 426 427 if ( !$bp ) { 428 bp_core_setup_globals(); 429 bp_blogs_setup_globals(); 430 } 411 431 412 432 $comment_id = (int)$comment_id; 413 433 $blog_id = (int)$current_blog->blog_id; 414 434 415 BP_Blogs_Comment::delete( $comment_id, $blog_id );435 BP_Blogs_Comment::delete( $comment_id, $blog_id, $bp['loggedin_userid'] ); 416 436 } 417 437 add_action( 'delete_comment', 'bp_blogs_remove_comment' ); … … 437 457 global $wpdb, $bp; 438 458 459 if ( !$bp ) { 460 bp_core_setup_globals(); 461 bp_blogs_setup_globals(); 462 } 463 439 464 $user_id = $bp['loggedin_userid']; 440 465 $blogs = get_blogs_of_user($user_id);
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)