Make WordPress Core

Ticket #44599: 44599.patch

File 44599.patch, 2.3 KB (added by cc0a, 7 years ago)
  • .php

    old new (this hunk was shorter than expected) 
    17261726 *
    17271727 * @param WP_Post $post
    17281728 */
    17291729function _post_states($post) {
     1730        $context = 'Post Status';
    17301731        $post_states = array();
    17311732        if ( isset( $_REQUEST['post_status'] ) )
    17321733                $post_status = $_REQUEST['post_status'];
     
    17341736                $post_status = '';
    17351737
    17361738        if ( !empty($post->post_password) )
    1737                 $post_states['protected'] = __('Password protected');
     1739                $post_states['protected'] = _x('Password protected', $context);
    17381740        if ( 'private' == $post->post_status && 'private' != $post_status )
    1739                 $post_states['private'] = __('Private');
     1741                $post_states['private'] = _x('Private', $context);
    17401742        if ( 'draft' === $post->post_status ) {
    17411743                if ( get_post_meta( $post->ID, '_customize_changeset_uuid', true ) ) {
    1742                         $post_states[] = __( 'Customization Draft' );
     1744                        $post_states[] = _x( 'Customization Draft', $context );
    17431745                } elseif ( 'draft' !== $post_status ) {
    1744                         $post_states['draft'] = __( 'Draft' );
     1746                        $post_states['draft'] = _x( 'Draft', $context );
    17451747                }
    17461748        } elseif ( 'trash' === $post->post_status && get_post_meta( $post->ID, '_customize_changeset_uuid', true ) ) {
    1747                 $post_states[] = __( 'Customization Draft' );
     1749                $post_states[] = _x( 'Customization Draft', $context );
    17481750        }
    17491751        if ( 'pending' == $post->post_status && 'pending' != $post_status )
    1750                 $post_states['pending'] = _x('Pending', 'post status');
     1752                $post_states['pending'] = _x('Pending', $context);
    17511753        if ( is_sticky($post->ID) )
    1752                 $post_states['sticky'] = __('Sticky');
     1754                $post_states['sticky'] = _x('Sticky', $context);
    17531755
    17541756        if ( 'future' === $post->post_status ) {
    1755                 $post_states['scheduled'] = __( 'Scheduled' );
     1757                $post_states['scheduled'] = _x( 'Scheduled', $context );
    17561758        }
    17571759
    17581760        if ( 'page' === get_option( 'show_on_front' ) ) {
    17591761                if ( intval( get_option( 'page_on_front' ) ) === $post->ID ) {
    1760                         $post_states['page_on_front'] = __( 'Front Page' );
     1762                        $post_states['page_on_front'] = _x( 'Front Page', $context );
    17611763                }
    17621764
    17631765                if ( intval( get_option( 'page_for_posts' ) ) === $post->ID ) {
    1764                         $post_states['page_for_posts'] = __( 'Posts Page' );
     1766                        $post_states['page_for_posts'] = _x( 'Posts Page', $context );
    17651767                }
    17661768        }
     1769
    17671770        /**
    17681771         * Filters the default post display states used in the posts list table.
    17691772         *