# post-carousel/4.0.3/src/utils/index.js

Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog &amp; News, version 4.0.3. 10 lines.

- Page: https://pluginprobe.com/plugins/post-carousel/4.0.3/code/src/utils/index.js
- Raw: https://pluginprobe.com/plugins/post-carousel/4.0.3/raw/src/utils/index.js
- Modified: 2026-04-24T11:48:54+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/post-carousel/4.0.3/code/src/utils/index.js#L10-L20`.

```javascript
export const blockOptions = {};
sp_smart_post_block_localize?.getBlockOptions.forEach((element) => {
	blockOptions[element.block_name] = element.show;
});

export const isBlockEnabled = (name) => {
	const blockName = name.replaceAll("sp-smart-post-show/", "");
	return blockOptions[blockName];
};

```
