Changeset 3398
- Timestamp:
- 08/08/2011 12:55:08 AM (13 years ago)
- Location:
- branches/plugin/bbp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-includes/bbp-common-template.php
r3386 r3398 36 36 37 37 /** is_ ***********************************************************************/ 38 39 /** 40 * Check if current site is public 41 * 42 * @since bbPress (r3398) 43 * 44 * @global WPDB $wpdb 45 * @param int $site_id 46 * @return bool True if site is public, false if private 47 */ 48 function bbp_is_site_public( $site_id = 0 ) { 49 50 // Get the current site ID 51 if ( empty( $site_id ) ) { 52 global $wpdb; 53 54 $site_id = (int) $wpdb->blogid; 55 } 56 57 // Get the site visibility setting 58 $public = get_blog_option( $site_id, 'blog_public', 1 ); 59 60 return (bool) apply_filters( 'bbp_is_site_public', $public, $site_id ); 61 } 38 62 39 63 /** -
branches/plugin/bbp-includes/bbp-extend-buddypress.php
r3397 r3398 170 170 */ 171 171 private function record_activity( $args = '' ) { 172 global $bp;173 172 174 173 // Bail if activity is not active … … 270 269 return; 271 270 271 // Bail if site is private 272 if ( !bbp_is_site_public() ) 273 return; 274 272 275 // Validate activity data 273 276 $user_id = $topic_author_id; … … 346 349 return; 347 350 351 // Bail if site is private 352 if ( !bbp_is_site_public() ) 353 return; 354 348 355 // Validate activity data 349 356 $user_id = $reply_author_id;
Note: See TracChangeset
for help on using the changeset viewer.