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.

git-svn-id: https://develop.svn.wordpress.org/trunk@50120 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2021-02-01 14:11:57 +00:00
parent 33e4802bb3
commit e1001678a6
5 changed files with 11 additions and 3 deletions
@@ -456,7 +456,8 @@ class WP_Posts_List_Table extends WP_List_Table {
'selected' => $cat,
);
echo '<label class="screen-reader-text" for="cat">' . __( 'Filter by category' ) . '</label>';
echo '<label class="screen-reader-text" for="cat">' . get_taxonomy( 'category' )->labels->filter_by_item . '</label>';
wp_dropdown_categories( $dropdown_options );
}
}