Ticket #44599: context.patch
File context.patch, 2.3 KB (added by , 7 years ago) |
---|
-
.php
old new (this hunk was shorter than expected) 1726 1726 * 1727 1727 * @param WP_Post $post 1728 1728 */ 1729 1729 1730 function _post_states($post) { 1731 $context = 'post_status'; 1730 1732 $post_states = array(); 1731 1733 if ( isset( $_REQUEST['post_status'] ) ) 1732 1734 $post_status = $_REQUEST['post_status']; … … 1734 1737 $post_status = ''; 1735 1738 1736 1739 if ( !empty($post->post_password) ) 1737 $post_states['protected'] = _ _('Password protected');1740 $post_states['protected'] = _x('Password protected', $context); 1738 1741 if ( 'private' == $post->post_status && 'private' != $post_status ) 1739 $post_states['private'] = _ _('Private');1742 $post_states['private'] = _x('Private', $context); 1740 1743 if ( 'draft' === $post->post_status ) { 1741 1744 if ( get_post_meta( $post->ID, '_customize_changeset_uuid', true ) ) { 1742 $post_states[] = _ _( 'Customization Draft');1745 $post_states[] = _x( 'Customization Draft', $context ); 1743 1746 } elseif ( 'draft' !== $post_status ) { 1744 $post_states['draft'] = _ _( 'Draft');1747 $post_states['draft'] = _x( 'Draft', $context ); 1745 1748 } 1746 1749 } elseif ( 'trash' === $post->post_status && get_post_meta( $post->ID, '_customize_changeset_uuid', true ) ) { 1747 $post_states[] = _ _( 'Customization Draft');1750 $post_states[] = _x( 'Customization Draft', $context ); 1748 1751 } 1749 1752 if ( 'pending' == $post->post_status && 'pending' != $post_status ) 1750 $post_states['pending'] = _x('Pending', 'post status');1753 $post_states['pending'] = _x('Pending', $context); 1751 1754 if ( is_sticky($post->ID) ) 1752 $post_states['sticky'] = _ _('Sticky');1755 $post_states['sticky'] = _x('Sticky', $context); 1753 1756 1754 1757 if ( 'future' === $post->post_status ) { 1755 $post_states['scheduled'] = _ _( 'Scheduled');1758 $post_states['scheduled'] = _x( 'Scheduled', $context ); 1756 1759 } 1757 1760 1758 1761 if ( 'page' === get_option( 'show_on_front' ) ) { 1759 1762 if ( intval( get_option( 'page_on_front' ) ) === $post->ID ) { 1760 $post_states['page_on_front'] = _ _( 'Front Page');1763 $post_states['page_on_front'] = _x( 'Front Page', $context ); 1761 1764 } 1762 1765 1763 1766 if ( intval( get_option( 'page_for_posts' ) ) === $post->ID ) { 1764 $post_states['page_for_posts'] = _ _( 'Posts Page');1767 $post_states['page_for_posts'] = _x( 'Posts Page', $context ); 1765 1768 } 1766 1769 } 1770 1767 1771 /** 1768 1772 * Filters the default post display states used in the posts list table. 1769 1773 *