[buddypress-trac] [BuddyPress Trac] #4365: bp_format_time() fails for datebox retrieved by bp_get_member_profile_data()
buddypress-trac
noreply at wordpress.org
Wed Jul 23 11:29:13 UTC 2014
#4365: bp_format_time() fails for datebox retrieved by
bp_get_member_profile_data()
--------------------------+-----------------------------
Reporter: wbajzek | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: XProfile | Version: 1.5.6
Severity: normal | Resolution:
Keywords: has-patch |
--------------------------+-----------------------------
Changes (by imath):
* keywords: => has-patch
Comment:
I think we have 2 ways to fix the problem :
1. As the $field_value param of the function
{{{xprofile_format_profile_field()}}} is a string : we can as wbajzek is
suggesting "strtotime" the value before using {{{bp_format_time()}}} in
case of a datebox field. (see 4365.strtotime.patch)
2. or i've read in the docblock of this function that the "todo" suggests
to move it as a filter. But there are already 2 filters in place that are
doing the job (see 4365.filters.patch) :
- xprofile_filter_format_field_value
- and xprofile_filter_format_field_value_by_type
So i'd suggest to use them for the cases that are concerned :
- when using {{{bp_member_profile_data( 'field=Datebox' );}}} in the
members loop
- and when using {{{xprofile_get_random_profile_data()}}} to get a random
field
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4365#comment:6>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list