[wp-trac] [WordPress Trac] #60045: Change to add_new label displays wrong label for old post types

WordPress Trac noreply at wordpress.org
Thu Feb 15 04:59:29 UTC 2024


#60045: Change to add_new label displays wrong label for old post types
----------------------------+------------------------------
 Reporter:  smerriman       |       Owner:  (none)
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Administration  |     Version:  6.4
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:  accessibility
----------------------------+------------------------------

Comment (by kzhzmesd73):

 The issue you've raised, regarding the change in the label for adding a
 new item in the WordPress menu from "Add New" to "Add New Post" in ticket
 #47125, brings attention to the impact on existing custom post types and
 developer workflows. This modification has led to unexpected consequences
 for those who have consistently used the `add_new_item` label for custom
 post types.

 From your perspective, the adjustment seems counterintuitive, as the
 appropriate label for defining what displays in the menu was already
 established with `add_new_item`. Instead of changing the default value of
 `add_new`, your suggestion is to use `display_add_new_item` to control the
 menu item name without altering the entire meaning of `add_new`.

 Your longstanding practice of registering custom post types by setting
 `add_new_item` to 'Add New MyPostType' aligns with the intended use of
 this label. However, the recent change has resulted in all post types,
 including those created over many years for various clients, displaying
 'Add New Post,' which is inconsistent with the established conventions.

 To address this, you propose reverting the change and replacing it with
 the display of `add_new_item` when developers intend to showcase the item
 name in the menu. This adjustment not only aligns with historical
 practices but also maintains consistency and allows developers to retain
 control over the wording of 'Add New' without unintended alterations.

 Reverting to the previous behavior and emphasizing the use of
 `add_new_item` for menu display ensures that developers can maintain their
 established conventions and avoids disruption to existing custom post
 types. This approach respects the expectations and practices of developers
 who have relied on consistent labeling for their WordPress projects over
 the years.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/60045#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list