Opened 7 years ago
Closed 7 years ago
#43367 closed defect (bug) (invalid)
Get post status translation issue on frontend
Reported by: | sungraizfaryad | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.9.4 |
Component: | Posts, Post Types | Keywords: | |
Focuses: | Cc: |
Description
HI, Whenever i call get_post_status() on front-end then it is not translating because string are not returning with translation support as you can see here http://jmp.sh/GsrMqZs
BTW when i use get_post_statuses() then all status are translating properly on front-end.
Please look into it.
Thanks
Change History (1)
Note: See
TracTickets for help on using
tickets.
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:
$statuses = get_post_statuses(); $statuses[ get_post_status() ];