/** * Output the Create a Group button. * * @since BuddyPress (2.0.0) */ function bp_group_create_button() { echo bp_get_group_create_button(); }
/** * Get the Create a Group nav item. * * @since 2.2.0 * * @return string */ function bp_get_group_create_nav_item() { // Get the create a group button. $create_group_button = bp_get_group_create_button(); // Make sure the button is available. if (empty($create_group_button)) { return; } $output = '<li id="group-create-nav">' . $create_group_button . '</li>'; /** * Filters the Create a Group nav item. * * @since 2.2.0 * * @param string $output HTML output for nav item. */ return apply_filters('bp_get_group_create_nav_item', $output); }
/** * Get the Create a Group nav item. * * @since BuddyPress (2.2.0) * * @return string */ function bp_get_group_create_nav_item() { // Get the create a group button $create_group_button = bp_get_group_create_button(); // Make sure the button is available if (empty($create_group_button)) { return; } $output = '<li id="group-create-nav">' . $create_group_button . '</li>'; return apply_filters('bp_get_group_create_nav_item', $output); }
/** * Add the Create a Group button to the Groups directory title. * * bp-legacy puts the Create a Group button into the page title, to mimic * the behavior of bp-default. * * @since BuddyPress (2.0.0) * @todo Deprecate * * @param string $title Groups directory title. * @return string */ function bp_legacy_theme_group_create_button($title) { return $title . ' ' . bp_get_group_create_button(); }
<?php do_action('bp_before_directory_groups_page'); ?> <div id="buddypress"> <header class="group-header page-header"> <div id="item-statistics" class="follows"> <h1 class="main-title"><?php buddyboss_page_title(); ?> </h1> <span class="create-a-group"><?php echo bp_get_group_create_button(); ?> </span> <div class="numbers"> <span> <p><?php echo groups_get_total_group_count(); ?> </p> <p><?php _e('Groups', 'boss'); ?> </p> </span> </div> </div><!-- #item-statistics -->