# post-carousel/4.0.8/src/blocks/social-profiles/block.js

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

- Page: https://pluginprobe.com/plugins/post-carousel/4.0.8/code/src/blocks/social-profiles/block.js
- Raw: https://pluginprobe.com/plugins/post-carousel/4.0.8/raw/src/blocks/social-profiles/block.js
- Modified: 2026-09-02T10:51:28+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.8/code/src/blocks/social-profiles/block.js#L10-L20`.

```javascript
import { registerBlockType } from "@wordpress/blocks";
import generateBlockCSS from "../shared/generateBlockCSS";
import { isBlockEnabled } from "../../utils";
import SocialProfilesSave from "./save";
import SocialProfilesEdit from "./edit";
import { SocialProfilePreviewImage, SocialProfilesBlockIcon } from "./icons";

const options = {
	apiVersion: 3,
	icon: SocialProfilesBlockIcon,
	category: "sp-smart-post-show",
	name: "sp-smart-post-show/social-profiles",
	title: "Social Profiles",
	description: "Add customizable social icons to connect visitors with your social profiles.",
	supports: {
		align: ["wide", "full"],
	},
	example: {
		attributes: {
			isPreview: true,
		},
	},
	edit: (props) => (props.attributes.isPreview ? <SocialProfilePreviewImage /> : <SocialProfilesEdit {...props} />),
	save: SocialProfilesSave,
	generateCSS: (attributes) => generateBlockCSS(attributes, "sp-smart-post-show/social-profiles", "frontend"),
};

const registerBlockTypeFn = () => {
	if (isBlockEnabled(options.name)) {
		registerBlockType(options.name, options);
	}
};

registerBlockTypeFn();

```
