Changeset 7762 for trunk/bp-xprofile/bp-xprofile-template.php
- Timestamp:
- 01/28/2014 02:40:13 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-xprofile/bp-xprofile-template.php
r7655 r7762 433 433 * @uses BP_XProfile_ProfileData::get_value_byid() 434 434 * 435 * @param array $args Specify type for datebox. Allowed 'day', 'month', 'year'. 435 * @param array $args { 436 * Array of optional arguments. 437 * @type string|bool $type Type of datebox. False if it's not a 438 * datebox, otherwise 'day, 'month', or 'year'. Default: false. 439 * @type int $user_id ID of the user whose profile values should be 440 * used when rendering options. Default: displayed user. 441 * } 436 442 */ 437 443 function bp_get_the_profile_field_options( $args = '' ) { … … 439 445 440 446 $defaults = array( 441 'type' => false, 447 'type' => false, 448 'user_id' => bp_displayed_user_id(), 442 449 ); 443 450 … … 472 479 473 480 $original_option_values = ''; 474 $original_option_values = maybe_unserialize( BP_XProfile_ProfileData::get_value_byid( $field->id ) );481 $original_option_values = maybe_unserialize( BP_XProfile_ProfileData::get_value_byid( $field->id, $user_id ) ); 475 482 476 483 if ( empty( $original_option_values ) && !empty( $_POST['field_' . $field->id] ) ) { … … 512 519 case 'multiselectbox': 513 520 $original_option_values = ''; 514 $original_option_values = maybe_unserialize( BP_XProfile_ProfileData::get_value_byid( $field->id ) );521 $original_option_values = maybe_unserialize( BP_XProfile_ProfileData::get_value_byid( $field->id, $user_id ) ); 515 522 516 523 if ( empty( $original_option_values ) && !empty( $_POST['field_' . $field->id] ) ) { … … 551 558 case 'radio': 552 559 $html .= '<div id="field_' . $field->id . '">'; 553 $option_value = BP_XProfile_ProfileData::get_value_byid( $field->id );560 $option_value = BP_XProfile_ProfileData::get_value_byid( $field->id, $user_id ); 554 561 555 562 for ( $k = 0, $count = count( $options ); $k < $count; ++$k ) { … … 578 585 579 586 case 'checkbox': 580 $option_values = BP_XProfile_ProfileData::get_value_byid( $field->id );587 $option_values = BP_XProfile_ProfileData::get_value_byid( $field->id, $user_id ); 581 588 $option_values = (array) maybe_unserialize( $option_values ); 582 589 … … 616 623 617 624 case 'datebox': 618 $date = BP_XProfile_ProfileData::get_value_byid( $field->id );625 $date = BP_XProfile_ProfileData::get_value_byid( $field->id, $user_id ); 619 626 620 627 // Set day, month, year defaults
Note: See TracChangeset
for help on using the changeset viewer.