Skip to:
Content

BuddyPress.org

Opened 6 years ago

Closed 5 years ago

#8276 closed enhancement (wontfix)

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

Reported by: stokim Owned by:
Priority: normal Milestone:
Component: Extended Profile Version:
Severity: normal Keywords:
Cc:

Description

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,
Jen

Attachments (1)

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

Download all attachments as: .zip

Change History (6)

#1 @stokim
6 years ago

  • Type defect (bug)enhancement

#2 @stokim
6 years ago

Or it would be good if there's a function, validate_xproifle_field like this: https://buddypress.trac.wordpress.org/attachment/ticket/8066/8066.2.patch

@stokim
6 years ago

#3 @stokim
6 years ago

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

#4 @imath
5 years ago

  • Component CoreExtended Profile
  • Milestone Awaiting Review8.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
5 years ago

  • Milestone 8.0.0
  • Resolutionwontfix
  • Status newclosed

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.