BP_Blogs_Blog::is_hidden( int $blog_id )

Check whether a given blog is hidden.


Description Description

Checks the ‘public’ column in the wp_blogs table.


Top ↑

Parameters Parameters

$blog_id

(int) (Required) The ID of the blog being checked.


Top ↑

Return Return

(bool) True if hidden (public = 0), false otherwise.


Source Source

File: bp-blogs/classes/class-bp-blogs-blog.php

	public static function is_hidden( $blog_id ) {
		global $wpdb;

		if ( !(int) $wpdb->get_var( $wpdb->prepare( "SELECT public FROM {$wpdb->base_prefix}blogs WHERE blog_id = %d", $blog_id ) ) ) {
			return true;
		}

		return false;
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.