: 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.ModuleFancyHeading = class extends api.Module {
const settings=fields.mod_settings || {};
for(let sides=['top','left','right','bottom'],i=sides.length-1;i>-1;--i){
for(let bps=api.breakpointsReverse,j=bps.length-1;j>-1;--j){
let vals=bps[j]==='desktop'?settings:settings['breakpoint_'+bps[j]];
if(vals?.['_margin_'+side+'_divider']!==undefined){
vals['md_'+side]=vals['_margin_'+side+'_divider'];
delete vals['_margin_'+side+'_divider'];
if(vals['_margin_'+side+'_divider_unit']){
vals['md_'+side+'_unit']=vals['_margin_'+side+'_divider_unit'];
delete vals['_margin_'+side+'_divider_unit'];
{value: 'themify-text-left', name: 'left', icon: api.Helper.getIcon('ti-align-left').outerHTML},
{value: 'themify-text-center', name: 'center', icon: api.Helper.getIcon('ti-align-center').outerHTML},
{value: 'themify-text-right', name: 'right', icon: api.Helper.getIcon('ti-align-right').outerHTML}
wrap_class: 'tb_group_element_image_icon'
wrap_class: 'tb_group_element_icon',
wrap_class: 'tb_group_element_l',
static builderSave(settings){
iconType=settings.icon_type,
units=['main_margin_top','main_margin_bottom','m_h_margin_top','m_h_margin_bottom','font_size_subheading','line_height_subheading','letter_spacing_subheading','sub_margin_top','sub_margin_bottom','f_s_s_h','s_h_margin_top','s_h_margin_bottom','fh_d_s','fh_d_s_h'];
if(settings[key]===def[key]){
if(settings.text_alignment==='undefined'){
delete settings.text_alignment;
if(settings.inline_text==='|' || settings.inline_text==='false'){
delete settings.inline_text;
if(iconType==='image_icon' || iconType==='l'){
if(iconType!=='image_icon'){
for(let i=lottieDel.length-1;i>-1;--i){
if(settings[lottieDel[i]]!==undefined){
delete settings[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.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.clearFontColor('font_color_type_subheading','font_color_subheading','font_gradient_color_subheading',bp,settings);
this.clearFontColor('f_c_t_s_h','f_c_s_h','f_g_c_s_h',bp,settings);
this.clearShadow('t_sh_h',0,bp,settings);
this.clearShadow('t_sh_h_h',0,bp,settings);
this.clearShadow('t_sh_s_h',0,bp,settings);
this.clearShadow('t_sh_s_h_h',0,bp,settings);
this.clearPadding('padding',bp,settings);
this.clearPadding('p_h',bp,settings);
this.clearPadding('fh_d_i_p',bp,settings);
this.clearPadding('fh_d_i_p_h',bp,settings);
this.clearPadding('margin',bp,settings);
this.clearPadding('m_h',bp,settings);
this.clearPadding('md',bp,settings);
this.clearPadding('fh_d_i_m',bp,settings);
this.clearPadding('fh_d_i_m_h',bp,settings);
this.clearPadding('fh_d_b_m',bp,settings);
this.clearPadding('fh_d_b_m_h',bp,settings);
this.clearPadding('b_ra',bp,settings);
this.clearPadding('r_c_h',bp,settings);
this.clearPadding('fh_d_i_rc',bp,settings);
this.clearPadding('fh_d_i_rc_h',bp,settings);
this.clearBorder('border',bp,settings);
this.clearBorder('b_h',bp,settings);
this.clearBorder('d_border',bp,settings);
this.clearBorder('fh_d_i_b',bp,settings);
this.clearBorder('fh_d_i_b_h',bp,settings);
this.clearBorder('fh_d_b_b',bp,settings);
this.clearBorder('fh_d_b_b_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('d_width',bp,settings);
this.clearWidth('fh_d_b_w',bp,settings);
this.clearWidth('ht',bp,settings,1);
this.clearShadow('b_sh',1,bp,settings);
this.clearShadow('sh_h',1,bp,settings);
this.clearPosition('po',bp,settings);
this.clearTransform('tr',bp,settings);
this.clearTransform('tr-h',bp,settings);
this.clearMarginOpposity('main_margin_top',bp,settings);
this.clearMarginOpposity('m_h_margin_top',bp,settings);
this.clearMarginOpposity('sub_margin_top',bp,settings);
this.clearMarginOpposity('s_h_margin_top',bp,settings);
this.clearUnits(units,bp,settings);
super.builderSave(settings);
const setting = data || this.get('mod_settings');
return api.Helper.limitString(setting.heading);
const inline = data.inline_text?.toString() === '1',
inlineBlock = !inline ? 'tf_block' : 'tf_inline_b',
module = createElement(),
heading = createElement(data.heading_tag || 'h1','fancy-heading'),
mainHead = createElement('span','main-head ' + inlineBlock),
subHead = createElement('span','sub-head tf_rel ' + inlineBlock),
classes = ['module', 'module-fancy-heading'],
divider = 'no' === data.divider,
iconType = data.icon_type || 'icon',
icon = iconType !== 'image_icon' ? (iconType !== 'l' ? (data.icon ? api.Helper.getIcon(data.icon) : '') : api.Helper.getLottie(data, 'parent')) : data.image,
constructor=this.constructor;
classes.push('inline-fancy-heading');
classes.push('tb_hide_divider');
classes.push(data.css_class);
module.className = classes.join(' ');
if (data.text_alignment) {
heading.className += ' tf_text' + (data.text_alignment.replace('themify-text-', ''))[0];
mainHead.appendChild(constructor._setEditableContent(createElement('a'),{class:'heading',href:data.heading_link},data.heading));
constructor._setEditableContent(mainHead,'heading',data.heading);
heading.appendChild(mainHead);
let iconWrap = createElement('span','tb_fancy_heading_icon_wrap ' + inlineBlock),
iconHead = createElement('span','tb_fancy_heading_icon'),
if (iconType !== 'image_icon') {
iconItem = createElement('em');
if (iconType === 'icon' && data.icon_c) {
iconItem.style.color = api.Helper.toRGBA(data.icon_c);
iconItem.appendChild(icon);
iconItem = constructor.setEditableImage(createElement('img'),'image');
iconHead.appendChild(iconItem);
iconWrap.appendChild(iconHead);
let border = createElement('span', 'tb_fancy_heading_border tf_rel');
iconWrap.appendChild(border.cloneNode());
iconWrap.prepend(border);
heading.appendChild(iconWrap);
if (data.sub_heading_link) {
subHead.appendChild(constructor._setEditableContent(createElement('a'),{class:'sub_heading',href:data.sub_heading_link},data.sub_heading));
constructor._setEditableContent(subHead,'sub_heading',data.sub_heading);
heading.appendChild(subHead);
module.appendChild(heading);