bxcft_show_download_file_link

The BuddyPress Xprofile Custom Fields Type bxcft show download file link hook.

Description

Parameters (4)

0. $a_href_uploads_baseurl_bp_get_the_profile_field_edit_value_title_bp_get_the_profile_field_input_name_download_file_bxcft_a — Optional. (string) => '' . __('Download file', 'bxcft') . ''
The href uploads baseurl bp get the profile field edit value title bp get the profile field input name download file bxcft a.
1. $bp_get_the_profile_field_type (unknown) => bp_get_the_profile_field_type()
The bp get the profile field type.
2. $bp_get_the_profile_field_id (unknown) => bp_get_the_profile_field_id()
The bp get the profile field id.
3. $bp_get_the_profile_field_edit_value (unknown) => bp_get_the_profile_field_edit_value()
The bp get the profile field edit value.

Usage

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

Defined (2)

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

/classes/Bxcft_Field_Type_File.php  
  1. apply_filters('bxcft_show_download_file_link', '<a href="' . $uploads['baseurl'] . bp_get_the_profile_field_edit_value() . '" title="' . bp_get_the_profile_field_input_name() . '">' . __('Download file', 'bxcft') . '</a>', bp_get_the_profile_field_type(), bp_get_the_profile_field_id(), bp_get_the_profile_field_edit_value()), 
  1. apply_filters('bxcft_show_download_file_link', bp_get_profile_field_data(array('field' => bp_get_the_profile_field_id())), bp_get_the_profile_field_type(), bp_get_the_profile_field_id(), bp_get_the_profile_field_edit_value()),