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/leadin/scripts/feedback
File: ThickBoxModal.ts
import $ from 'jquery';
[0] Fix | Delete
import { domElements } from '../constants/selectors';
[1] Fix | Delete
[2] Fix | Delete
export default class ThickBoxModal {
[3] Fix | Delete
openTriggerSelector: string;
[4] Fix | Delete
inlineContentId: string;
[5] Fix | Delete
windowCssClass: string;
[6] Fix | Delete
contentCssClass: string;
[7] Fix | Delete
[8] Fix | Delete
constructor(
[9] Fix | Delete
openTriggerSelector: string,
[10] Fix | Delete
inlineContentId: string,
[11] Fix | Delete
windowCssClass: string,
[12] Fix | Delete
contentCssClass: string
[13] Fix | Delete
) {
[14] Fix | Delete
this.openTriggerSelector = openTriggerSelector;
[15] Fix | Delete
this.inlineContentId = inlineContentId;
[16] Fix | Delete
this.windowCssClass = windowCssClass;
[17] Fix | Delete
this.contentCssClass = contentCssClass;
[18] Fix | Delete
[19] Fix | Delete
$(openTriggerSelector).on('click', this.init.bind(this));
[20] Fix | Delete
}
[21] Fix | Delete
[22] Fix | Delete
close() {
[23] Fix | Delete
//@ts-expect-error global
[24] Fix | Delete
window.tb_remove();
[25] Fix | Delete
}
[26] Fix | Delete
[27] Fix | Delete
init(e: Event) {
[28] Fix | Delete
//@ts-expect-error global
[29] Fix | Delete
window.tb_show(
[30] Fix | Delete
'',
[31] Fix | Delete
`#TB_inline?inlineId=${this.inlineContentId}&modal=true`
[32] Fix | Delete
);
[33] Fix | Delete
// thickbox doesn't respect the width and height url parameters https://core.trac.wordpress.org/ticket/17249
[34] Fix | Delete
// We override thickboxes css with !important in the css
[35] Fix | Delete
$(domElements.thickboxModalWindow).addClass(this.windowCssClass);
[36] Fix | Delete
[37] Fix | Delete
// have to modify the css of the thickbox content container as well
[38] Fix | Delete
$(domElements.thickboxModalContent).addClass(this.contentCssClass);
[39] Fix | Delete
[40] Fix | Delete
// we unbind previous handlers because a thickbox modal is a single global object.
[41] Fix | Delete
// Everytime it is re-opened, it still has old handlers bound
[42] Fix | Delete
$(domElements.thickboxModalClose)
[43] Fix | Delete
.off('click')
[44] Fix | Delete
.on('click', this.close);
[45] Fix | Delete
[46] Fix | Delete
e.preventDefault();
[47] Fix | Delete
}
[48] Fix | Delete
}
[49] Fix | Delete
[50] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function