Changeset 9303
- Timestamp:
- 01/06/2015 06:06:08 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-xprofile/bp-xprofile-functions.php
r8987 r9303 33 33 $groups = BP_XProfile_Group::get( $args ); 34 34 35 /** 36 * Filters a set of field groups, populated with fields and field data. 37 * 38 * @since BuddyPress (2.1.0) 39 * 40 * @param array $groups Array of field groups and field data. 41 * @param array $args Array of arguments used to query for groups. 42 */ 35 43 return apply_filters( 'bp_xprofile_get_groups', $groups, $args ); 36 44 } … … 147 155 ); 148 156 149 // If you've added a custom field type in a plugin, register it with this filter. 157 /** 158 * Filters the list of all xprofile field types. 159 * 160 * If you've added a custom field type in a plugin, register it with this filter. 161 * 162 * @since BuddyPress (2.0.0) 163 * 164 * @param array $fields Array of field type/class name pairings. 165 */ 150 166 return apply_filters( 'bp_xprofile_get_field_types', $fields ); 151 167 } … … 331 347 $data = array(); 332 348 foreach( (array) $values as $value ) { 349 350 /** 351 * Filters the field data value for a specific field for the user. 352 * 353 * @since BuddyPress (1.0.0) 354 * 355 * @param string $value Value saved for the field. 356 * @param int $field_id ID of the field being displayed. 357 * @param int $user_id ID of the user being displayed. 358 */ 333 359 $data[] = apply_filters( 'xprofile_get_field_data', $value, $field_id, $user_id ); 334 360 } … … 338 364 } 339 365 } else { 366 /** This filter is documented in bp-xprofile/bp-xprofile-functions.php */ 340 367 $data = apply_filters( 'xprofile_get_field_data', $values, $field_id, $user_id ); 341 368 } … … 564 591 } 565 592 593 /** 594 * Filters a random piece of profile data for the user. 595 * 596 * @since BuddyPress (1.0.0) 597 * 598 * @param array $field_data Array holding random profile data. 599 */ 566 600 return apply_filters( 'xprofile_get_random_profile_data', $field_data ); 567 601 } … … 659 693 $newsubdir = '/' . $directory. '/' . $user_id; 660 694 695 /** 696 * Filters the avatar upload directory for a user. 697 * 698 * @since BuddyPress (1.1.0) 699 * 700 * @param array $value Array containing the path, URL, and other helpful settings. 701 */ 661 702 return apply_filters( 'xprofile_avatar_upload_dir', array( 662 703 'path' => $path, … … 959 1000 * 960 1001 * @package BuddyPress 961 * @since BuddyPress (1.5 )1002 * @since BuddyPress (1.5.0) 962 1003 * 963 1004 * @return string The field name 964 1005 */ 965 1006 function bp_xprofile_fullname_field_name() { 1007 1008 /** 1009 * Filters the field name for the Full Name xprofile field. 1010 * 1011 * @since BuddyPress (1.5.0) 1012 * 1013 * @param string BP_XPROFILE_FULLNAME_FIELD_NAME Full name field constant. 1014 */ 966 1015 return apply_filters( 'bp_xprofile_fullname_field_name', BP_XPROFILE_FULLNAME_FIELD_NAME ); 967 1016 } … … 975 1024 global $bp; 976 1025 1026 /** 1027 * Filters the visibility levels out of the $bp global. 1028 * 1029 * @since BuddyPress (1.6.0) 1030 * 1031 * @param array $visibility_levels Array of visibility levels. 1032 */ 977 1033 return apply_filters( 'bp_xprofile_get_visibility_levels', $bp->profile->visibility_levels ); 978 1034 } … … 986 1042 * be excluded from the profile loop. 987 1043 * 988 * @since BuddyPress (1.6 )1044 * @since BuddyPress (1.6.0) 989 1045 * @see BP_XProfile_Group::get() 990 1046 * @uses apply_filters() Filter bp_xprofile_get_hidden_fields_for_user to modify visibility levels, … … 1012 1068 $hidden_fields = bp_xprofile_get_fields_by_visibility_levels( $displayed_user_id, $hidden_levels ); 1013 1069 1070 /** 1071 * Filters the ids of fields that are hidden for this displayed/loggedin user pair. 1072 * 1073 * @since BuddyPress (1.6.0) 1074 * 1075 * @param array $hidden_fields Array of hidden fields for the displayed/logged in user. 1076 * @param int $displayed_user_id ID of the displayed user. 1077 * @param int $current_user_id ID of the current user. 1078 */ 1014 1079 return apply_filters( 'bp_xprofile_get_hidden_fields_for_user', $hidden_fields, $displayed_user_id, $current_user_id ); 1015 1080 } … … 1055 1120 } 1056 1121 1122 /** 1123 * Filters the visibility levels that should be hidden for this user pair. 1124 * 1125 * @since BuddyPress (2.0.0) 1126 * 1127 * @param array $hidden_fields Array of hidden fields for the displayed/logged in user. 1128 * @param int $displayed_user_id ID of the displayed user. 1129 * @param int $current_user_id ID of the current user. 1130 */ 1057 1131 return apply_filters( 'bp_xprofile_get_hidden_field_types_for_user', $hidden_levels, $displayed_user_id, $current_user_id ); 1058 1132 } … … 1061 1135 * Fetch an array of the xprofile fields that a given user has marked with certain visibility levels 1062 1136 * 1063 * @since BuddyPress (1.6 )1137 * @since BuddyPress (1.6.0) 1064 1138 * @see bp_xprofile_get_hidden_fields_for_user() 1065 1139 *
Note: See TracChangeset
for help on using the changeset viewer.