: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
function SGPBGutenbergBlock()
SGPBGutenbergBlock.prototype.init = function()
var localizedParams = SGPB_GUTENBERG_PARAMS;
var createElement = wp.element.createElement;
var registerBlockType = wp.blocks.registerBlockType;
var InspectorControls = wp.editor.InspectorControls;
var _wp$components = wp.components,
SelectControl = _wp$components.SelectControl,
TextareaControl = _wp$components.TextareaControl,
ToggleControl = _wp$components.ToggleControl,
PanelBody = _wp$components.PanelBody,
ServerSideRender = _wp$components.ServerSideRender,
Placeholder = _wp$components.Placeholder;
registerBlockType('popupbuilder/popups', {
title: localizedParams.title,
description: localizedParams.description,
keywords: ['popup', 'popup-builder'],
icon: 'welcome-widgets-menus',
const formOptions = SGPB_GUTENBERG_PARAMS.allPopups.map(value => (
const eventsOptions = SGPB_GUTENBERG_PARAMS.allEvents.map(value => (
label: SGPB_GUTENBERG_PARAMS.i18n.form_select
function selectPopup(value) {
function selectEvent(value) {
function setContent(value) {
function toggleDisplayTitle(value) {
function toggleDisplayDesc(value) {
<InspectorControls key="popuopbuilder-gutenberg-form-selector-inspector-controls">
<PanelBody title={'popup builder title'}>
label = {SGPB_GUTENBERG_PARAMS.i18n.form_selected}
label = {SGPB_GUTENBERG_PARAMS.i18n.form_selected}
options = {eventsOptions}
label = {SGPB_GUTENBERG_PARAMS.i18n.show_title}
onChange = {toggleDisplayTitle}
label = {SGPB_GUTENBERG_PARAMS.i18n.show_description}
onChange = {toggleDisplayDesc}
if (popupId && popupEvent) {
if (popupEvent == 'click') {
return '[sg_popup id="'+popupId+'" event="'+popupEvent+'"]'+clickText+'[/sg_popup]';
key="sgpb-gutenberg-form-selector-wrap"
className="sgpb-gutenberg-form-selector-wrapper">
<img class={SGPB_GUTENBERG_PARAMS.logo_classname} src={ SGPB_GUTENBERG_PARAMS.logo_url }/>
key = "sgpb-gutenberg-form-selector-select-control"
key = "sgpb-gutenberg-form-selector-select-control"
options = {eventsOptions}
if (props.attributes.popupEvent == 'click') {
clickText = SGPB_GUTENBERG_PARAMS.clickText;
return '[sg_popup id="'+props.attributes.popupId+'" event="'+props.attributes.popupEvent+'"]'+clickText+'[/sg_popup]';
jQuery(document).ready(function () {
if (typeof wp != 'undefined' && typeof wp.element != 'undefined' && typeof wp.blocks != 'undefined' && typeof wp.editor != 'undefined' && typeof wp.components != 'undefined') {
var block = new SGPBGutenbergBlock();