From 7b2364341879c691acfca17d0b9b7e1239700748 Mon Sep 17 00:00:00 2001 From: Manzoor Wani Date: Fri, 3 Jan 2025 19:59:18 +0530 Subject: [PATCH] Disable plural for global styles --- packages/core-data/src/dynamic-entities.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/core-data/src/dynamic-entities.ts b/packages/core-data/src/dynamic-entities.ts index 7ee9e3e9b1f38f..821d798cce9f54 100644 --- a/packages/core-data/src/dynamic-entities.ts +++ b/packages/core-data/src/dynamic-entities.ts @@ -34,7 +34,7 @@ export type WPEntityTypes< C extends ET.Context = 'edit' > = { * - "status" to "statuses" */ type PluralizeEntity< T extends string > = T extends 'GlobalStyles' - ? 'GlobalStylesVariations' + ? never : T extends 'Media' ? 'MediaItems' : T extends 'Status' @@ -52,9 +52,7 @@ type PluralizeEntity< T extends string > = T extends 'GlobalStyles' * - "mediaItems" to "media" * - "statuses" to "status" */ -type SingularizeEntity< T extends string > = T extends 'GlobalStylesVariations' - ? 'GlobalStyles' - : T extends 'MediaItems' +type SingularizeEntity< T extends string > = T extends 'MediaItems' ? 'Media' : T extends 'Statuses' ? 'Status'