Skip to:
Content

BuddyPress.org

Opened 6 years ago

Closed 4 years ago

#8082 closed defect (bug) (fixed)

xprofile_filter_format_field_value_by_type filter not working

Reported by: venutius's profile Venutius Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Extended Profile Keywords:
Cc:

Description

I've been playing with xProfile fields and I discovered that the above filter which sets the displayed format of the xprofile field is not working. Or rather it comes too soon in the priority for it's changes to have an impact.

If I change line 30 of bp-xprofile-filters from:

add_filter( 'bp_get_the_profile_field_value',           'xprofile_filter_format_field_value_by_type', 8, 3 );

to:

add_filter( 'bp_get_the_profile_field_value',           'xprofile_filter_format_field_value_by_type', 100, 3 );

The filter works. You can test this by setting adding a date profile field and setting it to display the elapsed time. It's should change the output to show the 'ago' time, but this does not happen unless you increase the above priority.

I'm not exactly sure exactly what is the right priority for this function, there's a few funtions triggering off this filter

Change History (1)

#1 @imath
4 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Hi,

Thanks for your report, sorry for the late reply.

I've just tested and without changing the priority, selecting the elapsed time formatting for a date field type is behaving the way it should. So I can't reproduce this issue. As 2 years passed, I'm going to close this issue, but don't hesitate to reopen it if I missed something.

Note: See TracTickets for help on using tickets.