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

WordPress Trac noreply at wordpress.org
Fri Aug 11 20:30:26 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:  General       |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 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.

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


More information about the wp-trac mailing list