Opened 19 months ago
Closed 14 months ago
#59080 closed defect (bug) (wontfix)
confusing get_post_stati and get_post_statuses functions
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.0 |
Component: | Posts, Post Types | Keywords: | close |
Focuses: | Cc: |
Description (last modified by )
maybe it is because i am not english, but i do not understand why we have 2 functions that seem to return very similar info
https://developer.wordpress.org/reference/functions/get_post_stati/
https://developer.wordpress.org/reference/functions/get_post_statuses/
imo get_post_stati fails the rule about descriptive function name
BTW imo all that statuses part should be rewritten for 6.4 and for the workflows to work
It is not possible now to simply register a new status as it does nothing to the UI (#55895), there are functions like get_page_statuses and get_post_statuses without some universal function for any post type etc.
Change History (4)
This ticket was mentioned in Slack in #core by jorbin. View the logs.
16 months ago
#3
@
16 months ago
- Keywords close added
- Version changed from trunk to 3.0
Related: #9674
It's too late to change the name of a function that was introduced in WP 3.0 (Also, updating the version to that).
While the names are similar, these two functions do different things. I think this should be closed as wontfix
. As future changes happen to post statuses, likely in Gutenberg phase 3, naming should be considered but changing a name now would break many sites.
Thanks for the ticket! Related/duplicate: #58134.