Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/22/2014 03:49:43 AM (12 years ago)
Author:
r-a-y
Message:

Blogs: Invalidate total blog count when site is deleted.

This commit:

  • Uses bp_blogs_clear_blog_object_cache() to invalidate the total blog count after a site is deleted and when a site is created.
  • Deprecates bp_blogs_format_clear_blog_cache(), a function that isn't used internally as of this commit, for v2.2.0.
  • Adds a unit test.

Fixes #6062.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/deprecated/2.2.php

    r9194 r9251  
    6464        bp_activity_post_type_update( $post );
    6565}
     66
     67/**
     68 * Clear cache when a new blog is created.
     69 *
     70 * @since BuddyPress (1.0.0)
     71 * @deprecated BuddyPress (2.2.0)
     72 *
     73 * @param BP_Blogs_Blog $recorded_blog_obj The recorded blog, passed by
     74 *        'bp_blogs_new_blog'.
     75 */
     76function bp_blogs_format_clear_blog_cache( $recorded_blog_obj ) {
     77        _deprecated_function( __FUNCTION__, '2.2', 'bp_blogs_clear_blog_object_cache()' );
     78        bp_blogs_clear_blog_object_cache( false, $recorded_blog_obj->user_id );
     79}
Note: See TracChangeset for help on using the changeset viewer.