Changeset 3398 for branches/plugin/bbp-includes/bbp-common-template.php
- Timestamp:
- 08/08/2011 12:55:08 AM (13 years ago)
- File:
-
- 1 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 /**
Note: See TracChangeset
for help on using the changeset viewer.