bp_get_group_create_button

Get the Create a Group button.

Description

(string) bp_get_group_create_button(); 

Returns (string)


Usage

  1. if ( !function_exists( 'bp_get_group_create_button' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-groups/bp-groups-template.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_get_group_create_button(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/bp-groups/bp-groups-template.php  
  1. function bp_get_group_create_button() { 
  2. if ( ! is_user_logged_in() ) { 
  3. return false; 
  4.  
  5. return false; 
  6.  
  7. $button_args = array( 
  8. 'id' => 'create_group',  
  9. 'component' => 'groups',  
  10. 'link_text' => __( 'Create a Group', buddypress ),  
  11. 'link_class' => 'group-create no-ajax',  
  12. 'link_href' => trailingslashit( bp_get_groups_directory_permalink() . 'create' ),  
  13. 'wrapper' => false,  
  14. 'block_self' => false,  
  15. ); 
  16.  
  17. /** 
  18. * Filters the HTML button for creating a group. 
  19. * @since 2.0.0 
  20. * @param string $button HTML button for creating a group. 
  21. */