- Timestamp:
- 12/21/2016 02:42:05 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-xprofile/classes/class-bp-xprofile-field.php
r11169 r11316 228 228 * 229 229 * @since 2.4.0 230 * @since 2.8.0 Added `$user_id` and `$get_data` parameters. 230 231 * 231 232 * @static 232 233 * 233 * @param int $field_id ID of the field. 234 * @param int $field_id ID of the field. 235 * @param int $user_id Optional. ID of the user associated with the field. 236 * Ignored if `$get_data` is false. If `$get_data` is 237 * true, but no `$user_id` is provided, defaults to 238 * logged-in user ID. 239 * @param bool $get_data Whether to fetch data for the specified `$user_id`. 234 240 * @return BP_XProfile_Field|false Field object if found, otherwise false. 235 241 */ 236 public static function get_instance( $field_id ) {242 public static function get_instance( $field_id, $user_id = null, $get_data = true ) { 237 243 global $wpdb; 238 244 … … 242 248 } 243 249 244 return new self( $field_id );250 return new self( $field_id, $user_id, $get_data ); 245 251 } 246 252
Note: See TracChangeset
for help on using the changeset viewer.