Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/themify-.../js/editor/modules
File: callout.mjs
(api=> {
[0] Fix | Delete
"use strict";
[1] Fix | Delete
api.ModuleCallout = class extends api.Module {
[2] Fix | Delete
constructor(fields) {
[3] Fix | Delete
super(fields);
[4] Fix | Delete
}
[5] Fix | Delete
static getOptions() {
[6] Fix | Delete
return [
[7] Fix | Delete
{
[8] Fix | Delete
id: 'mod_title_callout',
[9] Fix | Delete
type: 'title'
[10] Fix | Delete
},
[11] Fix | Delete
{
[12] Fix | Delete
id: 'layout_callout',
[13] Fix | Delete
type: 'layout',
[14] Fix | Delete
mode: 'sprite',
[15] Fix | Delete
label: 'calstyle',
[16] Fix | Delete
options: [
[17] Fix | Delete
{
[18] Fix | Delete
img: 'callout_button_right',
[19] Fix | Delete
value: 'button-right',
[20] Fix | Delete
label: 'bright'
[21] Fix | Delete
},
[22] Fix | Delete
{
[23] Fix | Delete
img: 'callout_button_left',
[24] Fix | Delete
value: 'button-left',
[25] Fix | Delete
label: 'bleft'
[26] Fix | Delete
},
[27] Fix | Delete
{
[28] Fix | Delete
img: 'callout_button_bottom',
[29] Fix | Delete
value: 'button-bottom',
[30] Fix | Delete
label: 'bbottom'
[31] Fix | Delete
},
[32] Fix | Delete
{
[33] Fix | Delete
img: 'callout_button_bottom_center',
[34] Fix | Delete
value: 'button-bottom-center',
[35] Fix | Delete
label: 'bbottomc'
[36] Fix | Delete
}
[37] Fix | Delete
],
[38] Fix | Delete
control: {
[39] Fix | Delete
classSelector: ''
[40] Fix | Delete
}
[41] Fix | Delete
},
[42] Fix | Delete
{
[43] Fix | Delete
id: 'heading_callout',
[44] Fix | Delete
type: 'text',
[45] Fix | Delete
label: 'calhead',
[46] Fix | Delete
control: {
[47] Fix | Delete
selector: '.callout-heading'
[48] Fix | Delete
}
[49] Fix | Delete
},
[50] Fix | Delete
{
[51] Fix | Delete
id: 'title_tag',
[52] Fix | Delete
type: 'select',
[53] Fix | Delete
label: 'caltattag',
[54] Fix | Delete
h_tags: true,
[55] Fix | Delete
default: 'h3'
[56] Fix | Delete
},
[57] Fix | Delete
{
[58] Fix | Delete
id: 'text_callout',
[59] Fix | Delete
type: 'textarea',
[60] Fix | Delete
label: 'caltext',
[61] Fix | Delete
control: {
[62] Fix | Delete
selector: '.tb_text_wrap'
[63] Fix | Delete
}
[64] Fix | Delete
},
[65] Fix | Delete
{
[66] Fix | Delete
id: 'color_callout',
[67] Fix | Delete
type: 'layout',
[68] Fix | Delete
mode: 'sprite',
[69] Fix | Delete
class: 'tb_colors',
[70] Fix | Delete
label: 'c',
[71] Fix | Delete
color: true,
[72] Fix | Delete
transparent: true,
[73] Fix | Delete
control: {
[74] Fix | Delete
classSelector: ''
[75] Fix | Delete
}
[76] Fix | Delete
},
[77] Fix | Delete
{
[78] Fix | Delete
id: 'appearance_callout',
[79] Fix | Delete
type: 'checkbox',
[80] Fix | Delete
label: 'app',
[81] Fix | Delete
appearance: true
[82] Fix | Delete
},
[83] Fix | Delete
{
[84] Fix | Delete
type: 'group',
[85] Fix | Delete
label: 'actbtn',
[86] Fix | Delete
display: 'accordion',
[87] Fix | Delete
options: [
[88] Fix | Delete
{
[89] Fix | Delete
id: 'action_btn_text_callout',
[90] Fix | Delete
type: 'text',
[91] Fix | Delete
label: 'actbtn',
[92] Fix | Delete
class: 'medium',
[93] Fix | Delete
control: {
[94] Fix | Delete
selector: '.tb_callout_text'
[95] Fix | Delete
},
[96] Fix | Delete
binding: {
[97] Fix | Delete
empty:{
[98] Fix | Delete
hide:'callout_link_opt'
[99] Fix | Delete
},
[100] Fix | Delete
not_empty:{
[101] Fix | Delete
show:'callout_link_opt'
[102] Fix | Delete
}
[103] Fix | Delete
}
[104] Fix | Delete
},
[105] Fix | Delete
{
[106] Fix | Delete
type:'group',
[107] Fix | Delete
wrap_class:'callout_link_opt',
[108] Fix | Delete
options:[
[109] Fix | Delete
{
[110] Fix | Delete
id: 'action_btn_link_callout',
[111] Fix | Delete
type: 'url',
[112] Fix | Delete
label: 'actlink'
[113] Fix | Delete
},
[114] Fix | Delete
{
[115] Fix | Delete
id: 'open_link_new_tab_callout',
[116] Fix | Delete
type: 'radio',
[117] Fix | Delete
label: 'o_l',
[118] Fix | Delete
options: [
[119] Fix | Delete
{
[120] Fix | Delete
value: 'no',
[121] Fix | Delete
name: 'swin'
[122] Fix | Delete
},
[123] Fix | Delete
{
[124] Fix | Delete
value: 'yes',
[125] Fix | Delete
name: 'nwin'
[126] Fix | Delete
}
[127] Fix | Delete
]
[128] Fix | Delete
},
[129] Fix | Delete
{
[130] Fix | Delete
id: 'action_btn_color_callout',
[131] Fix | Delete
type: 'layout',
[132] Fix | Delete
class: 'tb_colors',
[133] Fix | Delete
mode: 'sprite',
[134] Fix | Delete
label: 'btncolor',
[135] Fix | Delete
color: true,
[136] Fix | Delete
transparent: true,
[137] Fix | Delete
control: {
[138] Fix | Delete
classSelector: '.ui.builder_button'
[139] Fix | Delete
}
[140] Fix | Delete
},
[141] Fix | Delete
{
[142] Fix | Delete
id: 'action_btn_appearance_callout',
[143] Fix | Delete
type: 'checkbox',
[144] Fix | Delete
label: 'app',
[145] Fix | Delete
appearance: true
[146] Fix | Delete
}
[147] Fix | Delete
]
[148] Fix | Delete
}
[149] Fix | Delete
]
[150] Fix | Delete
},
[151] Fix | Delete
{
[152] Fix | Delete
type: 'custom_css_id',
[153] Fix | Delete
custom_css: 'css_callout'
[154] Fix | Delete
}
[155] Fix | Delete
];
[156] Fix | Delete
}
[157] Fix | Delete
static default(){
[158] Fix | Delete
return {
[159] Fix | Delete
heading_callout: i18n.calhead,
[160] Fix | Delete
text_callout: i18n.caltext,
[161] Fix | Delete
action_btn_text_callout: i18n.actbtn,
[162] Fix | Delete
action_btn_link_callout: 'https://themify.me/',
[163] Fix | Delete
action_btn_color_callout: 'blue'
[164] Fix | Delete
};
[165] Fix | Delete
}
[166] Fix | Delete
static builderSave(settings){
[167] Fix | Delete
const def={
[168] Fix | Delete
layout_callout:'button-right',
[169] Fix | Delete
title_tag:'h3',
[170] Fix | Delete
action_btn_color_callout:'default',
[171] Fix | Delete
color_callout:'default',
[172] Fix | Delete
action_btn_link_callout:'#',
[173] Fix | Delete
open_link_new_tab_callout:'no',
[174] Fix | Delete
appearance_callout:false,
[175] Fix | Delete
action_btn_appearance_callout:false
[176] Fix | Delete
};
[177] Fix | Delete
for( let key in def){
[178] Fix | Delete
if(settings[key]===def[key]){
[179] Fix | Delete
delete settings[key];
[180] Fix | Delete
}
[181] Fix | Delete
}
[182] Fix | Delete
if(settings.appearance_callout==='|' || settings.appearance_callout==='false'){
[183] Fix | Delete
delete settings.appearance_callout;
[184] Fix | Delete
}
[185] Fix | Delete
if(settings.action_btn_appearance_callout==='|' || settings.action_btn_appearance_callout==='false'){
[186] Fix | Delete
delete settings.action_btn_appearance_callout;
[187] Fix | Delete
}
[188] Fix | Delete
if(!settings.action_btn_text_callout){
[189] Fix | Delete
const del=[
[190] Fix | Delete
'action_btn_appearance_callout',
[191] Fix | Delete
'action_btn_color_callout',
[192] Fix | Delete
'action_btn_link_callout',
[193] Fix | Delete
'open_link_new_tab_callout'
[194] Fix | Delete
];
[195] Fix | Delete
for(let i=del.length-1;i>-1;--i){
[196] Fix | Delete
if(settings[del[i]]!==undefined){
[197] Fix | Delete
delete settings[del[i]];
[198] Fix | Delete
}
[199] Fix | Delete
}
[200] Fix | Delete
}
[201] Fix | Delete
super.builderSave(settings);
[202] Fix | Delete
}
[203] Fix | Delete
getExcerpt(data) {
[204] Fix | Delete
const setting = data || this.get('mod_settings');
[205] Fix | Delete
return api.Helper.limitString(setting.text_callout);
[206] Fix | Delete
}
[207] Fix | Delete
preview(data) {
[208] Fix | Delete
const module = createElement(),
[209] Fix | Delete
inner =createElement('','callout-inner'),
[210] Fix | Delete
content = createElement('', 'callout-content tf_left'),
[211] Fix | Delete
color = data.color_callout && data.color_callout !== 'default' ? data.color_callout : 'tb_default_color',
[212] Fix | Delete
classes = ['module', 'ui', color],
[213] Fix | Delete
constructor=this.constructor;
[214] Fix | Delete
[215] Fix | Delete
if (data.layout_callout) {
[216] Fix | Delete
classes.push(data.layout_callout);
[217] Fix | Delete
}
[218] Fix | Delete
if (data.css_callout) {
[219] Fix | Delete
classes.push(data.css_callout);
[220] Fix | Delete
}
[221] Fix | Delete
if (data.appearance_callout) {
[222] Fix | Delete
classes.push(data.appearance_callout.split('|').join(' '));
[223] Fix | Delete
}
[224] Fix | Delete
[225] Fix | Delete
module.className = classes.join(' ');
[226] Fix | Delete
content.append(
[227] Fix | Delete
constructor._setEditableContent(createElement((data.title_tag || 'h3'), 'callout-heading'),'heading_callout',data.heading_callout),
[228] Fix | Delete
constructor._setEditableContent(createElement('','tb_text_wrap'),'text_callout',data.text_callout));
[229] Fix | Delete
inner.appendChild(content);
[230] Fix | Delete
[231] Fix | Delete
if (data.action_btn_text_callout) {
[232] Fix | Delete
const btn_color_callout = data.action_btn_color_callout,
[233] Fix | Delete
btnColor = btn_color_callout && 'default' !== btn_color_callout ? btn_color_callout : 'tb_default_color',
[234] Fix | Delete
btn = createElement('','callout-button tf_right tf_textr'),
[235] Fix | Delete
link = createElement('a',{href:data.action_btn_link_callout || '#',class: 'ui builder_button ' + btnColor});
[236] Fix | Delete
[237] Fix | Delete
if (data.action_btn_appearance_callout) {
[238] Fix | Delete
link.className += ' ' + data.action_btn_appearance_callout.split('|').join(' ');
[239] Fix | Delete
}
[240] Fix | Delete
link.appendChild(constructor._setEditableContent(createElement('span', 'tb_callout_text'),'action_btn_text_callout',data.action_btn_text_callout));
[241] Fix | Delete
btn.appendChild(link);
[242] Fix | Delete
inner.appendChild(btn);
[243] Fix | Delete
}
[244] Fix | Delete
[245] Fix | Delete
if (data.mod_title_callout) {
[246] Fix | Delete
module.appendChild(constructor.getModuleTitle(data.mod_title_callout,'mod_title_callout'));
[247] Fix | Delete
}
[248] Fix | Delete
[249] Fix | Delete
module.appendChild(inner);
[250] Fix | Delete
return module;
[251] Fix | Delete
}
[252] Fix | Delete
};
[253] Fix | Delete
})(tb_app);
[254] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function