Skip to:
Content

BuddyPress.org

Changeset 4115


Ignore:
Timestamp:
03/11/2011 08:46:54 PM (14 years ago)
Author:
boonebgorges
Message:

Puts filters on blog privacy in the blog activity functions so that plugins can manipulate better. Fixes #1536. Props boonebgorges and SergeyBiryukov

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-blogs/bp-blogs-functions.php

    r4107 r4115  
    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
     
    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 );
     
    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
Note: See TracChangeset for help on using the changeset viewer.