/**
 * Checks if a specific theme is still filtering the Groups directory title
 * if so, transform the title button into a Groups directory nav item.
 *
 * @since 2.2.0
 *
 * @uses bp_group_create_nav_item() to output the create a Group nav item.
 *
 * @return string HTML Output
 */
function bp_group_backcompat_create_nav_item()
{
    // Bail if the Groups nav item is already used by bp-legacy.
    // BAO quercus does not like this
    //if ( has_action( 'bp_groups_directory_group_filter', 'bp_legacy_theme_group_create_nav', 999 ) ) {
    //	return;
    //}
    // Bail if the theme is not filtering the Groups directory title.
    if (!has_filter('bp_groups_directory_header')) {
        return;
    }
    bp_group_create_nav_item();
}
Exemplo n.º 2
0
/**
 * Add the Create a Group nav to the Groups directory navigation.
 *
 * bp-legacy puts the Create a Group nav at the last position of
 * the Groups directory navigation.
 *
 * @since BuddyPress (2.2.0)
 *
 * @uses   bp_group_create_nav_item() to output the create a Group nav item
 * @return string
 */
function bp_legacy_theme_group_create_nav()
{
    bp_group_create_nav_item();
}