bp_core_set_uri_globals_member_slug

Filter the portion of the URI that is the displayed user's slug.

Description

apply_filters( 'bp_core_set_uri_globals_member_slug', (string) $bp_uri_0 ); 

Eg. example.com/ADMIN (when root profiles is enabled)

ADMIN would be the displayed user's slug.

Parameters (1)

0. $bp_uri_0 (string)
The bp uri 0.

Usage

To run the hook, copy the example below.
  1. $bp_uri_0 = apply_filters( 'bp_core_set_uri_globals_member_slug', $bp_uri_0 ); 
  2.  
  3. if ( !empty( $bp_uri_0 ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the bp_core_set_uri_globals_member_slug callback 
  2. function filter_bp_core_set_uri_globals_member_slug( $bp_uri_0 ) { 
  3. // make filter magic happen here... 
  4. return $bp_uri_0
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'bp_core_set_uri_globals_member_slug', 'filter_bp_core_set_uri_globals_member_slug', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'bp_core_set_uri_globals_member_slug', 'filter_bp_core_set_uri_globals_member_slug', 10, 1 ); 

Defined (2)

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

/bp-core/bp-core-catchuri.php  
  1. $member_slug = apply_filters( 'bp_core_set_uri_globals_member_slug', $bp_uri[0] ); 
  1. $after_member_slug = apply_filters( 'bp_core_set_uri_globals_member_slug', $after_member_slug );