: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
const {content_button:arr=[],buttons_size,buttons_shape} = data,
classes = ['module', 'module-buttons'];
classes.push(data.css_button);
if (buttons_size && buttons_size!== 'normal') {
classes.push(buttons_size);
if (buttons_shape && buttons_shape !== 'normal') {
classes.push(buttons_shape);
if (data.buttons_style) {
classes.push(data.buttons_style);
if (data.fullwidth_button) {
classes.push(data.fullwidth_button);
classes.push(data.display);
if(cl.contains('tb_add_mbtn') || cl.contains('tb_del_mbtn')){
if(cl.contains('tb_add_mbtn')){
if(api.activeModel?.id===this.id){
Themify.triggerEvent(api.LightBox.el.tfClass('add_new')[0],e.type);
api.undoManager.start('inlineAdd');
const settings=this.get('mod_settings'),
def=this.constructor.default().content_button?.[0] || {},
item=this._getItem(def,settings);
settings.content_button??=[];
settings.content_button.push(def);
target.parentNode.after(item);
item.appendChild(target);
this.set('mod_settings',settings);
api.undoManager.end('inlineAdd');
const item=target.closest('.module-buttons-item'),
index=Themify.convert(item.parentNode.tfClass('module-buttons-item')).indexOf(item);
if(api.activeModel?.id===this.id){
Themify.triggerEvent(api.LightBox.el.tfClass('tb_delete_row')[index],e.type);
api.undoManager.start('inlineDelete');
const settings=this.get('mod_settings'),
addBtn=item.tfClass('tb_add_mbtn')[0];
settings.content_button.splice(index, 1);
this.set('mod_settings',settings);
item.previousElementSibling?.appendChild(addBtn);
api.undoManager.end('inlineDelete');
.className = classes.join(' ');
for (let i = 0,len=arr.length; i < len; ++i) {
let item=this._getItem(arr[i],data);
item.appendChild(createElement('span',{role:'button',title:'Add Button',class:'tb_add_btn tb_add_mbtn tf_plus_icon tb_disable_sorting'}));
module.appendChild(item);