bp_group_type_short_code_callback( $atts )
Displays shortcode data.
Description
Parameters
- $atts
-
(Required)
Return
(false|string)
Source
File: bp-groups/bp-groups-functions.php
function bp_group_type_short_code_callback( $atts ) { ob_start(); if ( ! empty( $atts['type'] ) ) { ?> <div id="buddypress" class="buddypress-wrap round-avatars bp-dir-hori-nav bp-shortcode-wrap"> <div class="screen-content"> <div class="subnav-filters filters no-ajax" id="subnav-filters"> <?php bp_get_template_part( 'common/filters/grid-filters' ); ?> </div> <div id="groups-dir-list" class="groups dir-list" data-bp-list=""> <?php $atts['group_type'] = $atts['type']; if ( ! empty( $atts['type'] ) ) { $name = str_replace(array(' ', ','), array('-', '-'), strtolower( $atts['type'] ) ); // Set the "current" profile type, if one is provided, in member directories. buddypress()->groups->current_directory_type = $name; buddypress()->current_component = 'groups'; buddypress()->is_directory = true; } unset( $atts['type'] ); $bp_group_type_query = build_query( $atts ); if ( ! empty( $bp_group_type_query ) ) { $bp_group_type_query = '&' . $bp_group_type_query; } update_option( 'bp_group_type_short_code_query_build', $bp_group_type_query ); add_filter( 'bp_ajax_querystring', function ( $qs ) { return $qs .= get_option( 'bp_group_type_short_code_query_build' ); } ); //Get a BuddyPress groups-loop template part for display in a theme. bp_get_template_part( 'groups/groups-loop' ); ?> </div> </div> </div> <?php } return ob_get_clean(); }
Changelog
Version | Description |
---|---|
BuddyBoss 1.0.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.