Make WordPress Core


Ignore:
Timestamp:
02/01/2021 02:11:57 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Posts, Post Types: Introduce "Filter by date" and "Filter by category" as post type and taxonomy labels, respectively.

This provides a more consistent location for these strings and allows for reusing them in other places without hardcoding them in the markup.

Props nicolalaserra, audrasjb, johnjamesjacoby, SergeyBiryukov.
Fixes #42421.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-posts-list-table.php

    r49950 r50120  
    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_taxonomy( 'category' )->labels->filter_by_item . '</label>';
     460
    460461            wp_dropdown_categories( $dropdown_options );
    461462        }
Note: See TracChangeset for help on using the changeset viewer.