Opened 4 weeks ago
Last modified 3 weeks ago
#63293 reopened defect (bug)
"Add new post" wording change/regression?
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 6.8.2 | Priority: | normal |
Severity: | normal | Version: | 6.8 |
Component: | Posts, Post Types | Keywords: | |
Focuses: | Cc: |
Description (last modified by )
In WordPress 6.8, it appears that the add_new
arg for register_post_type
is no longer being used on the menu item.
Instead, the add_new_item
arg is now being used for both the menu item and page title.
If add_new_item
isn't defined, then both locations will default to saying "Add Post", which sounds weirdly nonspecific for custom post types even though they're technically "posts".
We don't see this listed in the changelog, and the register_post_type
docs still mention add_new
without any kind of mention of deprecation, so we think this might have been an accidental regression?
Is it no longer possible to use a separate wording for the two locations? We'd like to have our menu item say "Add New" and our page title say "Add New Location" rather than have them be the same wording, which was previously possible.
Example code:
$labels = [ 'add_new' => __('Add New'), //This is no longer being used? ] $args = [ 'labels' => $labels, ]
Change History (12)
#2
@
4 weeks ago
- Severity changed from major to normal
Hello, welcome back to WordPress Core Trac,
Yes this is an intended change, see #61219.
This change has been documented in this note: https://make.wordpress.org/core/2025/03/25/accessibility-improvements-in-wordpress-6-8/
And also in the Field Guide: https://make.wordpress.org/core/2025/03/28/wordpress-6-8-field-guide/#but-wait-there-is-more
#3
@
4 weeks ago
- Resolution set to duplicate
- Status changed from new to closed
Thanks for the quick reply. We'll follow up on the #61219 ticket.
#4
@
4 weeks ago
- Description modified (diff)
- Resolution duplicate deleted
- Status changed from closed to reopened
#5
@
4 weeks ago
(Reposting our similar message from the other thread)
Hi all, a few thoughts/questions here:
1. Is it still possible to use separate custom wording on the menu item and page title? For a custom post type like "Location", we'd like to set the menu item to "Add New" to keep it short, but then display the full "Add New Location" on the editing screen.
Our assumption would be that the add_new
arg would set one and the add_new_item
arg would set the other, but it appears that the add_new
arg is now completely ignored and that the add_new_item
arg is instead outputted in both locations, leaving us unable to fully customize the wording.
2. The register_post_type documentation still mentions both 'add_new' and 'add_new_item' and appears to suggest using them in roughly the way that we were hoping to use them. Is that documentation no longer correct?
This ticket was mentioned in Slack in #core by jorbin. View the logs.
4 weeks ago
#7
@
4 weeks ago
- Milestone changed from Awaiting Review to 6.8.1
Moving to the 6.8.1 milestone for near term visibility.
#8
@
4 weeks ago
There are some more instances of 'new'. I'm not sure if they do fall under the scope of this ticket, anyway, here they are (there may be more):
wp-includes/js/dist/editor.js:9801
Visitors cannot add new comments or replies. Existing comments remain visible.
wp-includes/js/dist/editor.js:20552
wp-includes/js/dist/editor.js:32897
Visitors cannot add new comments or replies.
wp-includes/js/dist/editor.js:9797
wp-includes/js/dist/editor.js:20548
wp-includes/js/dist/editor.js:32893
Visitors can add new comments and replies.
wp-includes/js/dist/edit-site.js:40771
Add new view
wp-includes/js/dist/core-commands.js:163
Add new post
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php:2757
Please use %s to add new schema properties.
wp-includes/js/dist/editor.js:24534
wp-includes/js/dist/editor.js:24535
Add new term
wp-includes/js/dist/editor.js:24534
wp-includes/js/dist/editor.js:24535
Add new category
wp-includes/js/dist/editor.js:24040
Add new Term
wp-includes/js/dist/core-commands.js:150
Add new page
wp-includes/js/dist/editor.js:24040
Add new tag
wp-admin/my-sites.php:81
Add New Site
wp-admin/includes/dashboard.php:2087
Add a new page
wp-admin/includes/dashboard.php:454
Create a New User
wp-admin/includes/dashboard.php:451
Create a New Site
wp-admin/media-new.php:43
Upload New Media
#10
@
4 weeks ago
The mentions of add_new
and add_new_item
in are a part of the user contributed examples. I think that the docs team manages those, I would suggest consulting with them.
The documentation of the labels in get_post_type_labels is correct and as soon as the parsing is complete, that will be updated. I've asked someone to look into it.
I can't find any uses of labels->add_new
in core as of now, which makes me feel like it is essentially soft deprecated. I think it should get removed from the documentation (with a comment somewhere so it doesn't get reused for a new purpose) and a new argument should be added for the menu along the lines of add_new_menu_label
that can default to add_new_item
but allow folks to override it.
This ticket was mentioned in Slack in #core by jorbin. View the logs.
3 weeks ago
#12
@
3 weeks ago
- Milestone changed from 6.8.1 to 6.8.2
I've created a ticket for the documentation not being updated - https://meta.trac.wordpress.org/ticket/7964
There is no code that can be considered for 6.8.2, so I'm moving this to 6.8.2 to keep it visible.
(Duplicate comment, ignore)