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: text.mjs
(api => {
[0] Fix | Delete
"use strict";
[1] Fix | Delete
api.ModuleText = 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_text',
[9] Fix | Delete
type: 'title'
[10] Fix | Delete
},
[11] Fix | Delete
{
[12] Fix | Delete
id: 'content_text',
[13] Fix | Delete
type: 'wp_editor',
[14] Fix | Delete
control: {
[15] Fix | Delete
selector: '.tb_text_wrap'
[16] Fix | Delete
}
[17] Fix | Delete
},
[18] Fix | Delete
{
[19] Fix | Delete
id: 'text_drop_cap',
[20] Fix | Delete
label: 'dropcap',
[21] Fix | Delete
type: 'toggle_switch',
[22] Fix | Delete
options: {
[23] Fix | Delete
on: {
[24] Fix | Delete
name: 'dropcap',
[25] Fix | Delete
value: 'en'
[26] Fix | Delete
},
[27] Fix | Delete
off: {
[28] Fix | Delete
name: '',
[29] Fix | Delete
value: 'dis'
[30] Fix | Delete
}
[31] Fix | Delete
}
[32] Fix | Delete
},
[33] Fix | Delete
{
[34] Fix | Delete
type: 'custom_css_id',
[35] Fix | Delete
custom_css: 'add_css_text'
[36] Fix | Delete
}
[37] Fix | Delete
];
[38] Fix | Delete
}
[39] Fix | Delete
static default() {
[40] Fix | Delete
return {
[41] Fix | Delete
content_text:('<p>'+i18n.txtcont+'</p>')
[42] Fix | Delete
};
[43] Fix | Delete
}
[44] Fix | Delete
static builderSave(settings) {
[45] Fix | Delete
const units=['p_margin_top','p_margin_bottom','dropcap_font_size','dropcap_line_height','d_f_s_h'];
[46] Fix | Delete
for (let i = 6; i>0;--i) {
[47] Fix | Delete
units.push('font_size_h'+i,'f_s_h'+i+'_h','line_height_h'+i,'letter_spacing_h'+i,'h'+i+'_margin_top','h'+i+'_margin_bottom','h'+i+'_margin_top_h','h'+i+'_margin_bottom_h');
[48] Fix | Delete
}
[49] Fix | Delete
for(let bps=api.breakpointsReverse,i=bps.length-1;i>-1;--i){
[50] Fix | Delete
let bp=bps[i];
[51] Fix | Delete
//Image Gradient
[52] Fix | Delete
this.clearImageGradient('background_image','background_color','background_repeat','background_position',bp,settings);
[53] Fix | Delete
this.clearImageGradient('b_i_h','bg_c_h','b_r_h','b_p_h',bp,settings);
[54] Fix | Delete
//Font color
[55] Fix | Delete
this.clearFontColor('font_color_type','font_color','font_gradient_color',bp,settings);
[56] Fix | Delete
this.clearFontColor('f_c_t_h','f_c_h','f_g_c_h',bp,settings);
[57] Fix | Delete
//Text Shadow
[58] Fix | Delete
this.clearShadow('text-shadow',0,bp,settings);
[59] Fix | Delete
this.clearShadow('t_sh_h',0,bp,settings);
[60] Fix | Delete
this.clearShadow('t_sh_m_t',0,bp,settings);
[61] Fix | Delete
this.clearShadow('t_sh_m_t_h',0,bp,settings);
[62] Fix | Delete
this.clearShadow('t_sh_dr',0,bp,settings);
[63] Fix | Delete
this.clearShadow('t_sh_dr_h',0,bp,settings);
[64] Fix | Delete
//paddings
[65] Fix | Delete
this.clearPadding('padding',bp,settings);
[66] Fix | Delete
this.clearPadding('p_h',bp,settings);
[67] Fix | Delete
this.clearPadding('dropcap_padding',bp,settings);
[68] Fix | Delete
this.clearPadding('d_p_h',bp,settings);
[69] Fix | Delete
//margin
[70] Fix | Delete
this.clearPadding('margin',bp,settings);
[71] Fix | Delete
this.clearPadding('m_h',bp,settings);
[72] Fix | Delete
this.clearPadding('dropcap_margin',bp,settings);
[73] Fix | Delete
this.clearPadding('d_m_h',bp,settings);
[74] Fix | Delete
//border-radius
[75] Fix | Delete
this.clearPadding('b_ra',bp,settings);
[76] Fix | Delete
this.clearPadding('r_c_h',bp,settings);
[77] Fix | Delete
this.clearPadding('rc_dp',bp,settings);
[78] Fix | Delete
this.clearPadding('rc_dp_h',bp,settings);
[79] Fix | Delete
//border
[80] Fix | Delete
this.clearBorder('border',bp,settings);
[81] Fix | Delete
this.clearBorder('b_h',bp,settings);
[82] Fix | Delete
this.clearBorder('dropcap_border',bp,settings);
[83] Fix | Delete
this.clearBorder('d_b_h',bp,settings);
[84] Fix | Delete
//filters
[85] Fix | Delete
this.clearFilter('bl_m','css_f',bp,settings);
[86] Fix | Delete
this.clearFilter('_h','css_f_h',bp,settings);
[87] Fix | Delete
//width,height
[88] Fix | Delete
this.clearWidth('w',bp,settings);
[89] Fix | Delete
this.clearWidth('ht',bp,settings,1);
[90] Fix | Delete
//Box Shadow
[91] Fix | Delete
this.clearShadow('b_sh',1,bp,settings);
[92] Fix | Delete
this.clearShadow('sh_h',1,bp,settings);
[93] Fix | Delete
this.clearShadow('sh_dp',1,bp,settings);
[94] Fix | Delete
this.clearShadow('sh_dp_h',1,bp,settings);
[95] Fix | Delete
//position
[96] Fix | Delete
this.clearPosition('po',bp,settings);
[97] Fix | Delete
//transform
[98] Fix | Delete
this.clearTransform('tr',bp,settings);
[99] Fix | Delete
this.clearTransform('tr-h',bp,settings);
[100] Fix | Delete
for(let j=6;j>0;--j){
[101] Fix | Delete
this.clearFontColor('font_color_type_h'+j,'font_color_h'+j,'font_gradient_color_h'+j,bp,settings);
[102] Fix | Delete
this.clearFontColor('f_c_t_h'+j+'_h','f_c_h'+j+'_h','f_g_c_h'+j+'_h',bp,settings);
[103] Fix | Delete
[104] Fix | Delete
this.clearShadow('t_shh'+j,0,bp,settings);
[105] Fix | Delete
this.clearShadow('t_shh'+j+'_h',0,bp,settings);
[106] Fix | Delete
[107] Fix | Delete
//margin
[108] Fix | Delete
this.clearMarginOpposity('h'+j+'_margin_top',bp,settings);
[109] Fix | Delete
this.clearMarginOpposity('h'+j+'_margin_top_h',bp,settings);
[110] Fix | Delete
}
[111] Fix | Delete
[112] Fix | Delete
this.clearUnits(units,bp,settings);
[113] Fix | Delete
}
[114] Fix | Delete
super.builderSave(settings);
[115] Fix | Delete
}
[116] Fix | Delete
getExcerpt(data) {
[117] Fix | Delete
const setting = data || this.get('mod_settings');
[118] Fix | Delete
return api.Helper.limitString(setting.content_text);
[119] Fix | Delete
}
[120] Fix | Delete
preview(data) {
[121] Fix | Delete
let module = createElement(),
[122] Fix | Delete
classes = ['module', 'module-text'],
[123] Fix | Delete
html = data.content_text,
[124] Fix | Delete
constructor=this.constructor,
[125] Fix | Delete
content = constructor._setEditableContent(createElement('','tb_text_wrap'),'content_text','',1);
[126] Fix | Delete
if (data.add_css_text) {
[127] Fix | Delete
classes.push(data.add_css_text);
[128] Fix | Delete
}
[129] Fix | Delete
if (data.text_drop_cap === 'dropcap') {
[130] Fix | Delete
classes.push('tb_text_dropcap');
[131] Fix | Delete
}
[132] Fix | Delete
module.className = classes.join(' ');
[133] Fix | Delete
if (html) {
[134] Fix | Delete
content.innerHTML = this.shortcodeToHTML(html).content.replace(/(<|&lt;)!--more(.*?)?--(>|&gt;)/, '<span class="tb-text-more-link-indicator"><span>');;
[135] Fix | Delete
}
[136] Fix | Delete
if (data.mod_title_text) {
[137] Fix | Delete
module.appendChild(constructor.getModuleTitle(data.mod_title_text,'mod_title_text'));
[138] Fix | Delete
}
[139] Fix | Delete
module.appendChild(content);
[140] Fix | Delete
return module;
[141] Fix | Delete
}
[142] Fix | Delete
};
[143] Fix | Delete
})(tb_app);
[144] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function