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

buddypress-trac noreply at wordpress.org
Mon Dec 11 15:27:44 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 DJPaul):

 Looks 90% fine, when you commit this, please tweak a few of the spacing:

 * Things like `errors[$name]` should be `errors[ $name ]`
 * Your multi-line comment starting "In case people are adding classes" is
 so short, you should just keep this on one line.
 * `( count( $classes ) > 2 )? ' ' : ''; ` should be `( count( $classes ) >
 2 ) ? ' ' : ''; `.
 * The `if` statement in `nouveau_error_template()` in needs `{ }` those
 around it.
 * The `If we only have one token then lets trim the empty space` bit seems
 like a vanity and doesn't add anything of significance to the output.

 And when adding a dynamic attribute to something that has some values
 hardcoded, like so:
 `class="bp-messages bp-feedback <?php echo esc_attr( $type ); ?>"`

 It's neater to include all the values in the `esc_attr()` call:
 `class="<?php echo esc_attr( 'bp-messages bp-feedback ' . $type ); ?>"`

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


More information about the buddypress-trac mailing list