Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#43367 closed defect (bug) (invalid)

Get post status translation issue on frontend

Reported by: sungraizfaryad Owned by:
Priority: normal Milestone:
Component: Posts, Post Types Version: 4.9.4
Severity: normal Keywords:
Cc: Focuses:

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)

#1 @swissspidy
9 years ago

  • Milestone Awaiting Review
  • Resolution → invalid
  • Status new → closed

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() ];
Note: See TracTickets for help on using tickets.