Opened 15 years ago
Closed 15 years ago
#11971 closed defect (bug) (invalid)
WordPress Coding Standards
Reported by: | hakre | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.0 |
Component: | General | Keywords: | has-patch dev-feedback |
Focuses: | Cc: |
Description
In the continuous effort to better apply the wordpress coding standards on the codebase this ticket has been created to collect explicit coding standard related patches.
Based on todays Dev Meeting.
Attachments (1)
Change History (6)
#2
@
15 years ago
Thanks for the feedback. Regarding general discussion, I should have linked the wordpress coding standards blog post. I think it's better to have the cases there for a discussion, but them then into codex when they seem fit and leave this ticket for the patches.
#5
@
15 years ago
- Milestone 3.0 deleted
- Resolution set to invalid
- Status changed from new to closed
There's nothing in the patch here we need to do or isn't already handled (the unnecessary isset() checks are gone).
I'd rather handle cleanups as we go. Please open new tickets if there are any specific patches.
Note: See
TracTickets for help on using
tickets.
I have noticed two things that are especially inconsistent, so I may as well point those out.
The first is spacing around calls to L10n functions. Last I checked, instances of no spacing outnumber instances of spacing about 3:1. The standards document technically calls for spacing here. I personally think that single-argument calls to
__()
and_e()
look fine if not better without spaces, but either way they should be consistent.The second is the use of
!
as a logical operator:I'm not sure which appears more in core, and the coding standards aren't specific, though I would assume the space is preferred.
That all said, I think it would be more effective to concentrate housekeeping efforts on improving and adding inline documentation, which is far more important, and work to improve coding standards whenever possible whenever patching or committing nearby changes.