From f6133cd132ec4ef273a0a5fbbbe52a117a2e75ca Mon Sep 17 00:00:00 2001 From: Nik Tsekouras Date: Mon, 8 Jul 2024 13:16:40 +0300 Subject: [PATCH] Fix: Restrict export pattern action to user patterns (#63228) Co-authored-by: ntsekouras Co-authored-by: ramonjd Co-authored-by: t-hamano --- packages/editor/src/dataviews/actions/export-pattern.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/editor/src/dataviews/actions/export-pattern.tsx b/packages/editor/src/dataviews/actions/export-pattern.tsx index 917b284ade1a2c..57fb969d2ff29c 100644 --- a/packages/editor/src/dataviews/actions/export-pattern.tsx +++ b/packages/editor/src/dataviews/actions/export-pattern.tsx @@ -34,6 +34,7 @@ const exportPattern: Action< Pattern > = { id: 'export-pattern', label: __( 'Export as JSON' ), supportsBulk: true, + isEligible: ( item ) => item.type === 'wp_block', callback: async ( items ) => { if ( items.length === 1 ) { return downloadBlob(