: 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
api.ModuleButtons = class extends api.Module {
selector: '[data-name="label"]'
wrap_class: 'tb_group_element_lightbox lightbox_size'
wrap_class: 'tb_group_element_i',
wrap_class: 'tb_group_element_l',
img: 'transparent_button',
img: 'horizontal_button',
value: 'buttons-horizontal',
value: 'buttons-vertical',
name: 'buttons-fullwidth'
link: 'https://themify.me/'
static builderSave(settings){
display:'buttons-horizontal'
btns=settings.content_button,
units=['f_s_bic','f_s_h_bic'];
if(settings[key]===def[key]){
if(settings.fullwidth_button){
lightbox_width_unit:'px',
lightbox_height_unit:'px',
button_color_bg:'default',
for(let i=btns.length-1;i>-1;--i){
if(btn[key]===btnDef[key]){
delete btn.button_color_bg;
if(btn.link_options!=='lightbox'){
delete btn.lightbox_width;
delete btn.lightbox_height;
delete btn.lightbox_width_unit;
if(!btn.lightbox_height){
delete btn.lightbox_height_unit;
for(let i=lottieDel.length-1;i>-1;--i){
if(btn[lottieDel[i]]!==undefined){
delete btn[lottieDel[i]];
for(let bps=api.breakpointsReverse,i=bps.length-1;i>-1;--i){
this.clearImageGradient('background_image','background_color','background_repeat','background_position',bp,settings);
this.clearImageGradient('b_i_h','bg_c_h','b_r_h','b_p_h',bp,settings);
this.clearImageGradient('b_i','button_background_color','b_r','b_p',bp,settings);
this.clearImageGradient('bl_i','button_hover_background_color','bl_r','bl_p',bp,settings);
this.clearImageGradient('bic_b_i','bic_b_c','bic_b_r','bic_b_p',bp,settings);
this.clearImageGradient('bic_b_i_h','bic_h_b_c','bic_b_r_h','bic_b_p_h',bp,settings);
this.clearFontColor('font_color_type','font_color','font_gradient_color',bp,settings);
this.clearFontColor('f_c_t_h','f_c_h','f_g_c_h',bp,settings);
this.clearShadow('text-shadow',0,bp,settings);
this.clearShadow('t_sh_h',0,bp,settings);
this.clearPadding('padding',bp,settings);
this.clearPadding('p_h',bp,settings);
this.clearPadding('padding_link',bp,settings);
this.clearPadding('p_l_h',bp,settings);
this.clearPadding('p_i_bic',bp,settings);
this.clearPadding('p_i_bic_h',bp,settings);
this.clearPadding('margin',bp,settings);
this.clearPadding('m_h',bp,settings);
this.clearPadding('link_margin',bp,settings);
this.clearPadding('l_m_h',bp,settings);
this.clearPadding('m_i_bic',bp,settings);
this.clearPadding('m_i_bic_h',bp,settings);
this.clearPadding('b_ra',bp,settings);
this.clearPadding('r_c_h',bp,settings);
this.clearPadding('l_b_r_c',bp,settings);
this.clearPadding('l_b_r_c_h',bp,settings);
this.clearPadding('rc_i_bic',bp,settings);
this.clearPadding('rc_i_bic_h',bp,settings);
this.clearBorder('border',bp,settings);
this.clearBorder('b_h',bp,settings);
this.clearBorder('link_border',bp,settings);
this.clearBorder('l_b_h',bp,settings);
this.clearBorder('b_i_bic',bp,settings);
this.clearBorder('b_i_bic_h',bp,settings);
this.clearFilter('bl_m','css_f',bp,settings);
this.clearFilter('_h','css_f_h',bp,settings);
this.clearWidth('w',bp,settings);
this.clearWidth('ht',bp,settings,1);
this.clearShadow('b_sh',1,bp,settings);
this.clearShadow('sh_h',1,bp,settings);
this.clearShadow('l_b_sh',1,bp,settings);
this.clearShadow('l_b_sh_h',1,bp,settings);
this.clearShadow('sh_i_bic',1,bp,settings);
this.clearShadow('sh_i_bic_h',1,bp,settings);
this.clearPosition('po',bp,settings);
this.clearTransform('tr',bp,settings);
this.clearTransform('tr-h',bp,settings);
this.clearUnits(units,bp,settings);
super.builderSave(settings);
let buttonWrap = createElement('','module-buttons-item tf_in_flx tf_rel tb_is_repeat'),
icon = item.t !== 'l' ? (item.icon ? api.Helper.getIcon(item.icon) : '') : api.Helper.getLottie(item, 'parent'),
align=item.icon_alignment || 'left',
iconEl = icon ? createElement('em') : undefined,
constructor=this.constructor;
iconEl?.appendChild(icon);
let color = !item.button_color_bg || item.button_color_bg === 'default' ? 'tb_default_color' : item.button_color_bg,
link = constructor._setEditableContent(createElement('a',{href:item.link,class:'ui builder_button tf_in_flx ' + color}),'label',item.label,'','content_button');
if (data.download_link === 'yes') {
link.setAttribute('download', 1);
align === 'right' ? link.appendChild(iconEl):link.prepend(iconEl);
buttonWrap.appendChild(link);
buttonWrap.appendChild(constructor._setEditableContent(createElement('span','tf_inline_b tf_vmiddle'),'label',item.label,'','content_button'));
align === 'right' ? buttonWrap.appendChild(iconEl):buttonWrap.prepend(iconEl);
buttonWrap.appendChild(createElement('',{role:'button',title:'Delete Button',class:'tb_del_btn tb_del_mbtn tf_close tb_disable_sorting'}));