[wp-trac] [WordPress Trac] #59080: confusing get_post_stati and get_post_statuses functions

WordPress Trac noreply at wordpress.org
Sat Aug 12 10:31:23 UTC 2023


#59080: confusing get_post_stati and get_post_statuses functions
-------------------------------+------------------------------
 Reporter:  thomask            |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Posts, Post Types  |     Version:  trunk
 Severity:  normal             |  Resolution:
 Keywords:                     |     Focuses:
-------------------------------+------------------------------
Changes (by SergeyBiryukov):

 * component:  General => Posts, Post Types


Old description:

> 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 (https://core.trac.wordpress.org/ticket/55895), there are
> functions like get_page_statuses and get_post_statuses without some
> universal function for any post type etc.

New description:

 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.

--

Comment:

 Thanks for the ticket! Related/duplicate: #58134.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/59080#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list