[wp-trac] [WordPress Trac] #43367: Get post status translation issue on frontend

WordPress Trac noreply at wordpress.org
Tue Feb 20 12:40:39 UTC 2018


#43367: Get post status translation issue on frontend
-------------------------------+----------------------
 Reporter:  sungraizfaryad     |       Owner:
     Type:  defect (bug)       |      Status:  closed
 Priority:  normal             |   Milestone:
Component:  Posts, Post Types  |     Version:  4.9.4
 Severity:  normal             |  Resolution:  invalid
 Keywords:                     |     Focuses:
-------------------------------+----------------------
Changes (by swissspidy):

 * status:  new => closed
 * resolution:   => invalid
 * milestone:  Awaiting Review =>


Comment:

 This sounds correct to me. If you want to compare post statuses as a
 developer or store them somewhere, you can use `get_post_status()`.

 If you want to display the translated post status to the user, you can use
 something like this:

 {{{#!php
 $statuses = get_post_statuses();

 $statuses[ get_post_status() ];
 }}}

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


More information about the wp-trac mailing list