[wp-trac] [WordPress Trac] #24722: get_post_statuses() and get_page_statuses() are hardcoded

WordPress Trac noreply at wordpress.org
Mon Jul 29 00:03:14 UTC 2013


#24722: get_post_statuses() and get_page_statuses()  are hardcoded
----------------------------+-----------------------------
 Reporter:  rmccue          |       Owner:
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  Future Release
Component:  Post Types      |     Version:
 Severity:  minor           |  Resolution:
 Keywords:  editorial-flow  |
----------------------------+-----------------------------

Comment (by nerrad):

 Replying to [comment:1 sillybean]:
 > Would it make sense to turn these into wrappers for get_post_stati()?

 No, because get_post_stati() return a filtered list of objects.  right now
 get_post_statuses() returns an array indexed in status->name/status->label
 pairs and any client code using the function would expect the same.  I
 still use the `$wp_post_statuses` global however, and created a helper
 function to spit out an array setup in the format using
 `get_post_statuses()` currently expects.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/24722#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list