bp_members_component_link

Output a link to a members component subpage.

Description

bp_members_component_link( (string) $component, (string) $action = '', (string) $query_args = '', (bool) $nonce = false ); 

Parameters (4)

0. $component (string)
The component.
1. $action — Optional. (string) => ''
The action.
2. $query_args — Optional. (string) => ''
The query args.
3. $nonce — Optional. (bool) => false
The nonce.

Usage

  1. if ( !function_exists( 'bp_members_component_link' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-members/bp-members-template.php'; 
  3.  
  4. // The component. 
  5. $component = ''; 
  6.  
  7. // The action. 
  8. $action = ''; 
  9.  
  10. // The query args. 
  11. $query_args = ''; 
  12.  
  13. // The nonce. 
  14. $nonce = false; 
  15.  
  16. // NOTICE! Understand what this does before running. 
  17. $result = bp_members_component_link($component, $action, $query_args, $nonce); 
  18.  

Defined (1)

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

/bp-members/bp-members-template.php  
  1. function bp_members_component_link( $component, $action = '', $query_args = '', $nonce = false ) { 
  2. echo esc_url( bp_get_members_component_link( $component, $action, $query_args, $nonce ) );