: 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.ModuleImage = class extends api.Module {
img: 'image_card_layout',
value: 'image-card-layout',
img: 'image_centered_overlay',
value: 'image-full-overlay',
hide: 'caption_on_overlay'
show: 'caption_on_overlay'
show: 'caption_on_overlay'
id: 'caption_on_overlay',
wrap_class: 'auto_fullwidth'
selector: "[data-name='title_image']"
wrap_class: 'link_options tb_compact_radios',
wrap_class: 'tb_group_element_lightbox'
wrap_class: 'tb_group_element_lightbox tb_group_element_newtab'
selector: '.image-caption'
static builderSave(settings) {
style_image: 'image-top',
lightbox_width_unit: 'px',
lightbox_height_unit: 'px',
units = ['font_size_caption', 'line_height_caption', 'f_s_c_h'];
if (settings[key] === def[key]) {
if (settings.style_image !== 'image-overlay' && settings.style_image !== 'image-full-overlay') {
delete settings.caption_on_overlay;
if (!settings.link_image) {
delete settings.param_image;
if (!settings.param_image) {
delete settings.image_zoom_icon;
if (settings.auto_fullwidth==='|' || settings.auto_fullwidth==='false') {
delete settings.auto_fullwidth;
if (settings.appearance_image==='|' || settings.appearance_image==='false') {
delete settings.appearance_image;
if (settings.param_image !== 'lightbox') {
delete settings.lightbox_width;
delete settings.lightbox_height;
if (!settings.lightbox_width) {
delete settings.lightbox_width_unit;
if (!settings.lightbox_height) {
delete settings.lightbox_height_unit;
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.clearShadow('text-shadow', 0, bp, settings);
this.clearShadow('t_sh_h', 0, bp, settings);
this.clearShadow('t_sh_m_t', 0, bp, settings);
this.clearShadow('t_sh_m_t_h', 0, bp, settings);
this.clearPadding('padding', bp, settings);
this.clearPadding('p_h', bp, settings);
this.clearPadding('i_t_p', bp, settings);
this.clearPadding('i_t_p_h', bp, settings);
this.clearPadding('c_p', bp, settings);
this.clearPadding('c_p_h', bp, settings);
this.clearPadding('margin', bp, settings);
this.clearPadding('m_h', bp, settings);
this.clearPadding('title_margin', bp, settings);
this.clearPadding('t_m_h', bp, settings);
this.clearPadding('i_t_m', bp, settings);
this.clearPadding('i_t_m_h', bp, settings);
this.clearPadding('c_m', bp, settings);
this.clearPadding('c_m_h', bp, settings);
this.clearPadding('b_ra', bp, settings);
this.clearPadding('r_c_h', bp, settings);
this.clearPadding('i_t_r_c', bp, settings);
this.clearPadding('i_t_r_c_h', bp, settings);
this.clearPadding('c_r_c', bp, settings);
this.clearPadding('c_r_c_h', bp, settings);
this.clearBorder('border', bp, settings);
this.clearBorder('b_h', bp, settings);
this.clearBorder('i_t_b', bp, settings);
this.clearBorder('i_t_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('ht', bp, settings, 1);
this.clearShadow('b_sh', 1, bp, settings);
this.clearShadow('sh_h', 1, bp, settings);
this.clearShadow('i_t_sh', 1, bp, settings);
this.clearShadow('i_t_sh_h', 1, bp, settings);
this.clearShadow('c_sh', 1, bp, settings);
this.clearShadow('c_sh_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);
if((!type || type==='setting') && !this.get('mod_settings').url_image){
ThemifyConstructor.afterRun.push(() => {
Themify.triggerEvent(ThemifyConstructor.getEl('url_image').parentNode.tfClass('tb_upload_btn')[0], _CLICK_);
const setting = data || this.get('mod_settings'),
imgUrl = setting.url_image,
img.alt = this.getName();
return super.getImage(setting);
let module = createElement(),
wrap = createElement('','image-wrap tf_rel tf_mw'),
{style_image:imageStyle='image-top',url_image:url} = data,
classes = ['module', 'module-image', imageStyle, 'tf_mw'],
constructor=this.constructor;
if (data.auto_fullwidth) {
classes.push('auto_fullwidth');
if (data.caption_on_overlay === 'yes' && ('image-overlay' === imageStyle || 'image-full-overlay' === imageStyle)) {
classes.push('active-caption-hover');
classes.push(data.css_image);
if (data.appearance_image) {
classes.push(data.appearance_image.split('|').join(' '));
module.className = classes.join(' ');
img = constructor.setEditableImage(createElement('img'),'url_image','width_image','height_image',data);
img.alt = data.alt_image;
const linkType = data.param_image;
if (linkType === 'lightbox') {
if (data.lightbox_width) {
lbParams.push(data.lightbox_width + (data.lightbox_width_unit || 'px'));
if (data.lightbox_height) {
lbParams.push(data.lightbox_height + (data.lightbox_height_unit || 'px'));
if (lbParams.length > 0) {
linkParams['data-zoom-config']=lbParams.join('|');
linkParams.class='lightbox-builder themify_lightbox';
else if (linkType === 'newtab') {
linkParams.rel= 'noopener';
linkParams.target='_blank';
linkParams.href=data.link_image;
const link =createElement('a',linkParams);
if (linkType && linkType !== 'regular' && data.image_zoom_icon === 'zoom' && imageStyle !== 'image-full-overlay') {
const zoom = createElement('span','zoom');
zoom.appendChild(api.Helper.getIcon((linkType === 'lightbox' ? 'ti-search' : 'ti-new-window')));
if (data.mod_title_image) {
module.appendChild(constructor.getModuleTitle(data.mod_title_image, 'mod_title_image'));
module.appendChild(wrap);
if (data.title_image || data.caption_image) {
const content = createElement('','image-content'+(imageStyle === 'image-full-overlay'?' tf_overflow':''));
let titleTag =createElement(data.title_tag || 'h3','image-title'),
const link =createElement('a',linkParams);
titleTag.appendChild(link);
constructor._setEditableContent(editTag,'title_image',data.title_image);
content.appendChild(titleTag);
if (data.caption_image) {
content.appendChild(constructor._setEditableContent(createElement('','image-caption tb_text_wrap'),'caption_image',data.caption_image));
if (imageStyle === 'image-overlay') {
wrap.appendChild(content);
module.appendChild(content);