[wp-trac] [WordPress Trac] #60045: Change to add_new label displays wrong label for old post types
WordPress Trac
noreply at wordpress.org
Wed Oct 9 20:03:35 UTC 2024
#60045: Change to add_new label displays wrong label for old post types
---------------------------------------------+----------------------------
Reporter: smerriman | Owner: rcreators
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.7
Component: Administration | Version: 6.4
Severity: normal | Resolution: fixed
Keywords: good-first-bug has-patch commit | Focuses: accessibility
---------------------------------------------+----------------------------
Comment (by room34):
The
[documentation](https://developer.wordpress.org/reference/functions/get_post_type_labels/)
for `add_new` vs. `add_new_item` is unclear. How exactly does "Label for
adding a new item" (the description of `add_new`) differ from "Label for
adding a new singular item" (the description of `add_new_item`)?
In practice, `add_new` is the text that populates the admin menu, and
`add_new_item` is the text that becomes the page title when you click
through to that page.
I have leveraged this difference in my plugins, using `add_new` as a brief
label for the admin menu link, and `add_new_item` as the full text
intended to appear as the page title (in the `<h1>` tag).
With this change, it's now impossible to have different text in the menu
than in the page title.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60045#comment:26>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list