From de70dabf63d0b884c7aa593273fd713b98e8017c Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Wed, 19 Aug 2020 13:38:56 +0000 Subject: [PATCH] Editor: Update the post type labels for the reusable blocks post type. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously, the labels for the reusable block post type were just “block”. The document settings tab in the block editor has been changed to use the post type label specified instead to be more specific. Changing the reusable block post type labels to “reusable block” prevents two “Block” tabs from showing in the editor. Props desaiuditd, peterwilsoncc. Fixes #50755. git-svn-id: https://develop.svn.wordpress.org/trunk@48829 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/post.php | 42 ++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php index f41a5e96c2..6b3d9ae42d 100644 --- a/src/wp-includes/post.php +++ b/src/wp-includes/post.php @@ -259,27 +259,27 @@ function create_initial_post_types() { 'wp_block', array( 'labels' => array( - 'name' => _x( 'Blocks', 'post type general name' ), - 'singular_name' => _x( 'Block', 'post type singular name' ), - 'menu_name' => _x( 'Blocks', 'admin menu' ), - 'name_admin_bar' => _x( 'Block', 'add new on admin bar' ), - 'add_new' => _x( 'Add New', 'Block' ), - 'add_new_item' => __( 'Add New Block' ), - 'new_item' => __( 'New Block' ), - 'edit_item' => __( 'Edit Block' ), - 'view_item' => __( 'View Block' ), - 'all_items' => __( 'All Blocks' ), - 'search_items' => __( 'Search Blocks' ), - 'not_found' => __( 'No blocks found.' ), - 'not_found_in_trash' => __( 'No blocks found in Trash.' ), - 'filter_items_list' => __( 'Filter blocks list' ), - 'items_list_navigation' => __( 'Blocks list navigation' ), - 'items_list' => __( 'Blocks list' ), - 'item_published' => __( 'Block published.' ), - 'item_published_privately' => __( 'Block published privately.' ), - 'item_reverted_to_draft' => __( 'Block reverted to draft.' ), - 'item_scheduled' => __( 'Block scheduled.' ), - 'item_updated' => __( 'Block updated.' ), + 'name' => _x( 'Reusable Blocks', 'post type general name' ), + 'singular_name' => _x( 'Reusable Block', 'post type singular name' ), + 'menu_name' => _x( 'Reusable Blocks', 'admin menu' ), + 'name_admin_bar' => _x( 'Reusable Block', 'add new on admin bar' ), + 'add_new' => _x( 'Add New', 'Reusable Block' ), + 'add_new_item' => __( 'Add New Reusable Block' ), + 'new_item' => __( 'New Reusable Block' ), + 'edit_item' => __( 'Edit Reusable Block' ), + 'view_item' => __( 'View Reusable Block' ), + 'all_items' => __( 'All Reusable Blocks' ), + 'search_items' => __( 'Search Reusable Blocks' ), + 'not_found' => __( 'No reusable blocks found.' ), + 'not_found_in_trash' => __( 'No reusable blocks found in Trash.' ), + 'filter_items_list' => __( 'Filter reusable blocks list' ), + 'items_list_navigation' => __( 'Reusable Blocks list navigation' ), + 'items_list' => __( 'Reusable Blocks list' ), + 'item_published' => __( 'Reusable Block published.' ), + 'item_published_privately' => __( 'Reusable Block published privately.' ), + 'item_reverted_to_draft' => __( 'Reusable Block reverted to draft.' ), + 'item_scheduled' => __( 'Reusable Block scheduled.' ), + 'item_updated' => __( 'Reusable Block updated.' ), ), 'public' => false, '_builtin' => true, /* internal use only. don't use this when registering your own post type. */