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-includes/taxonomy.php

    r50116 r50120  
    538538 * @since 4.4.0 Added the `items_list_navigation` and `items_list` labels.
    539539 * @since 4.9.0 Added the `most_used` and `back_to_items` labels.
     540 * @since 5.7.0 Added the `filter_by_item` label.
    540541 *
    541542 * @param WP_Taxonomy $tax Taxonomy object.
     
    570571 *     @type string $no_terms                   Default 'No tags'/'No categories', used in the posts and media
    571572 *                                              list tables.
     573 *     @type string $filter_by_item             This label is only used for hierarchical taxonomies. Default
     574 *                                              'Filter by category', used in the posts list table.
    572575 *     @type string $items_list_navigation      Label for the table pagination hidden heading.
    573576 *     @type string $items_list                 Label for the table hidden heading.
     
    605608        'not_found'                  => array( __( 'No tags found.' ), __( 'No categories found.' ) ),
    606609        'no_terms'                   => array( __( 'No tags' ), __( 'No categories' ) ),
     610        'filter_by_item'             => array( null, __( 'Filter by category' ) ),
    607611        'items_list_navigation'      => array( __( 'Tags list navigation' ), __( 'Categories list navigation' ) ),
    608612        'items_list'                 => array( __( 'Tags list' ), __( 'Categories list' ) ),
Note: See TracChangeset for help on using the changeset viewer.