bp_get_group_type_directory_link

Return group type directory link.

Description

(string) bp_get_group_type_directory_link( (string) $group_type = '' ); 

Returns (string)

Parameters (1)

0. $group_type — Optional. (string) => ''
Unique group type identifier as used in bp_groups_register_group_type().

Usage

  1. if ( !function_exists( 'bp_get_group_type_directory_link' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-groups/bp-groups-template.php'; 
  3.  
  4. // Unique group type identifier as used in bp_groups_register_group_type(). 
  5. $group_type = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bp_get_group_type_directory_link($group_type); 
  9.  

Defined (1)

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

/bp-groups/bp-groups-template.php  
  1. function bp_get_group_type_directory_link( $group_type = '' ) { 
  2. if ( empty( $group_type ) ) { 
  3. return ''; 
  4.  
  5. return sprintf( '<a href="%s">%s</a>', esc_url( bp_get_group_type_directory_permalink( $group_type ) ), bp_groups_get_group_type_object( $group_type )->labels['name'] );