Skip to:
Content

BuddyPress.org

Changeset 5356


Ignore:
Timestamp:
11/24/2011 03:09:00 AM (15 years ago)
Author:
boonebgorges
Message:

Ensures that Sitewide Tags blog posts do not go to the activity stream (unless explicitly told to do so by filtering 'bp_blogs_block_sitewide_tags_activity'). Fixes #3742.

Location:
branches/1.5
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/1.5/bp-blogs/bp-blogs-functions.php

    r5338 r5356  
    161161                $user_id = (int)$post->post_author;
    162162
    163         // This is to stop infinite loops with Donncha's sitewide tags plugin
    164         if ( !empty( $bp->site_options['tags_blog_id'] ) && (int)$blog_id == (int)$bp->site_options['tags_blog_id'] )
     163        // Stop infinite loops with WordPress MU Sitewide Tags.
     164        // That plugin changed the way its settings were stored at some point. Thus the dual check.
     165        if ( !empty( $bp->site_options['sitewide_tags_blog'] ) ) {
     166                $st_options = maybe_unserialize( $bp->site_options['sitewide_tags_blog'] );
     167                $tags_blog_id = isset( $st_options['tags_blog_id'] ) ? $st_options['tags_blog_id'] : 0;
     168        } else {
     169                $tags_blog_id = isset( $bp->site_options['tags_blog_id'] ) ? $bp->site_options['tags_blog_id'] : 0;
     170        }
     171
     172        if ( (int)$blog_id == $tags_blog_id && apply_filters( 'bp_blogs_block_sitewide_tags_activity', true ) )
    165173                return false;
    166174
     
    314322                        return false;
    315323        }
    316        
    317        
    318324
    319325        if ( $role != 'subscriber' )
  • branches/1.5/bp-core/bp-core-functions.php

    r5335 r5356  
    10091009        if ( is_multisite() ) {
    10101010                $network_options = apply_filters( 'bp_core_network_options', array(
    1011                         'tags_blog_id'    => '0',
    1012                         'registration'    => '0',
    1013                         'fileupload_maxk' => '1500'
     1011                        'tags_blog_id'       => '0',
     1012                        'sitewide_tags_blog' => '',
     1013                        'registration'       => '0',
     1014                        'fileupload_maxk'    => '1500'
    10141015                ) );
    10151016
Note: See TracChangeset for help on using the changeset viewer.