芝麻web文件管理V1.00
编辑当前文件:/home/royashxg/www/wp-content/plugins/blocksy-companion/static/js/editor/blocks/socials/index.js
import { createElement } from '@wordpress/element' import { __ } from 'ct-i18n' import { registerBlockType } from '@wordpress/blocks' import { getAttributesFromOptions, getOptionsForBlock } from '../../utils' import Edit from './Edit' import { colorsDefaults } from './colors' export const options = getOptionsForBlock('socials') export const defaultAttributes = getAttributesFromOptions(options) registerBlockType('blocksy/socials', { apiVersion: 3, title: __('Socials Controls', 'blocksy-companion'), icon: { src: (
), }, supports: { html: false, inserter: false, lock: false, }, parent: ['blocksy/widgets-wrapper'], attributes: { ...defaultAttributes, ...colorsDefaults, }, edit: (props) =>
, save: function () { return
Blocksy: Socials
}, }) wp.blocks.registerBlockVariation('blocksy/widgets-wrapper', { name: 'blocksy-socials', title: __('Socials', 'blocksy-companion'), description: __('Display your social media profiles and boost the site engagement.', 'blocksy-companion'), attributes: { heading: __('Socials', 'blocksy-companion'), block: 'blocksy/socials', }, isActive: (attributes) => attributes.block === 'blocksy/socials', icon: { src: (
), }, })