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
/home/sportsfe.../httpdocs/wp-conte.../plugins/custom-t.../js
File: ctf-blocks.js
"use strict";
[0] Fix | Delete
[1] Fix | Delete
(function () {
[2] Fix | Delete
var _wp = wp,
[3] Fix | Delete
_wp$serverSideRender = _wp.serverSideRender,
[4] Fix | Delete
createElement = wp.element.createElement,
[5] Fix | Delete
ServerSideRender = _wp$serverSideRender === void 0 ? wp.components.ServerSideRender : _wp$serverSideRender,
[6] Fix | Delete
_ref = wp.blockEditor || wp.editor,
[7] Fix | Delete
InspectorControls = _ref.InspectorControls,
[8] Fix | Delete
_wp$components = wp.components,
[9] Fix | Delete
TextareaControl = _wp$components.TextareaControl,
[10] Fix | Delete
Button = _wp$components.Button,
[11] Fix | Delete
PanelBody = _wp$components.PanelBody,
[12] Fix | Delete
Placeholder = _wp$components.Placeholder,
[13] Fix | Delete
registerBlockType = wp.blocks.registerBlockType;
[14] Fix | Delete
[15] Fix | Delete
var ctfIcon = createElement('svg', {
[16] Fix | Delete
width: 20,
[17] Fix | Delete
height: 20,
[18] Fix | Delete
viewBox: '0 0 448 512',
[19] Fix | Delete
className: 'dashicon'
[20] Fix | Delete
}, createElement('path', {
[21] Fix | Delete
fill: 'currentColor',
[22] Fix | Delete
d: 'M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z'
[23] Fix | Delete
}));
[24] Fix | Delete
[25] Fix | Delete
registerBlockType('ctf/ctf-feed-block', {
[26] Fix | Delete
title: 'Twitter Feed',
[27] Fix | Delete
icon: ctfIcon,
[28] Fix | Delete
category: 'widgets',
[29] Fix | Delete
attributes: {
[30] Fix | Delete
noNewChanges: {
[31] Fix | Delete
type: 'boolean',
[32] Fix | Delete
},
[33] Fix | Delete
shortcodeSettings: {
[34] Fix | Delete
type: 'string',
[35] Fix | Delete
},
[36] Fix | Delete
executed: {
[37] Fix | Delete
type: 'boolean'
[38] Fix | Delete
}
[39] Fix | Delete
},
[40] Fix | Delete
edit: function edit(props) {
[41] Fix | Delete
var _props = props,
[42] Fix | Delete
setAttributes = _props.setAttributes,
[43] Fix | Delete
_props$attributes = _props.attributes,
[44] Fix | Delete
_props$attributes$sho = _props$attributes.shortcodeSettings,
[45] Fix | Delete
shortcodeSettings = _props$attributes$sho === void 0 ? ctf_block_editor.shortcodeSettings : _props$attributes$sho,
[46] Fix | Delete
_props$attributes$cli = _props$attributes.noNewChanges,
[47] Fix | Delete
noNewChanges = _props$attributes$cli === void 0 ? true : _props$attributes$cli,
[48] Fix | Delete
_props$attributes$exe = _props$attributes.executed,
[49] Fix | Delete
executed = _props$attributes$exe === void 0 ? false : _props$attributes$exe;
[50] Fix | Delete
[51] Fix | Delete
function setState(shortcodeSettingsContent) {
[52] Fix | Delete
setAttributes({
[53] Fix | Delete
noNewChanges: false,
[54] Fix | Delete
shortcodeSettings: shortcodeSettingsContent
[55] Fix | Delete
});
[56] Fix | Delete
}
[57] Fix | Delete
[58] Fix | Delete
function previewClick(content) {
[59] Fix | Delete
setAttributes({
[60] Fix | Delete
noNewChanges: true,
[61] Fix | Delete
executed: false,
[62] Fix | Delete
});
[63] Fix | Delete
}
[64] Fix | Delete
function afterRender() {
[65] Fix | Delete
// no way to run a script after AJAX call to get feed so we just try to execute it on a few intervals
[66] Fix | Delete
if (! executed
[67] Fix | Delete
|| typeof window.ctfGB === 'undefined') {
[68] Fix | Delete
window.ctfGB = true;
[69] Fix | Delete
setTimeout(function() { if (typeof ctf_init !== 'undefined') {ctf_init();}},1000);
[70] Fix | Delete
setTimeout(function() { if (typeof ctf_init !== 'undefined') {ctf_init();}},2000);
[71] Fix | Delete
setTimeout(function() { if (typeof ctf_init !== 'undefined') {ctf_init();}},3000);
[72] Fix | Delete
setTimeout(function() { if (typeof ctf_init !== 'undefined') {ctf_init();}},5000);
[73] Fix | Delete
setTimeout(function() { if (typeof ctf_init !== 'undefined') {ctf_init();}},10000);
[74] Fix | Delete
}
[75] Fix | Delete
setAttributes({
[76] Fix | Delete
executed: true,
[77] Fix | Delete
});
[78] Fix | Delete
}
[79] Fix | Delete
[80] Fix | Delete
var jsx = [React.createElement(InspectorControls, {
[81] Fix | Delete
key: "ctf-gutenberg-setting-selector-inspector-controls"
[82] Fix | Delete
}, React.createElement(PanelBody, {
[83] Fix | Delete
title: ctf_block_editor.i18n.addSettings
[84] Fix | Delete
}, React.createElement(TextareaControl, {
[85] Fix | Delete
key: "ctf-gutenberg-settings",
[86] Fix | Delete
className: "ctf-gutenberg-settings",
[87] Fix | Delete
label: ctf_block_editor.i18n.shortcodeSettings,
[88] Fix | Delete
help: ctf_block_editor.i18n.example + ": 'screenname=\"smashballoon\" showbutton=\"true\"'",
[89] Fix | Delete
value: shortcodeSettings,
[90] Fix | Delete
onChange: setState
[91] Fix | Delete
}), React.createElement(Button, {
[92] Fix | Delete
key: "ctf-gutenberg-preview",
[93] Fix | Delete
className: "ctf-gutenberg-preview",
[94] Fix | Delete
onClick: previewClick,
[95] Fix | Delete
isDefault: true
[96] Fix | Delete
}, ctf_block_editor.i18n.preview)))];
[97] Fix | Delete
[98] Fix | Delete
if (noNewChanges) {
[99] Fix | Delete
afterRender();
[100] Fix | Delete
jsx.push(React.createElement(ServerSideRender, {
[101] Fix | Delete
key: "custom-twitter-feeds/custom-twitter-feeds",
[102] Fix | Delete
block: "ctf/ctf-feed-block",
[103] Fix | Delete
attributes: props.attributes,
[104] Fix | Delete
}));
[105] Fix | Delete
} else {
[106] Fix | Delete
props.attributes.noNewChanges = false;
[107] Fix | Delete
jsx.push(React.createElement(Placeholder, {
[108] Fix | Delete
key: "ctf-gutenberg-setting-selector-select-wrap",
[109] Fix | Delete
className: "ctf-gutenberg-setting-selector-select-wrap"
[110] Fix | Delete
}, React.createElement(Button, {
[111] Fix | Delete
key: "ctf-gutenberg-preview",
[112] Fix | Delete
className: "ctf-gutenberg-preview",
[113] Fix | Delete
onClick: previewClick,
[114] Fix | Delete
isDefault: true
[115] Fix | Delete
}, ctf_block_editor.i18n.preview)));
[116] Fix | Delete
}
[117] Fix | Delete
[118] Fix | Delete
return jsx;
[119] Fix | Delete
},
[120] Fix | Delete
save: function save() {
[121] Fix | Delete
return null;
[122] Fix | Delete
}
[123] Fix | Delete
});
[124] Fix | Delete
})();
[125] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function