Skip to:
Content

bbPress.org

Ticket #2151: 2151.01.patch

File 2151.01.patch, 770 bytes (added by r-a-y, 8 years ago)
  • includes/common/template.php

    function bbp_is_site_public( $site_id = 0 ) { 
    110110        // Get the site visibility setting
    111111        $public = get_blog_option( $site_id, 'blog_public', 1 );
    112112
    113         return (bool) apply_filters( 'bbp_is_site_public', $public, $site_id );
     113        // If 'blog_public' is greater than zero, this implies the site is public
     114        if ( (int) $public > 0 ) {
     115                $retval = true;
     116
     117        // If lower than zero, site isn't public
     118        // This includes disabling search engines under "Settings > Reading"
     119        } else {
     120                $retval = false;
     121        }
     122
     123        return (bool) apply_filters( 'bbp_is_site_public', $retval, $site_id );
    114124}
    115125
    116126/**