Make WordPress Core

Changeset 17544


Ignore:
Timestamp:
03/23/2011 06:57:12 PM (14 years ago)
Author:
nacin
Message:

Send an associative array to the display_post_states filter. props greenshady, kawauso, fixes #15421.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/template.php

    r17410 r17544  
    16241624
    16251625    if ( !empty($post->post_password) )
    1626         $post_states[] = __('Password protected');
     1626        $post_states['protected'] = __('Password protected');
    16271627    if ( 'private' == $post->post_status && 'private' != $post_status )
    1628         $post_states[] = __('Private');
     1628        $post_states['private'] = __('Private');
    16291629    if ( 'draft' == $post->post_status && 'draft' != $post_status )
    1630         $post_states[] = __('Draft');
     1630        $post_states['draft'] = __('Draft');
    16311631    if ( 'pending' == $post->post_status && 'pending' != $post_status )
    16321632        /* translators: post state */
    1633         $post_states[] = _x('Pending', 'post state');
     1633        $post_states['pending'] = _x('Pending', 'post state');
    16341634    if ( is_sticky($post->ID) )
    1635         $post_states[] = __('Sticky');
     1635        $post_states['sticky'] = __('Sticky');
    16361636
    16371637    $post_states = apply_filters( 'display_post_states', $post_states );
Note: See TracChangeset for help on using the changeset viewer.