From 7d8f4d13fe086263e27430bf0f8290e316b29c67 Mon Sep 17 00:00:00 2001 From: ntsekouras Date: Mon, 19 Dec 2022 10:53:36 +0200 Subject: [PATCH] add description field in media categories --- .../src/components/inserter/media-tab/media-panel.js | 1 + .../src/components/block-editor/inserter-media-categories.js | 1 + packages/editor/src/components/media-categories/index.js | 1 + 3 files changed, 3 insertions(+) diff --git a/packages/block-editor/src/components/inserter/media-tab/media-panel.js b/packages/block-editor/src/components/inserter/media-tab/media-panel.js index c3e8e7388c0dc..e4ccd72c2ad80 100644 --- a/packages/block-editor/src/components/inserter/media-tab/media-panel.js +++ b/packages/block-editor/src/components/inserter/media-tab/media-panel.js @@ -60,6 +60,7 @@ export function MediaCategoryPanel( { rootClientId, onInsert, category } ) { category.label.toLocaleLowerCase() ) } /> + { category.description } { isLoading && (
diff --git a/packages/edit-site/src/components/block-editor/inserter-media-categories.js b/packages/edit-site/src/components/block-editor/inserter-media-categories.js index b7597e5308dea..439c8b163e64e 100644 --- a/packages/edit-site/src/components/block-editor/inserter-media-categories.js +++ b/packages/edit-site/src/components/block-editor/inserter-media-categories.js @@ -127,6 +127,7 @@ const inserterMediaCategories = [ label: 'Openverse', name: 'openverse', mediaType: 'image', + description:

{ __( 'Disclaimer message' ) }

, async fetch( query = {} ) { const defaultArgs = { mature: false, diff --git a/packages/editor/src/components/media-categories/index.js b/packages/editor/src/components/media-categories/index.js index b7597e5308dea..439c8b163e64e 100644 --- a/packages/editor/src/components/media-categories/index.js +++ b/packages/editor/src/components/media-categories/index.js @@ -127,6 +127,7 @@ const inserterMediaCategories = [ label: 'Openverse', name: 'openverse', mediaType: 'image', + description:

{ __( 'Disclaimer message' ) }

, async fetch( query = {} ) { const defaultArgs = { mature: false,