[wp-trac] [WordPress Trac] #58134: Use correct plural of status
WordPress Trac
noreply at wordpress.org
Sat Apr 15 06:58:24 UTC 2023
#58134: Use correct plural of status
--------------------------+-----------------------------
Reporter: Presskopp | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Text Changes | Version:
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
Core uses a variable named **$stati** (10 times to be found, in 3 files),
but that's not the correct plural form of '**status**', neither in
english, nor in latin or elsewhere. So I plead to change it to
**$statuses**. While there seems to be no decent rule for variable names,
so technically the variable could be named $stsii or whatever, still we
are called to not
{{{
"abbreviate variable names unnecessarily; let the code be unambiguous and
self-documenting."
}}}
see https://developer.wordpress.org/coding-standards/wordpress-coding-
standards/php/
Also, as we all know, "**Code is Poetry**", isn't it? Now you could argue
poetry has some freedoms, but I strongly believe it should use correct
grammar, at least in this case.
So I may have convinced you finally of that one, but there's one more
issue:
There's also a function
{{{
get_post_stati()
}}}
see https://developer.wordpress.org/reference/functions/get_post_stati/
c'mon, let's rename it to **get_post_statuses**, while we're on it.
You may think this is petty, but it gave me some confusion and after all
it's just wrong. Let's get rid of an usage of a plural form which doesn't
exist.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58134>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list