+
+ { __( 'Your theme uses post formats to highlight different kinds of content, like images or videos. Apply a post format to see this special styling.' ) }
+
+
+
+
+
+ );
+};
+
+const getSuggestion = ( supportedFormats, suggestedPostFormat ) => {
+ const formats = POST_FORMATS.filter( ( format ) => includes( supportedFormats, format.id ) );
+ return find( formats, ( format ) => format.id === suggestedPostFormat );
+};
+
+export default compose(
+ withSelect( ( select ) => {
+ const { getEditedPostAttribute, getSuggestedPostFormat } = select( 'core/editor' );
+ const supportedFormats = get( select( 'core' ).getThemeSupports(), [ 'formats' ], [] );
+ return {
+ currentPostFormat: getEditedPostAttribute( 'format' ),
+ suggestion: getSuggestion( supportedFormats, getSuggestedPostFormat() ),
+ };
+ } ),
+ withDispatch( ( dispatch ) => ( {
+ onUpdatePostFormat( postFormat ) {
+ dispatch( 'core/editor' ).editPost( { format: postFormat } );
+ },
+ } ) ),
+ ifCondition( ( { suggestion, currentPostFormat } ) => suggestion && suggestion.id !== currentPostFormat ),
+)( PostFormatPanel );
diff --git a/packages/editor/src/components/post-publish-panel/maybe-tags-panel.js b/packages/editor/src/components/post-publish-panel/maybe-tags-panel.js
new file mode 100644
index 0000000000000..1006a83243e1e
--- /dev/null
+++ b/packages/editor/src/components/post-publish-panel/maybe-tags-panel.js
@@ -0,0 +1,70 @@
+/**
+ * WordPress dependencies
+ */
+import { __ } from '@wordpress/i18n';
+import { Component } from '@wordpress/element';
+import { compose, ifCondition } from '@wordpress/compose';
+import { withSelect } from '@wordpress/data';
+import { PanelBody } from '@wordpress/components';
+
+import FlatTermSelector from '../post-taxonomies/flat-term-selector';
+
+const TagsPanel = () => {
+ const panelBodyTitle = [
+ __( 'Suggestion:' ),
+ (
+