Opened 5 years ago
#48682 new enhancement
Introduce WP_Labels class
Reported by: | alpipego | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Taxonomy | Keywords: | dev-feedback 2nd-opinion |
Focuses: | Cc: |
Description
Classes like WP_Taxonomy
and WP_Post_Type
return a stdClass
object for the $labels
property. The way this is done right now, it should be an array not an object.
A solution would be to introduce an abstract WP_Labels
class that holds all shared the properties (name
, singular_name
, search_items
, etc.) and concrete classes, e.g. WP_Taxonomy_Labels
for type-specific properties (choose_from_most_used
, separate_items_with_commas
, etc).
see also #48681.
Note: See
TracTickets for help on using
tickets.