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/post.php

    r50051 r50120  
    16901690 * - `filter_items_list` - Label for the table views hidden heading. Default is 'Filter posts list' /
    16911691 *                       'Filter pages list'.
     1692 * - `filter_by_date` - Label for the date filter in list tables. Default is 'Filter by date'.
    16921693 * - `items_list_navigation` - Label for the table pagination hidden heading. Default is 'Posts list navigation' /
    16931694 *                           'Pages list navigation'.
     
    17161717 * @since 5.0.0 Added the `item_published`, `item_published_privately`, `item_reverted_to_draft`,
    17171718 *              `item_scheduled`, and `item_updated` labels.
     1719 * @since 5.7.0 Added the `filter_by_date` label.
    17181720 *
    17191721 * @access private
     
    17461748        'use_featured_image'       => array( _x( 'Use as featured image', 'post' ), _x( 'Use as featured image', 'page' ) ),
    17471749        'filter_items_list'        => array( __( 'Filter posts list' ), __( 'Filter pages list' ) ),
     1750        'filter_by_date'           => array( __( 'Filter by date' ), __( 'Filter by date' ) ),
    17481751        'items_list_navigation'    => array( __( 'Posts list navigation' ), __( 'Pages list navigation' ) ),
    17491752        'items_list'               => array( __( 'Posts list' ), __( 'Pages list' ) ),
Note: See TracChangeset for help on using the changeset viewer.