Opened 14 years ago
Closed 14 years ago
#21094 closed defect (bug) (invalid)
Remove unnecessary 'menu_name' fallback in get_post_type_labels()
| Reported by: | evansolomon | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Posts, Post Types | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
get_post_type_labels() sets the fallback for the menu_name label to the name label. Then it calls _get_custom_object_labels(), which does the same thing along with a bunch of similar fallbacks.
This is an artifact of #14832, which lead to r16251, then to r16268, which made the fallback in get_post_type_labels() unnecessary.
We can just remove the statement from get_post_type_labels() and nothing will change (except WordPress will be just a bit simpler).
Attachments (1)
Change History (2)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
The line isn't unnecessary. If
$object->labels['name']isn't set at that point then there will be no fallback. For example:Now there will be a notice during menu generation and the menu item will have no label.
Maybe it's unlikely to occur, but this fallback code does do something.