Skip to:
Content

BuddyPress.org

Opened 4 months ago

Last modified 4 months ago

#8276 new enhancement

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

Reported by: stokim Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Core 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 4 months ago.

Download all attachments as: .zip

Change History (4)

#1 @stokim
4 months ago

  • Type changed from defect (bug) to enhancement

#2 @stokim
4 months 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
4 months ago

#3 @stokim
4 months ago

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

Note: See TracTickets for help on using tickets.