bxcft_upload_dir

Bxcft_upload_dir.

Description

apply_filters( 'bxcft_upload_dir', (string) $profiles_this_user_id, (unknown) $this_user_id ); 

Use this filter if you want to change the folder where files and images are saved.

Parameters (2)

0. $profiles_this_user_id (string) => '/profiles/' . $this->user_id
The profiles this user id.
1. $this_user_id (unknown)
The this user id.

Usage

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

Defined (1)

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

/bp-xprofile-custom-fields-type.php  
  1. $profile_subdir = apply_filters( 'bxcft_upload_dir', '/profiles/' . $this->user_id,