WordPress.org

Make WordPress Core

Opened 4 months ago

Last modified 2 weeks ago

#42421 assigned enhancement

Move "Filter by" strings into labels arrays of registrations

Reported by: johnjamesjacoby Owned by: nicolalaserra
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Administration Keywords: good-first-bug has-patch needs-testing dev-feedback
Focuses: administration Cc:

Description

WordPress admin includes a few "Filter by" strings. They are largely used in screen-reader text.

  • "Filter by category" is used 2 times
  • "Filter by type" is used 1 time in media
  • "Filter by comment type" is used 1 time in comments
  • "Filter by date" is used once as a generic List Table string

The first 3 could be included as part of the post type and taxonomy labels. The last 1 is in the months_dropdown() method in the base list table class, and I guess could go either way.

The benefit of adding these to the labels arrays is these strings can be re-used in other places, not repeated, and custom post types and taxonomies won't need to hard-code their strings in with their mark-up, and can instead register them with the other labels.

Attachments (1)

42421.patch (3.9 KB) - added by nicolalaserra 3 months ago.
In this patch I add two new labels ( filter_by_category and filter_by_date ) inside get_post_type_labels in orther to avoid using it directly in views and thus having them duplicated.

Download all attachments as: .zip

Change History (5)

#1 @johnbillion
4 months ago

  • Keywords good-first-bug added

#2 @SergeyBiryukov
4 months ago

  • Component changed from General to Administration

@nicolalaserra
3 months ago

In this patch I add two new labels ( filter_by_category and filter_by_date ) inside get_post_type_labels in orther to avoid using it directly in views and thus having them duplicated.

#3 @Junaidkbr
7 weeks ago

  • Keywords has-patch needs-testing added; needs-patch removed

#4 @DrewAPicture
2 weeks ago

  • Keywords dev-feedback added
  • Owner set to nicolalaserra
  • Status changed from new to assigned

Assigning to mark the good-first-bug as "claimed". @johnjamesjacoby Care to follow up here with some feedback? :-)

Note: See TracTickets for help on using tickets.