Changeset 1238 for trunk/bp-blogs.php
- Timestamp:
- 03/19/2009 01:35:32 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/bp-blogs.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-blogs.php
r1227 r1238 466 466 bp_blogs_record_post( $post_id ); 467 467 } 468 469 $recorded_post = $existing_post; 468 470 } 469 471 … … 623 625 bp_blogs_delete_activity( array( 'item_id' => $post->blog_id, 'secondary_item_id' => $post->id, 'component_name' => 'blogs', 'component_action' => 'new_blog_post', 'user_id' => $post->user_id ) ); 624 626 625 do_action( 'bp_blogs_remove_post', $blog_id, $post_id );627 do_action( 'bp_blogs_remove_post', $blog_id, $post_id, $post->user_id ); 626 628 } 627 629 add_action( 'delete_post', 'bp_blogs_remove_post' ); … … 643 645 bp_blogs_delete_activity( array( 'item_id' => $blog_id, 'secondary_item_id' => $comment_id, 'component_name' => 'blogs', 'component_action' => 'new_blog_comment', 'user_id' => $bp->loggedin_user->id ) ); 644 646 645 do_action( 'bp_blogs_remove_comment', $blog_id, $comment_id );647 do_action( 'bp_blogs_remove_comment', $blog_id, $comment_id, $bp->loggedin_user->id ); 646 648 } 647 649 add_action( 'delete_comment', 'bp_blogs_remove_comment' ); … … 834 836 add_action( 'wpmu_delete_user', 'bp_blogs_remove_data', 1 ); 835 837 add_action( 'delete_user', 'bp_blogs_remove_data', 1 ); 838 839 840 function bp_blogs_clear_blog_object_cache( $blog_id, $user_id ) { 841 wp_cache_delete( 'bp_user_blogs_' . $user_id, 'bp' ); 842 } 843 844 function bp_blogs_format_clear_blog_cache( $recorded_blog_obj ) { 845 bp_blogs_clear_blog_object_cache( false, $recorded_blog_obj->user_id ); 846 } 847 848 function bp_blogs_clear_post_object_cache( $blog_id, $post_id, $user_id ) { 849 wp_cache_delete( 'bp_user_posts_' . $user_id, 'bp' ); 850 } 851 852 function bp_blogs_format_clear_post_cache( $recorded_post_obj ) { 853 bp_blogs_clear_post_object_cache( false, false, $recorded_post_obj->user_id ); 854 } 855 856 function bp_blogs_clear_comment_object_cache( $blog_id, $comment_id, $user_id ) { 857 wp_cache_delete( 'bp_user_comments_' . $user_id, 'bp' ); 858 } 859 860 function bp_blogs_format_clear_comment_cache( $recorded_comment_obj ) { 861 bp_blogs_clear_comment_object_cache( false, false, $recorded_comment_obj->user_id ); 862 } 863 864 // List actions to clear object caches on 865 add_action( 'bp_blogs_remove_blog_for_user', 'bp_blogs_clear_blog_object_cache', 10, 2 ); 866 add_action( 'bp_blogs_remove_post', 'bp_blogs_clear_post_object_cache', 10, 3 ); 867 add_action( 'bp_blogs_remove_comment', 'bp_blogs_clear_comment_object_cache', 10, 3 ); 868 869 add_action( 'bp_blogs_new_blog', 'bp_blogs_format_clear_blog_cache', 10, 2 ); 870 add_action( 'bp_blogs_new_blog_post', 'bp_blogs_format_clear_post_cache', 10, 2 ); 871 add_action( 'bp_blogs_new_blog_comment', 'bp_blogs_format_clear_comment_cache', 10, 2 ); 836 872 837 873 // List actions to clear super cached pages on, if super cache is installed … … 844 880 add_action( 'bp_blogs_new_blog_post', 'bp_core_clear_cache' ); 845 881 add_action( 'bp_blogs_new_blog', 'bp_core_clear_cache' ); 846 add_action( 'bp_blogs_new_blog', 'bp_core_clear_cache' );847 882 add_action( 'bp_blogs_remove_data', 'bp_core_clear_cache' ); 848 883
Note: See TracChangeset
for help on using the changeset viewer.