HEX
Server: nginx/1.26.1
System: Linux main-vm 5.15.0-153-generic #163-Ubuntu SMP Thu Aug 7 16:37:18 UTC 2025 x86_64
User: root (0)
PHP: 8.2.19
Disabled: NONE
Upload Files
File: /var/www/arunaya/wp-content/plugins/siteseo-pro/assets/js/block.js
(function (blocks, element, editor) {
    const el = element.createElement;
    const { InspectorControls } = editor;
    const { PanelBody, ToggleControl } = wp.components;

    blocks.registerBlockType('siteseo-pro/local-business', {
        title: 'Local Business',
        icon: 'store',
        category: 'siteseo',
        attributes: {
            displayOnHomepage: {
                type: 'boolean',
                default: true
            }
        },
        edit: function (props) {
            return [
                el('div', { className: props.className },
                    el('div', { className: 'local-business-preview' },
                        el('h3', null, 'Local Business'),
                        el('div', { dangerouslySetInnerHTML: { __html: siteseoProLocalBusiness.previewData } })
                    )
                ),
                el(InspectorControls, null,
                    el(PanelBody, { title: 'Settings' },
                        el(ToggleControl, {
                            label: 'Display on Homepage Only',
                            checked: props.attributes.displayOnHomepage,
                            onChange: (newVal) => props.setAttributes({ displayOnHomepage: newVal })
                        })
                    )
                )
            ];
        },
        save: function () {
            return null; // Use dynamic rendering
        }
    });
})(window.wp.blocks, window.wp.element, window.wp.blockEditor);