groups_total_public_forum_topic_count

  • apply_filters( 'groups_total_public_forum_topic_count', BP_Groups_Group::get_global_forum_topic_count( $type ) )

    Source Reference:

    • Component: BuddyPress :: bp-groups
      File: /bp-groups/bp-groups-forums.php :: Trac Source Line: 260
      		do_action( 'groups_delete_group_forum_post', $post_id, $topic_id );
      
      		return true;
      	}
      
      	return false;
      }
      
      function groups_total_public_forum_topic_count( $type = 'newest' ) {
      	return apply_filters( 'groups_total_public_forum_topic_count', BP_Groups_Group::get_global_forum_topic_count( $type ) );
      }
      
      /**
       * Get a total count of all topics of a given status, across groups/forums
       *
       * @package BuddyPress
       * @since 1.5
       *
       * @param str $status 'public', 'private', 'hidden', 'all' Which group types to count
       * @return int The topic count
      
  • apply_filters( 'groups_total_public_forum_topic_count', $bp->groups->filter_sql, $type )

    Source Reference:

    • Component: BuddyPress :: bp-groups
      File: /bp-groups/bp-groups-classes.php :: Trac Source Line: 590
      		return $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(id) FROM {$bp->groups->table_name} {$hidden_sql}" ) );
      	}
      
      	function get_global_forum_topic_count( $type ) {
      		global $bbdb, $wpdb, $bp;
      
      		if ( 'unreplied' == $type )
      			$bp->groups->filter_sql = ' AND t.topic_posts = 1';
      
      		$extra_sql = apply_filters( 'groups_total_public_forum_topic_count', $bp->groups->filter_sql, $type );
      
      		return $wpdb->get_var( "SELECT COUNT(t.topic_id) FROM {$bbdb->topics} AS t, {$bp->groups->table_name} AS g LEFT JOIN {$bp->groups->table_name_groupmeta} AS gm ON g.id = gm.group_id WHERE (gm.meta_key = 'forum_id' AND gm.meta_value = t.forum_id) AND g.status = 'public' AND t.topic_status = '0' AND t.topic_sticky != '2' {$extra_sql} " );
      	}
      
      	function get_total_member_count( $group_id ) {
      		global $wpdb, $bp;
      
      		return $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(id) FROM {$bp->groups->table_name_members} WHERE group_id = %d AND is_confirmed = 1 AND is_banned = 0", $group_id ) );
      	}
      

Comments are closed.