: 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.ModuleAlert = class extends api.Module {
img: 'callout_button_right',
img: 'callout_button_left',
img: 'callout_button_bottom',
img: 'callout_button_bottom_center',
value: 'button-bottom-center',
selector: '.alert-heading'
selector: '.alert-content .tb_text_wrap'
id: 'action_btn_text_alert',
selector: '.tb_alert_text'
id: 'alert_button_action',
'open_link_new_tab_alert',
show: 'alert_message_text',
'open_link_new_tab_alert',
'open_link_new_tab_alert',
hide: 'alert_message_text'
id: 'alert_message_text',
id: 'action_btn_link_alert',
id: 'open_link_new_tab_alert',
wrap_class: 'tb_group_element_lightbox lightbox_size'
id: 'action_btn_color_alert',
classSelector: '.ui.builder_button'
id: 'action_btn_appearance_alert',
id: 'alert_no_date_limit',
name: 'alert_close_auto',
show: 'alert_auto_close_delay'
hide: 'alert_auto_close_delay'
id: 'alert_auto_close_delay',
heading_alert: i18n.ahead,
action_btn_text_alert: i18n.actbtn,
action_btn_link_alert: 'https://themify.me/',
alert_auto_close_delay: 5,
action_btn_color_alert: 'blue'
static builderSave(settings){
layout_alert:'button-right',
action_btn_color_alert:'default',
alert_button_action:'close',
lightbox_width_unit:'px',
lightbox_height_unit:'px',
action_btn_link_alert:'#',
open_link_new_tab_alert:'no',
action_btn_appearance_alert:false
actButton=settings.alert_button_action;
if(settings[key]===def[key]){
if(settings.appearance_alert==='|' || settings.appearance_alert==='false'){
delete settings.appearance_alert;
if(settings.action_btn_appearance_alert==='|' || settings.action_btn_appearance_alert==='false'){
delete settings.action_btn_appearance_alert;
if(actButton!=='message'){
delete settings.alert_message_text;
delete settings.action_btn_link_alert;
if(!settings.action_btn_link_alert){
delete settings.open_link_new_tab_alert;
if(settings.open_link_new_tab_alert!=='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;
if(!settings.alert_no_date_limit){
delete settings.alert_start_at;
delete settings.alert_end_at;
if(!settings.alert_auto_close ){
delete settings.alert_auto_close_delay;
super.builderSave(settings);
const setting = data || this.get('mod_settings');
return api.Helper.limitString(setting.text_alert);
const module = createElement(),
inner = createElement('','alert-inner'),
content = createElement('','alert-content'),
color = data.color_alert && data.color_alert !== 'default' ? data.color_alert : 'tb_default_color',
classes = ['module', 'module-alert', 'ui', color, (data.layout_alert || 'button-right')],
constructor=this.constructor;
classes.push(data.css_alert);
if (data.appearance_alert) {
classes.push(data.appearance_alert.split('|').join(' '));
module.className = classes.join(' ');
constructor._setEditableContent(createElement((data.title_tag || 'h3'),'alert-heading'),'heading_alert',data.heading_alert),
constructor._setEditableContent(createElement('', 'tb_text_wrap'),'text_alert',data.text_alert)
inner.appendChild(content);
if (data.action_btn_text_alert) {
const btnColor = data.action_btn_color_alert && data.action_btn_color_alert !== 'default' ? data.action_btn_color_alert : 'tb_default_color',
button = createElement('', 'alert-button'),
link = createElement('a',{class:'ui builder_button ' + btnColor,href:data.action_btn_link_alert || '#'});
if (data.action_btn_appearance_alert) {
link.className += ' ' + data.action_btn_appearance_alert.split('|').join(' ');
link.appendChild(constructor._setEditableContent(createElement('span','tb_alert_text'),'action_btn_text_alert',data.action_btn_text_alert));
button.appendChild(link);
inner.appendChild(button);
if (data.mod_title_alert) {
module.appendChild(constructor.getModuleTitle(data.mod_title_alert,'mod_title_alert'));
module.appendChild(inner);