#43405 closed defect (bug) (fixed)
CS: Fix violations for wp-signup.php
Reported by: | GaryJ | Owned by: | jrf |
---|---|---|---|
Milestone: | 5.1 | Priority: | normal |
Severity: | normal | Version: | 5.1 |
Component: | Users | Keywords: | has-patch |
Focuses: | multisite, coding-standards | Cc: |
Description
Address code standard violations in wp-signup.php
.
Attachments (5)
Change History (18)
#5
@
7 years ago
- Keywords commit added
Patch 43405.2.diff updates 43405.diff and wp-signup.diff with a couple of whitespace indentation issues and removes the instance of phpcs:ignore
as it is not required.
#8
@
6 years ago
- Keywords commit removed
43405.3.diff is a refresh to apply cleanly to trunk. Can someone just give it a review?
#9
@
6 years ago
@desrosj I've given it a once-over. LGTM, just two remarks:
- The condition on line 925/939 is still hard to read and confusing for people who don't know operator precedence well enough by heart.
Suggested alternative:
<?php if ( 'all' === $active_signup || ( 'blog' === $_POST['signup_for'] && 'blog' === $active_signup ) || ( 'user' === $_POST['signup_for'] && 'user' === $active_signup ) ) { // Code }
- FYI/For future reference: it's likely that we'll be moving away from Yoda conditions in the near future, see https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1624, but as that hasn't been actioned yet, that shouldn't influence this patch.
Note: See
TracTickets for help on using
tickets.
+1
Couple of small remarks/questions (line nrs refer to the "new" lines):
( $site_domain )
does not need the parentheses anymore as it is, though it might need output escaping.