diff --git a/projects/plugins/jetpack/changelog/enable-jetpack-collection-for-native-inserter b/projects/plugins/jetpack/changelog/enable-jetpack-collection-for-native-inserter new file mode 100644 index 0000000000000..8f7f3f3737b76 --- /dev/null +++ b/projects/plugins/jetpack/changelog/enable-jetpack-collection-for-native-inserter @@ -0,0 +1,4 @@ +Significance: minor +Type: enhancement + +Enable Jetpack block collection for the native editor block inserter. diff --git a/projects/plugins/jetpack/extensions/shared/block-category.native.js b/projects/plugins/jetpack/extensions/shared/block-category.native.js new file mode 100644 index 0000000000000..c4b5fa680d22b --- /dev/null +++ b/projects/plugins/jetpack/extensions/shared/block-category.native.js @@ -0,0 +1,28 @@ +import { getCategories, setCategories, registerBlockCollection } from '@wordpress/blocks'; +import { __ } from '@wordpress/i18n'; +import { JetpackLogo } from './icons'; + +registerBlockCollection( 'jetpack', { + title: __( 'Jetpack powered', 'jetpack' ), + icon: , +} ); + +setCategories( [ + ...getCategories().filter( ( { slug } ) => slug !== 'earn' ), + // Add a Earn block category + { + slug: 'earn', + title: __( 'Earn', 'jetpack' ), + icon: , + }, +] ); + +setCategories( [ + ...getCategories().filter( ( { slug } ) => slug !== 'grow' ), + // Add a Grow block category + { + slug: 'grow', + title: __( 'Grow', 'jetpack' ), + icon: , + }, +] );