Skip to:

Opened 4 years ago

Closed 3 years ago

#8276 closed enhancement (wontfix)

Add action filter to bp-xprofile > screens > edit.php

Reported by: stokim's profile stokim Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Extended Profile Keywords:


Hi there!
Thank you for your efforts always.
In case of xprofile field, there's no filter hook when changed.
bp-xprofile > screens > edit.php 52 line,
Could you add action filter,
do_action( 'pre_xprofile_profile_field_data_update', $posted_field_ids );
So that I can handle with $_POST. $field_id? and $_POSTfield_ids??
Actually, I thought it would be better to add an action hook in bp-xprofile > bp-xprofile-functions.php > xprofile_set_field_data > 432 line do_action( 'pre_bp_xprofile_set_field_data_validate', $value, $field, $field_type_obj ); for registration process and edit process both, however, there's no handling errors on this function, so I gave up.
Thank you for your consideration.

Best regards,

Attachments (1)

edit.patch (1.1 KB) - added by stokim 4 years ago.

Download all attachments as: .zip

Change History (6)

#1 @stokim
4 years ago

  • Type changed from defect (bug) to enhancement

#2 @stokim
4 years ago

Or it would be good if there's a function, validate_xproifle_field like this:

4 years ago

#3 @stokim
4 years ago

The attached is the filter hook for handling errors of Xprofile value validation. It works well :)

#4 @imath
3 years ago

  • Component changed from Core to Extended Profile
  • Milestone changed from Awaiting Review to 8.0.0

Hi @stokim

Sorry for my late reply. Thanks a lot for your report and patch. I'm going to have a look at it asap.

#5 @imath
3 years ago

  • Milestone 8.0.0 deleted
  • Resolution set to wontfix
  • Status changed from new to closed

We've introduced the bp_xprofile_set_field_data_pre_save filter in r12869. I think you should be able to use it to reach your goal. If not, don't hesitate to reopen this ticket.

Note: See TracTickets for help on using tickets.