function is_recorded($comment_id, $comment_post_id, $blog_id, $user_id = null)
 {
     global $bp, $wpdb, $current_user;
     if (!$bp->blogs) {
         bp_blogs_setup_globals();
     }
     if (!$user_id) {
         $user_id = $current_user->ID;
     }
     return $wpdb->get_var($wpdb->prepare("SELECT comment_id FROM {$bp->blogs->table_name_blog_comments} WHERE comment_id = %d AND blog_id = %d AND comment_post_id = %d AND user_id = %d", $comment_id, $blog_id, $comment_post_id, $user_id));
 }
Exemple #2
0
	function is_hidden( $blog_id ) {
		global $wpdb;

		if ( !$bp->blogs )
			bp_blogs_setup_globals();

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

		return false;
	}