WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 4 years ago

#34545 closed enhancement (fixed)

'parent_item' taxonomy label should be used in tag edit form

Reported by: abrain Owned by: boonebgorges
Milestone: 4.8 Priority: normal
Severity: normal Version:
Component: Taxonomy Keywords: has-patch
Focuses: ui Cc:

Description

When adding or editing hierarchical taxonomies, the label for the parent dropdown is always 'Parent'. This might be confusing for the user when dealing with custom taxonomies where the term 'Parent' is not the best fit. Instead, the taxonomy's 'parent_item' label should be used, as it is done in post_categories_meta_box().

Attachments (1)

34545.diff (1.1 KB) - added by dlh 4 years ago.

Download all attachments as: .zip

Change History (4)

@dlh
4 years ago

#1 follow-up: @dlh
4 years ago

  • Keywords has-patch added
  • Version 4.3.1 deleted

34545.diff would implement this suggestion on edit-tags.php and edit-tag-form.php.

I would also note that when a taxonomy doesn't define the parent_item label, the default is used, which is currently Parent Category, and which might not be a good fit either.

So, an alternative approach could be to use a generic string (like Parent or Parent Term) everywhere.

#2 in reply to: ↑ 1 @johnbillion
4 years ago

  • Milestone changed from Awaiting Review to 4.8

Replying to dlh:

I would also note that when a taxonomy doesn't define the parent_item label, the default is used, which is currently Parent Category, and which might not be a good fit either.

All the labels fall back to their Category/Tag version, so this is fine as-is.

#3 @boonebgorges
4 years ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to closed

In 40146:

Taxonomy: Improve 'Parent' label when editing taxonomy terms.

Instead of the hardcoded 'Parent', use the parent_item label.

Props abrain, dlh.
Fixes #34545.

Note: See TracTickets for help on using tickets.