From c965fefd6e3e2cf1772d7253e5ec34050de7af3d Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 15 Jun 2023 01:39:20 +0000 Subject: [PATCH] Posts, Post Types: Introduce `item_trashed` post type label. This allows the block editor to announce the correct message when an entity is moved to the Trash. Original issue from Gutenberg repository: * [https://github.com/WordPress/gutenberg/issues/19144 #19144 Wrong notification message shown when an entity is moved to trash] Props james-roberts, ntsekouras, nrqsnchz, afercia, swissspidy, joedolson, talldanwp, SergeyBiryukov. Fixes #51387. Built from https://develop.svn.wordpress.org/trunk@55923 git-svn-id: http://core.svn.wordpress.org/trunk@55435 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-post-type.php | 1 + wp-includes/post.php | 2 ++ wp-includes/version.php | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-includes/class-wp-post-type.php b/wp-includes/class-wp-post-type.php index 1b65db2a51..b7f8abb083 100644 --- a/wp-includes/class-wp-post-type.php +++ b/wp-includes/class-wp-post-type.php @@ -857,6 +857,7 @@ final class WP_Post_Type { 'item_published' => array( __( 'Post published.' ), __( 'Page published.' ) ), 'item_published_privately' => array( __( 'Post published privately.' ), __( 'Page published privately.' ) ), 'item_reverted_to_draft' => array( __( 'Post reverted to draft.' ), __( 'Page reverted to draft.' ) ), + 'item_trashed' => array( __( 'Post trashed.' ), __( 'Page trashed.' ) ), 'item_scheduled' => array( __( 'Post scheduled.' ), __( 'Page scheduled.' ) ), 'item_updated' => array( __( 'Post updated.' ), __( 'Page updated.' ) ), 'item_link' => array( diff --git a/wp-includes/post.php b/wp-includes/post.php index fabd68edb2..1d543fe986 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -1957,6 +1957,7 @@ function _post_type_meta_capabilities( $capabilities = null ) { * Default is 'Post published privately.' / 'Page published privately.' * - `item_reverted_to_draft` - Label used when an item is switched to a draft. * Default is 'Post reverted to draft.' / 'Page reverted to draft.' + * - `item_trashed` - Label used when an item is moved to Trash. Default is 'Post trashed.' / 'Page trashed.' * - `item_scheduled` - Label used when an item is scheduled for publishing. Default is 'Post scheduled.' / * 'Page scheduled.' * - `item_updated` - Label used when an item is updated. Default is 'Post updated.' / 'Page updated.' @@ -1980,6 +1981,7 @@ function _post_type_meta_capabilities( $capabilities = null ) { * `item_scheduled`, and `item_updated` labels. * @since 5.7.0 Added the `filter_by_date` label. * @since 5.8.0 Added the `item_link` and `item_link_description` labels. + * @since 6.3.0 Added the `item_trashed` label. * * @access private * diff --git a/wp-includes/version.php b/wp-includes/version.php index 473ba22ddc..67a14958dd 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.3-alpha-55922'; +$wp_version = '6.3-alpha-55923'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.