Skip to:
Content

BuddyPress.org

Ticket #1536: 1536.2.patch

File 1536.2.patch, 1.5 KB (added by SergeyBiryukov, 13 years ago)
  • bp-blogs/bp-blogs-functions.php

     
    8383        bp_blogs_update_blogmeta( $recorded_blog->blog_id, 'last_activity', bp_core_current_time() );
    8484
    8585        $is_private = !empty( $_POST['blog_public'] ) && (int)$_POST['blog_public'] ? false : true;
     86        $is_private = !apply_filters( 'bp_is_new_blog_public', !$is_private );
    8687
    8788        // Only record this activity if the blog is public
    8889        if ( !$is_private && !$no_activity ) {
     
    145146        if ( 'post' != $post->post_type )
    146147                return false;
    147148
     149        $is_blog_public = apply_filters( 'bp_is_blog_public', (int)get_blog_option( $blog_id, 'blog_public' ) );
     150
    148151        if ( 'publish' == $post->post_status && empty( $post->post_password ) ) {
    149                 if ( (int)get_blog_option( $blog_id, 'blog_public' ) || !is_multisite() ) {
     152                if ( $is_blog_public || !is_multisite() ) {
    150153                        // Record this in activity streams
    151154                        $post_permalink   = get_permalink( $post_id );
    152155
     
    219222        if ( !empty( $recorded_comment->post->post_password ) )
    220223                return false;
    221224
     225        $is_blog_public = apply_filters( 'bp_is_blog_public', (int)get_blog_option( $blog_id, 'blog_public' ) );
     226
    222227        // If blog is public allow activity to be posted
    223         if ( get_blog_option( $blog_id, 'blog_public' ) ) {
     228        if ( $is_blog_public ) {
    224229
    225230                // Get activity related links
    226231                $post_permalink = get_permalink( $recorded_comment->comment_post_ID );