bbp_is_site_public( int $site_id )
Check if current site is public
Description
Parameters
- $site_id
-
(Required)
Return
(bool) True if site is public, false if private
Source
File: bp-forums/common/template.php
function bbp_is_site_public( $site_id = 0 ) {
// Get the current site ID
if ( empty( $site_id ) )
$site_id = get_current_blog_id();
// Get the site visibility setting
$public = get_blog_option( $site_id, 'blog_public', 1 );
return (bool) apply_filters( 'bbp_is_site_public', $public, $site_id );
}
Changelog
| Version | Description |
|---|---|
| bbPress (r3398) | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.