Skip to:
Content

BuddyPress.org

Opened 16 months ago

Closed 3 months ago

#8276 closed enhancement (wontfix)

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

Reported by: stokim Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Extended Profile 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 16 months ago.

Download all attachments as: .zip

Change History (6)

#1 @stokim
16 months ago

  • Type changed from defect (bug) to enhancement

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

#3 @stokim
16 months ago

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

#4 @imath
4 months 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 months 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.