Ticket #3074: 3074.01.patch
File 3074.01.patch, 1.8 KB (added by , 14 years ago) |
---|
-
bp-xprofile/bp-xprofile-template.php
194 194 // Set a class with the field name (sanitized) 195 195 $css_classes[] = 'field_' . sanitize_title( $profile_template->field->name ); 196 196 197 if ( $profile_template->current_field % 2 == 1 )198 $css_classes[] = 'alt';199 200 197 $css_classes = apply_filters_ref_array( 'bp_field_css_classes', array( &$css_classes ) ); 201 198 202 199 return apply_filters( 'bp_get_field_css_class', ' class="' . implode( ' ', $css_classes ) . '"' ); … … 428 425 } 429 426 430 427 $selected = ''; 431 428 432 429 // First, check to see whether the user-entered value 433 430 // matches 434 431 if ( in_array( $options[$k]->name, (array) $option_values ) ) … … 454 451 if ( !empty( $_POST['field_' . $field->id] ) ) 455 452 $option_value = $_POST['field_' . $field->id]; 456 453 } 457 458 $selected = ''; 454 455 $selected = ''; 459 456 if ( $option_value == $options[$k]->name || !empty( $value ) && $value == $options[$k]->name || ( empty( $option_value ) && $options[$k]->is_default_option ) ) 460 457 $selected = ' checked="checked"'; 461 458 … … 475 472 } 476 473 477 474 $option_values = maybe_unserialize($option_values); 478 475 479 476 for ( $k = 0; $k < count($options); $k++ ) { 480 477 $selected = ''; 481 478 482 479 // First, check to see whether the user's saved values 483 480 // match the option 484 481 for ( $j = 0; $j < count($option_values); $j++ ) { … … 487 484 break; 488 485 } 489 486 } 490 487 491 488 // If the user has not yet supplied a value for this field, 492 489 // check to see whether there is a default value available 493 490 if ( !is_array( $option_values ) && empty( $option_values ) && !$selected && $options[$k]->is_default_option) {