[buddypress-trac] [BuddyPress Trac] #3044: bp-xprofile Add Hook before saving xprofile field data

buddypress-trac noreply at wordpress.org
Thu Feb 10 11:23:55 UTC 2022


#3044: bp-xprofile Add Hook before saving xprofile field data
------------------------------+---------------------
 Reporter:  marinig           |       Owner:  (none)
     Type:  enhancement       |      Status:  closed
 Priority:  lowest            |   Milestone:  1.5
Component:  Extended Profile  |     Version:
 Severity:  trivial           |  Resolution:  fixed
 Keywords:                    |
------------------------------+---------------------
Changes (by 8dayclub):

 * priority:  normal => lowest
 * severity:   => trivial


Comment:

 Replying to [comment:3 marinig]:
 > Replying to [comment:2 DJPaul]:
 > > What about using 'xprofile_data_value_before_save' or
 'xprofile_data_before_save' in BP_XProfile_ProfileData::save()?
 >
 > Yes but I think my suggestion is simpler to use and more versatile... at
 least in my opinion.
 >
 > What if I have to use the field name and field value at the same time
 (in the same filter function)? I can't use any of the hooks you indicated
 as they pass just one of them (field ID or field value) at a time in
 nearly [https://8dayclub.com/ 8day] ... So I can't do different filtering
 on values basing on field name... I may be wrong, so please, correct me if
 there is a solution using those hooks.
 >
 > Considering the hooks you wrote above, I could use the action hook
 "xprofile_data_before_save" but I must declare global $this in the hooked
 function in order to apply changes made, and I don't like this very much.
 >
 > Thanks for your time
 Thank you for your advise. I have a forum website and it's really nice!!

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/3044#comment:8>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list