@wordpress/editor
Version:
Enhanced block editor for WordPress posts.
29 lines (25 loc) • 721 B
JavaScript
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