: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
jQuery(document).ready(function($){
$('.ampforwp-activation-call-module-upgrade').click(function(e){
if(pagenow == 'toplevel_page_amp_options' && $(this).hasClass('ampforwp-activation-call-module-upgrade')){// Check for current page
var nonce = self.attr('data-secure');
self.addClass('updating-message');
var currentId = self.attr('id');
var adsforwp_is_active = "";
var adsforwp_act_url = "";
if(currentId=='ampforwp-pwa-activation-call'){
activate = '&activate=pwa';
}else if(currentId=='ampforwp-structure-data-activation-call'){
activate = '&activate=structure_data';
}else if(currentId=='ampforwp-adsforwp-activation-call'){
activate = '&activate=adsforwp';
adsforwp_is_active = $(".ampforwp-activation-url").attr('id');
adsforwp_act_url = $(".ampforwp-activation-url").val();
}else if(currentId=='ampforwp-wp-quads-activation-call'){
activate = '&activate=wp_quads';
}else if(currentId=='ampforwp-page-booster-activation-call'){
activate = '&activate=cwvpsb';
self.text( wp.updates.l10n.installing );
self.text( 'Installing...' );
data: 'action=ampforwp_enable_modules_upgread'+activate+'&verify_nonce='+nonce,
success: function (response){
if(response.status==200){
if(currentId=='ampforwp-adsforwp-activation-call'){
if(adsforwp_is_active=='not-exist'){
wp.updates.installPlugin(
success: function(pluginresponse){
//wp.updates.installPluginSuccess(pluginresponse);
wpActivateModulesUpgrage(pluginresponse.activateUrl, self, response, nonce)
wpActivateModulesUpgrage(adsforwp_act_url, self, response, nonce)
wp.updates.installPlugin(
success: function(pluginresponse){
//wp.updates.installPluginSuccess(pluginresponse);
wpActivateModulesUpgrage(pluginresponse.activateUrl, self, response, nonce)
})//ajaxComplete(wpActivateModulesUpgrage(response.path, self, response));
$('.ampforwp-activation-plugin').click(function(e){
if(pagenow == 'toplevel_page_amp_options' && $(this).hasClass('ampforwp-activation-plugin')){// Check for current page
self.addClass('updating-message');
var currentId = self.attr('id');
if(currentId=='ampforwp-page-booster-activate'){
msgplug = 'Core Web Vitals Page Booster';
response = '?page=cwvpsb';
}else if(currentId=='ampforwp-structured-data-activate'){
msgplug = 'Schema & Structured Data';
response = '?page=structured_data_options';
}else if(currentId=='ampforwp-pwa-activate'){
response = '?page=pwaforwp';
var activateUrl = self.attr('data-href');
self.text( 'Activating...' );
self.removeClass('updating-message')
self.html('<a href="'+response+'" style="text-decoration: none;color: #fff;">Activated! - Let\'s Go to '+msgplug+' Settings</a>')
self.removeClass('ampforwp-activation-plugin');
error: function (jqXHR, exception) {
if (jqXHR.status === 0) {
msg = 'Not connect.\n Verify Network.';
} else if (jqXHR.status === 404) {
msg = 'Requested page not found. [404]';
} else if (jqXHR.status === 500) {
msg = 'Internal Server Error [500].';
} else if (exception === 'parsererror') {
msg = 'Requested JSON parse failed.';
} else if (exception === 'timeout') {
} else if (exception === 'abort') {
msg = 'Ajax request aborted.';
msg = 'Uncaught Error.\n' + jqXHR.responseText;
var wpActivateModulesUpgrage = function(url, self, response, nonce){
if (typeof url === 'undefined' || !url) {
self.text( 'Activating...' );
self.removeClass('updating-message')
if(self.attr('id')=='ampforwp-pwa-activation-call'){
self.html('<a href="'+response.redirect_url+'" style="text-decoration: none;color: #555;">Installed! - Let\'s Go to '+msgplug+' Settings</a>')
self.removeClass('ampforwp-activation-call-module-upgrade');
}else if(self.attr('id')=='ampforwp-structure-data-activation-call'){
msgplug = 'Structure Data';
self.text( 'Importing data...' );
data: 'action=ampforwp_import_modules_scema&verify_nonce='+nonce,
self.html('<a href="'+response.redirect_url+'" style="text-decoration: none;color: #555;">Installed! - Let\'s Go to '+msgplug+' Settings</a>')
self.removeClass('ampforwp-activation-call-module-upgrade');
}else if(self.attr('id')=='ampforwp-adsforwp-activation-call'){
self.text( 'Importing data...' );
data: 'action=ampforwp_import_modules_ads&verify_nonce='+nonce,
self.html('<a href="'+response.redirect_url+'" style="text-decoration: none;">Go to Ads Settings</a>')
self.removeClass('ampforwp-activation-call-module-upgrade');
}else if(self.attr('id')=='ampforwp-wp-quads-activation-call'){
self.html('<a href="'+response.redirect_url+'">Installed! - Let\'s Go to '+msgplug+' Settings</a>')
self.removeClass('ampforwp-activation-call-module-upgrade');
}else if(self.attr('id')=='ampforwp-page-booster-activation-call'){
msgplug = 'Core Web Vitals Page Booster';
self.html('<a href="'+response.redirect_url+'" style="text-decoration: none;color: #fff;">Installed! - Let\'s Go to '+msgplug+' Settings</a>')
self.removeClass('ampforwp-activation-call-module-upgrade');
error: function (jqXHR, exception) {
if (jqXHR.status === 0) {
msg = 'Not connect.\n Verify Network.';
} else if (jqXHR.status === 404) {
msg = 'Requested page not found. [404]';
} else if (jqXHR.status === 500) {
msg = 'Internal Server Error [500].';
} else if (exception === 'parsererror') {
msg = 'Requested JSON parse failed.';
} else if (exception === 'timeout') {
} else if (exception === 'abort') {
msg = 'Ajax request aborted.';
msg = 'Uncaught Error.\n' + jqXHR.responseText;
});//(document).ready Closed