[wp-trac] [WordPress Trac] #65024: Not possible to modify the "Draft saved" message

WordPress Trac noreply at wordpress.org
Thu Apr 9 05:16:33 UTC 2026


#65024: Not possible to modify the "Draft saved" message
-------------------------------+-----------------------------
 Reporter:  stevejburge        |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  7.1
Component:  Posts, Post Types  |     Version:
 Severity:  normal             |  Resolution:
 Keywords:  has-patch          |     Focuses:  administration
-------------------------------+-----------------------------

Comment (by sheldorofazeroth):

 I've submitted a patch that handles the PHP side of this fix.

 What the patch does:

 Adds a new item_draft_saved label to WP_Post_Type::get_default_labels() in
 class-wp-post-type.php with a default value of 'Draft saved.' for both
 hierarchical and non-hierarchical post types.
 Adds a contextual 'Pattern draft saved.' label for the wp_block post type
 in post.php, consistent with how it already defines its own
 item_published, item_updated, etc.
 Updates the get_post_type_labels() docblock to document the new label.
 Since the REST API post types controller already exposes the full
 $post_type->labels object, the new label flows to the JavaScript side
 automatically with no REST API changes needed.

 What still needs to happen (Gutenberg side):

 The wp-includes/js/dist/editor.js file is a compiled build artifact synced
 from the Gutenberg monorepo and should not be edited directly. The
 corresponding JS change — replacing the hardcoded __( 'Draft saved.' )
 with postType2.labels.item_draft_saved inside
 getNotificationArgumentsForSaveSuccess() in
 packages/editor/src/store/utils/notice-builder.js — needs to be submitted
 as a separate PR to the Gutenberg repository.

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


More information about the wp-trac mailing list