Skip to:
Content

BuddyPress.org

Changeset 1823


Ignore:
Timestamp:
09/08/2009 06:57:08 PM (17 years ago)
Author:
apeatling
Message:

Fixes #981 props jjj

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-xprofile/bp-xprofile-templatetags.php

    r1801 r1823  
    398398                    }
    399399                   
    400                     $html .= '<option' . $selected . ' value="' . attribute_escape( $options[$k]->name ) . '">' . attribute_escape( $options[$k]->name ) . '</option>';
     400                     
     401                   
     402                    $html .= apply_filters( 'bp_get_the_profile_field_options_select', '<option' . $selected . ' value="' . attribute_escape( $options[$k]->name ) . '">' . attribute_escape( $options[$k]->name ) . '</option>', $options[$k] );
    401403                }
    402404                break;
    403405               
    404406            case 'radio':
    405                 for ( $k = 0; $k < count($options); $k++ ) {
    406                    
     407                for ( $k = 0; $k < count($options); $k++ ) {               
    407408                    $option_value = BP_XProfile_ProfileData::get_value_byid($options[$k]->parent_id);
    408409
     
    419420                    }
    420421                   
    421                     $html .= '<label><input' . $selected . ' type="radio" name="field_' . $field->id . '" id="option_' . $options[$k]->id . '" value="' . attribute_escape( $options[$k]->name ) . '"> ' . attribute_escape( $options[$k]->name ) . '</label>';
     422                    $html .= apply_filters( 'bp_get_the_profile_field_options_radio', '<label><input' . $selected . ' type="radio" name="field_' . $field->id . '" id="option_' . $options[$k]->id . '" value="' . attribute_escape( $options[$k]->name ) . '"> ' . attribute_escape( $options[$k]->name ) . '</label>', $options[$k] );
    422423                }
    423424                break;
     
    434435                $option_values = maybe_unserialize($option_values);
    435436
    436                 for ( $k = 0; $k < count($options); $k++ ) {   
     437                for ( $k = 0; $k < count($options); $k++ ) {               
    437438                    for ( $j = 0; $j < count($option_values); $j++ ) {
    438439                        if ( $option_values[$j] == $options[$k]->name || @in_array( $options[$k]->name, $value ) || $options[$k]->is_default_option ) {
     
    442443                    }
    443444                   
    444                     $html .= '<label><input' . $selected . ' type="checkbox" name="field_' . $field->id . '[]" id="field_' . $options[$k]->id . '_' . $k . '" value="' . attribute_escape( $options[$k]->name ) . '"> ' . attribute_escape( $options[$k]->name ) . '</label>';
     445                    $html .= apply_filters( 'bp_get_the_profile_field_options_checkbox', '<label><input' . $selected . ' type="checkbox" name="field_' . $field->id . '[]" id="field_' . $options[$k]->id . '_' . $k . '" value="' . attribute_escape( $options[$k]->name ) . '"> ' . attribute_escape( $options[$k]->name ) . '</label>', $options[$k] );
    445446                    $selected = '';
    446447                }
     
    520521                        break;
    521522                }
     523               
     524                apply_filters( 'bp_get_the_profile_field_datebox', $html, $day, $month, $year, $default_select );
    522525
    523526                break;
     
    565568       
    566569        if ( $groups[$i]->fields )
    567             echo '<li' . $selected . '><a href="' . $bp->displayed_user->domain . $bp->profile->slug . '/edit/group/' . $groups[$i]->id . '">' . $groups[$i]->name . '</a></li>';
     570            echo '<li' . $selected . '><a href="' . $bp->displayed_user->domain . $bp->profile->slug . '/edit/group/' . $groups[$i]->id . '">' . attribute_escape( $groups[$i]->name ) . '</a></li>';
    568571    }
    569572   
Note: See TracChangeset for help on using the changeset viewer.