Send an associative array to the display_post_states filter. props greenshady, kawauso, fixes #15421.
git-svn-id: https://develop.svn.wordpress.org/trunk@17544 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3697db55bc
commit
5fc7b13692
@ -1623,16 +1623,16 @@ function _post_states($post) {
|
||||
$post_status = '';
|
||||
|
||||
if ( !empty($post->post_password) )
|
||||
$post_states[] = __('Password protected');
|
||||
$post_states['protected'] = __('Password protected');
|
||||
if ( 'private' == $post->post_status && 'private' != $post_status )
|
||||
$post_states[] = __('Private');
|
||||
$post_states['private'] = __('Private');
|
||||
if ( 'draft' == $post->post_status && 'draft' != $post_status )
|
||||
$post_states[] = __('Draft');
|
||||
$post_states['draft'] = __('Draft');
|
||||
if ( 'pending' == $post->post_status && 'pending' != $post_status )
|
||||
/* translators: post state */
|
||||
$post_states[] = _x('Pending', 'post state');
|
||||
$post_states['pending'] = _x('Pending', 'post state');
|
||||
if ( is_sticky($post->ID) )
|
||||
$post_states[] = __('Sticky');
|
||||
$post_states['sticky'] = __('Sticky');
|
||||
|
||||
$post_states = apply_filters( 'display_post_states', $post_states );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user