# speechkit/4.2.4/src/Component/Post/BlockAttributes/check.js

BeyondWords – AI audio for publishers, version 4.2.4. 27 lines.

- Page: https://pluginprobe.com/plugins/speechkit/4.2.4/code/src/Component/Post/BlockAttributes/check.js
- Raw: https://pluginprobe.com/plugins/speechkit/4.2.4/raw/src/Component/Post/BlockAttributes/check.js
- Modified: 2023-11-15T21:11:02+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/speechkit/4.2.4/code/src/Component/Post/BlockAttributes/check.js#L10-L20`.

```javascript
/**
 * WordPress dependencies
 */
import { compose } from '@wordpress/compose';
import { withSelect } from '@wordpress/data';
import { store as coreStore } from '@wordpress/core-data';

export function BlockAttributesCheck( { supportsCustomFieldsAction, children } ) {
	if ( ! supportsCustomFieldsAction ) {
		return null;
	}

	return children;
}

export default compose( [
	withSelect( ( select ) => {
		const { getCurrentPostType } = select( 'core/editor' );
		const postType = getCurrentPostType();

		return {
			supportsCustomFieldsAction:
				!! select( coreStore ).getPostType( postType )?.supports?.['custom-fields'],
		};
	} ),
] )( BlockAttributesCheck );

```
