Make WordPress Core

Ticket #42421: 42421.1.diff

File 42421.1.diff, 4.4 KB (added by audrasjb, 4 years ago)

Patch refresh and small PHP fix

  • src/wp-admin/includes/class-wp-links-list-table.php

    diff --git a/src/wp-admin/includes/class-wp-links-list-table.php b/src/wp-admin/includes/class-wp-links-list-table.php
    index ae7b56a302..209c956fa9 100644
    a b class WP_Links_List_Table extends WP_List_Table { 
    114114                                'orderby'         => 'name',
    115115                        );
    116116
    117                         echo '<label class="screen-reader-text" for="cat_id">' . __( 'Filter by category' ) . '</label>';
     117                        echo '<label class="screen-reader-text" for="cat_id">' . get_taxonomy( 'link_category' )->labels->filter_by_category . '</label>';
    118118
    119119                        wp_dropdown_categories( $dropdown_options );
    120120
  • src/wp-admin/includes/class-wp-list-table.php

    diff --git a/src/wp-admin/includes/class-wp-list-table.php b/src/wp-admin/includes/class-wp-list-table.php
    index 5797bbcc1a..e2b306e38f 100644
    a b class WP_List_Table { 
    633633
    634634                $m = isset( $_GET['m'] ) ? (int) $_GET['m'] : 0;
    635635                ?>
    636                 <label for="filter-by-date" class="screen-reader-text"><?php _e( 'Filter by date' ); ?></label>
     636                <label for="filter-by-date" class="screen-reader-text"><?php echo get_post_type_object( $post_type )->labels->filter_by_date; ?></label>
    637637                <select name="m" id="filter-by-date">
    638638                        <option<?php selected( $m, 0 ); ?> value="0"><?php _e( 'All dates' ); ?></option>
    639639                <?php
  • src/wp-admin/includes/class-wp-posts-list-table.php

    diff --git a/src/wp-admin/includes/class-wp-posts-list-table.php b/src/wp-admin/includes/class-wp-posts-list-table.php
    index a82bad702d..ec3972283a 100644
    a b class WP_Posts_List_Table extends WP_List_Table { 
    456456                                'selected'        => $cat,
    457457                        );
    458458
    459                         echo '<label class="screen-reader-text" for="cat">' . __( 'Filter by category' ) . '</label>';
     459                        echo '<label class="screen-reader-text" for="cat">' . get_post_type_object( $post_type )->labels->filter_by_category . '</label>';
    460460                        wp_dropdown_categories( $dropdown_options );
    461461                }
    462462        }
  • src/wp-includes/post.php

    diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php
    index a0562578c6..2316294caf 100644
    a b function get_post_type_labels( $post_type_object ) { 
    17301730                'filter_items_list'        => array( __( 'Filter posts list' ), __( 'Filter pages list' ) ),
    17311731                'items_list_navigation'    => array( __( 'Posts list navigation' ), __( 'Pages list navigation' ) ),
    17321732                'items_list'               => array( __( 'Posts list' ), __( 'Pages list' ) ),
     1733                'filter_by_category'       => array( _x( 'Filter by category', 'post' ), _x( 'Filter by category', 'page' ) ),
     1734                'filter_by_date'           => array( _x( 'Filter by date', 'post' ), _x( 'Filter by date', 'page' ) ),
    17331735                'item_published'           => array( __( 'Post published.' ), __( 'Page published.' ) ),
    17341736                'item_published_privately' => array( __( 'Post published privately.' ), __( 'Page published privately.' ) ),
    17351737                'item_reverted_to_draft'   => array( __( 'Post reverted to draft.' ), __( 'Page reverted to draft.' ) ),
  • src/wp-includes/taxonomy.php

    diff --git a/src/wp-includes/taxonomy.php b/src/wp-includes/taxonomy.php
    index 5055b612c6..2597c84194 100644
    a b function create_initial_taxonomies() { 
    140140                                'add_or_remove_items'        => null,
    141141                                'choose_from_most_used'      => null,
    142142                                'back_to_items'              => __( '&larr; Go to Link Categories' ),
     143                                'filter_by_category'         => __( 'Filter by category' ),
    143144                        ),
    144145                        'capabilities' => array(
    145146                                'manage_terms' => 'manage_links',
  • tests/phpunit/tests/xmlrpc/wp/getPostType.php

    diff --git a/tests/phpunit/tests/xmlrpc/wp/getPostType.php b/tests/phpunit/tests/xmlrpc/wp/getPostType.php
    index cfff2320fc..0cded77eef 100644
    a b class Tests_XMLRPC_wp_getPostType extends WP_XMLRPC_UnitTestCase { 
    9595                $this->assertInternalType( 'string', $result['labels']['all_items'] );
    9696                $this->assertInternalType( 'string', $result['labels']['menu_name'] );
    9797                $this->assertInternalType( 'string', $result['labels']['name_admin_bar'] );
     98                $this->assertInternalType( 'string', $result['labels']['filter_by_category'] );
     99                $this->assertInternalType( 'string', $result['labels']['filter_by_date'] );
    98100
    99101                // Check cap data types.
    100102                $this->assertInternalType( 'string', $result['cap']['edit_post'] );