[buddypress-trac] [BuddyPress Trac] #7642: Nouveau: re-factor bp_nouveau_signup_form() bp field error messages handling

buddypress-trac noreply at wordpress.org
Fri Dec 8 16:51:24 UTC 2017


#7642: Nouveau: re-factor bp_nouveau_signup_form() bp field error messages
handling
------------------------------------+------------------
 Reporter:  hnla                    |       Owner:
     Type:  task                    |      Status:  new
 Priority:  normal                  |   Milestone:  3.0
Component:  Templates               |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+------------------

Comment (by hnla):

 >A question about the decision itself. I have used the generic
 bp_{$name}_errors hook in the past to render custom error messages on
 various registration fields. It looks like this will no longer be
 necessary

 To my mind I see that create_function() as being redundant, seems we're
 building a series of functions in advance of needing them. For my purposes
 it seemed commonsensical to back up to `buddypress()->signup->errors`
 where I knew I had the required strings, use directly to pass to one
 function to build out markup around the string.

 What I guess I worry about now though is that you mention using the hook
 to generate custom messages on reg fields, as my approach I think does
 break this ( guess I could dedicate the new function to the reg fields and
 add in a apply_filter for access?) If the error string is not in the BP
 global it can't be used or the bp global string would need changing .

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


More information about the buddypress-trac mailing list