Skip to:
Content

BuddyPress.org

Ticket #4365: 4365.03.patch

File 4365.03.patch, 1.3 KB (added by imath, 8 years ago)
  • src/bp-xprofile/bp-xprofile-functions.php

    diff --git src/bp-xprofile/bp-xprofile-functions.php src/bp-xprofile/bp-xprofile-functions.php
    index e5e0cb0..7cce675 100644
    function xprofile_get_random_profile_data( $user_id, $exclude_fullname = true ) 
    488488 * @package BuddyPress Core
    489489 * @param string $field_type The type of field: datebox, selectbox, textbox etc
    490490 * @param string $field_value The actual value
    491  * @uses bp_format_time() Formats a time value based on the WordPress date format setting
    492491 * @return string|bool The formatted value, or false if value is empty
    493492 */
    494493function xprofile_format_profile_field( $field_type, $field_value ) {
    function xprofile_format_profile_field( $field_type, $field_value ) { 
    497496
    498497        $field_value = bp_unserialize_profile_field( $field_value );
    499498
    500         if ( 'datebox' == $field_type ) {
    501                 $field_value = bp_format_time( $field_value, true );
    502         } else {
     499        if ( 'datebox' != $field_type ) {
    503500                $content = $field_value;
    504501                $field_value = str_replace( ']]>', ']]>', $content );
    505502        }
    506503
    507         return stripslashes_deep( $field_value );
     504        return xprofile_filter_format_field_value_by_type( stripslashes_deep( $field_value ), $field_type );
    508505}
    509506
    510507function xprofile_update_field_position( $field_id, $position, $field_group_id ) {