[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 15:11:54 UTC 2017

#7642: Nouveau: re-factor bp_nouveau_signup_form() bp field error messages
 Reporter:  hnla       |      Owner:
     Type:  task       |     Status:  new
 Priority:  normal     |  Milestone:  3.0
Component:  Templates  |    Version:
 Severity:  normal     |   Keywords:  has-patch dev-feedback
 Currently the function renders the base xprofile registration form and
 handles display of form field errors on username & email by fetching the
 BP function `bp_signup_email_errors` rendering via a do_action().

 The problem is that this approach spits out plainish text not in keeping
 with the style and markup for the other template notices, further styling
 to try and render a similar view is difficult to achieve.

 The re-factor does two things:

 #1 Removes the do_action and instead fetches the error message from the BP
 global to test for issset() and then pass the string to a further function
 to build a display version.

 #2 Builds a new helper function to accept a string and wrap it in suitable
 markup to mirror the other site messages and feedback, this is re-usable
 for any odd site messages that may fall outside the main template notices

 This is patched rather than original inclination to merge as there are two
 concerns with it's implementation to address before accepting it.

 * Use of `buddypress()->signup->errors[$name]` rather than perhaps setting
 the global function to a var first - is this ok to do

 * Adding another function when technically we/I have accepted/announced
 'Feature Freeze'. I don't consider this a feature or an enhancement though
 more a problem not spotted before needing addressing sooner rather than in
 a later release, but would like agreement on that?

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

More information about the buddypress-trac mailing list