UNPKG

@wordpress/editor

Version:
29 lines (25 loc) 721 B
import _extends from "@babel/runtime/helpers/esm/extends"; import { createElement } from "@wordpress/element"; /** * WordPress dependencies */ import { withSelect } from '@wordpress/data'; /** * Internal dependencies */ import PostTypeSupportCheck from '../post-type-support-check'; function PostFormatCheck({ disablePostFormats, ...props }) { return !disablePostFormats && createElement(PostTypeSupportCheck, _extends({}, props, { supportKeys: "post-formats" })); } export default withSelect(select => { const editorSettings = select('core/editor').getEditorSettings(); return { disablePostFormats: editorSettings.disablePostFormats }; })(PostFormatCheck); //# sourceMappingURL=check.js.map