: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
genericText: ctf_about.genericText,
extentions_bundle: ctf_about.extentions_bundle,
supportPageUrl: ctf_about.supportPageUrl,
plugins: ctf_about.pluginsInfo,
socialWallActivated: ctf_about.socialWallActivated,
socialWallLinks: ctf_about.socialWallLinks,
recommendedPlugins: ctf_about.recommendedPlugins,
social_wall: ctf_about.social_wall,
aboutBox: ctf_about.aboutBox,
ajax_handler: ctf_about.ajax_handler,
buttons: ctf_about.buttons,
activatePlugin: function( plugin, name, index, type ) {
this.btnClicked = index + 1;
this.btnStatus = 'loading';
let data = new FormData();
data.append( 'action', 'ctf_activate_addon' );
data.append( 'nonce', this.nonce );
data.append( 'plugin', plugin );
data.append( 'type', 'plugin' );
if ( this.extentions_bundle && type == 'extension' ) {
data.append( 'extensions_bundle', this.extentions_bundle );
fetch(this.ajax_handler, {
credentials: 'same-origin',
.then(response => response.json())
if( data.success == true ) {
if ( name === 'social_wall' ) {
this.social_wall.activated = true;
} else if ( type === 'recommended_plugin' ) {
this.recommendedPlugins[name].activated = true;
this.plugins[name].activated = true;
deactivatePlugin: function( plugin, name, index, type ) {
this.btnClicked = index + 1;
this.btnStatus = 'loading';
let data = new FormData();
data.append( 'action', 'ctf_deactivate_addon' );
data.append( 'nonce', this.nonce );
data.append( 'plugin', plugin );
data.append( 'type', 'plugin' );
if ( this.extentions_bundle && type == 'extension' ) {
data.append( 'extensions_bundle', this.extentions_bundle );
fetch(this.ajax_handler, {
credentials: 'same-origin',
.then(response => response.json())
if( data.success == true ) {
if ( name === 'social_wall' ) {
this.social_wall.activated = false;
} else if ( type === 'recommended_plugin' ) {
this.recommendedPlugins[name].activated = false;
this.plugins[name].activated = false;
installPlugin: function( plugin, name, index, type ) {
this.btnClicked = index + 1;
this.btnStatus = 'loading';
let data = new FormData();
data.append( 'action', 'ctf_install_addon' );
data.append( 'nonce', this.nonce );
data.append( 'plugin', plugin );
data.append( 'type', 'plugin' );
fetch(this.ajax_handler, {
credentials: 'same-origin',
.then(response => response.json())
if( data.success == true ) {
if ( type === 'recommended_plugin' ) {
this.recommendedPlugins[name].installed = true;
this.recommendedPlugins[name].activated = true;
this.plugins[name].installed = true;
this.plugins[name].activated = true;
if ( this.btnStatus == 'loading' ) {
return this.icons.loaderSVG
* Toggle Sticky Widget view
toggleStickyWidget: function() {
this.stickyWidget = !this.stickyWidget;