[buddypress-trac] [BuddyPress Trac] #7391: Can 'change' visibility on registration form even for fields marked "Enforce field visibility"

buddypress-trac noreply at wordpress.org
Fri Dec 16 13:47:55 UTC 2016


#7391: Can 'change' visibility on registration form even for fields marked
"Enforce field visibility"
------------------------------------+-----------------------
 Reporter:  maccast                 |       Owner:  hnla
     Type:  defect (bug)            |      Status:  reopened
 Priority:  normal                  |   Milestone:  2.7.4
Component:  Extended Profile        |     Version:  2.7.2
 Severity:  normal                  |  Resolution:
 Keywords:  dev-feedback has-patch  |
------------------------------------+-----------------------

Comment (by boonebgorges):

 Replying to [comment:14 DJPaul]:
 > I'm posting for feedback before I (maybe) change that last commit:
 >
 > I consider conditional assignment -- `($field_id && $field =
 xprofile_get_field( $field_id ))` -- to be hard to read, and easy to miss.
 WordPress' PHP standards have a "clever code" section that I argue this
 kinda falls under.
 >
 > PSR-2 (not a standard we follow) does cover it explicitly:
 https://github.com/php-fig-rectified/fig-rectified-
 standards/blob/master/PSR-2-R-coding-style-guide-additions.md#avoid-
 conditional-assigment

 I specifically did this to avoid another level of `if` indentation,
 probably because I read Paul chiding such indentation on a separate ticket
 just the other day. If one of you feels strongly enough about "readabilty"
 (or our strict adherence to PSR-2 (that's a joke)) to make the change, be
 my guest.

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


More information about the buddypress-trac mailing list