diff --git a/src/bp-xprofile/bp-xprofile-template.php b/src/bp-xprofile/bp-xprofile-template.php
index 36ed834..c68196e 100644
a
|
b
|
function bp_has_profile( $args = '' ) { |
73 | 73 | * Filters whether or not a group has a profile to display. |
74 | 74 | * |
75 | 75 | * @since 1.1.0 |
| 76 | * @since 2.6.0 Added the `$r` parameter. |
76 | 77 | * |
77 | 78 | * @param bool $has_groups Whether or not there are group profiles to display. |
78 | 79 | * @param string $profile_template Current profile template being used. |
| 80 | * @param array $r Array of arguments passed into the BP_XProfile_Data_Template class. |
79 | 81 | */ |
80 | | return apply_filters( 'bp_has_profile', $profile_template->has_groups(), $profile_template ); |
| 82 | return apply_filters( 'bp_has_profile', $profile_template->has_groups(), $profile_template, $r ); |
81 | 83 | } |
82 | 84 | |
83 | 85 | /** |
… |
… |
function bp_the_profile_field_visibility_level_label() { |
882 | 884 | * Filters the profile field visibility level label. |
883 | 885 | * |
884 | 886 | * @since 1.6.0 |
| 887 | * @since 2.6.0 Added the `$level` parameter. |
885 | 888 | * |
886 | 889 | * @param string $retval Field visibility level label. |
| 890 | * @param string $level Field visibility level. |
887 | 891 | */ |
888 | | return apply_filters( 'bp_get_the_profile_field_visibility_level_label', $fields[ $level ]['label'] ); |
| 892 | return apply_filters( 'bp_get_the_profile_field_visibility_level_label', $fields[ $level ]['label'], $level ); |
889 | 893 | } |
890 | 894 | |
891 | 895 | /** |
… |
… |
function bp_the_profile_field_visibility_level_label() { |
897 | 901 | * @return mixed|string |
898 | 902 | */ |
899 | 903 | function bp_unserialize_profile_field( $value ) { |
900 | | if ( is_serialized($value) ) { |
901 | | $field_value = maybe_unserialize($value); |
| 904 | if ( is_serialized( $value ) ) { |
| 905 | $field_value = maybe_unserialize( $value ); |
902 | 906 | $field_value = implode( ', ', $field_value ); |
903 | 907 | return $field_value; |
904 | 908 | } |
… |
… |
function bp_profile_field_data( $args = '' ) { |
941 | 945 | * Filters the profile field data. |
942 | 946 | * |
943 | 947 | * @since 1.2.0 |
| 948 | * @since 2.6.0 Added the `$r` parameter. |
944 | 949 | * |
945 | 950 | * @param mixed $value Profile data for a specific field for the user. |
| 951 | * @param array $r Array of parsed arguments. |
946 | 952 | */ |
947 | | return apply_filters( 'bp_get_profile_field_data', xprofile_get_field_data( $r['field'], $r['user_id'] ) ); |
| 953 | return apply_filters( 'bp_get_profile_field_data', xprofile_get_field_data( $r['field'], $r['user_id'] ), $r ); |
948 | 954 | } |
949 | 955 | |
950 | 956 | /** |
… |
… |
function bp_profile_group_name( $deprecated = true ) { |
1101 | 1107 | * Filters the profile group name. |
1102 | 1108 | * |
1103 | 1109 | * @since 1.0.0 |
| 1110 | * @since 2.6.0 Added the `$group_id` parameter |
1104 | 1111 | * |
1105 | | * @param string $name Name of the profile group. |
| 1112 | * @param string $name Name of the profile group. |
| 1113 | * @param int $group_id ID of the profile group. |
1106 | 1114 | */ |
1107 | | return apply_filters( 'bp_get_profile_group_name', $group->name ); |
| 1115 | return apply_filters( 'bp_get_profile_group_name', $group->name, $group_id ); |
1108 | 1116 | } |
1109 | 1117 | |
1110 | 1118 | /** |