本文整理汇总了PHP中BP_Groups_Group::get_by_most_forum_topics方法的典型用法代码示例。如果您正苦于以下问题:PHP BP_Groups_Group::get_by_most_forum_topics方法的具体用法?PHP BP_Groups_Group::get_by_most_forum_topics怎么用?PHP BP_Groups_Group::get_by_most_forum_topics使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BP_Groups_Group
的用法示例。
在下文中一共展示了BP_Groups_Group::get_by_most_forum_topics方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: groups_get_groups
function groups_get_groups( $args = '' ) {
global $bp;
$defaults = array(
'type' => 'active', // active, newest, alphabetical, random, popular, most-forum-topics or most-forum-posts
'user_id' => false, // Pass a user_id to limit to only groups that this user is a member of
'search_terms' => false, // Limit to groups that match these search terms
'per_page' => 20, // The number of results to return per page
'page' => 1, // The page to return if limiting per page
'populate_extras' => true, // Fetch meta such as is_banned and is_member
);
$params = wp_parse_args( $args, $defaults );
extract( $params, EXTR_SKIP );
switch ( $type ) {
case 'active': default:
$groups = BP_Groups_Group::get_active( $per_page, $page, $user_id, $search_terms, $populate_extras );
break;
case 'newest':
$groups = BP_Groups_Group::get_newest( $per_page, $page, $user_id, $search_terms, $populate_extras );
break;
case 'popular':
$groups = BP_Groups_Group::get_popular( $per_page, $page, $user_id, $search_terms, $populate_extras );
break;
case 'alphabetical':
$groups = BP_Groups_Group::get_alphabetically( $per_page, $page, $user_id, $search_terms, $populate_extras );
break;
case 'random':
$groups = BP_Groups_Group::get_random( $per_page, $page, $user_id, $search_terms, $populate_extras );
break;
case 'most-forum-topics':
$groups = BP_Groups_Group::get_by_most_forum_topics( $per_page, $page, $user_id, $search_terms, $populate_extras );
break;
case 'most-forum-posts':
$groups = BP_Groups_Group::get_by_most_forum_posts( $per_page, $page, $user_id, $search_terms, $populate_extras );
break;
}
return apply_filters( 'groups_get_groups', $groups, &$params );
}