[wp-trac] [WordPress Trac] #14981: Provide a context for post statuses
WordPress Trac
noreply at wordpress.org
Thu Jan 14 14:12:50 UTC 2016
#14981: Provide a context for post statuses
--------------------------------------+-----------------------------
Reporter: xibe | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: I18N | Version: 3.1
Severity: normal | Resolution:
Keywords: good-first-bug has-patch | Focuses:
--------------------------------------+-----------------------------
Comment (by swissspidy):
Thanks for the patch, @rockwell15!
Just note that not only the post statuses should be post type labels, but
also the other mentioned strings like `__( 'Search' )`, `__( 'View All' )`
and `__( 'Most Recent' )`.
Also, we usually use yoda conditions, i.e. `if( 'private' ===
$post->post_status ) {...}` instead of `if( $post->post_status ==
'private' ) {...}`
--
Ticket URL: <https://core.trac.wordpress.org/ticket/14981#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list