[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 10:34:09 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  |
------------------------------------+-----------------------
Changes (by DJPaul):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 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

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


More information about the buddypress-trac mailing list