← Back
Editing: gdcoreAjax.js
jQuery("body").on( "click", 'li#wp-admin-bar-core_settings_1 .ab-item', function() { var data = { action: 'core_flush_cache', security : core_cache_control.security }; // since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php jQuery.post(core_cache_control.ajaxurl, data, function(response, err) { if(response){ if(window.location.href.slice(0, -1).includes("?")){ window.location = window.location.href.slice(0, -1) + "&" + response.slice(25); }else{ window.location = window.location.href.slice(0, -1) + response.slice(24); } }else{ console.log('failed clearing MWP cache. Error: ', err); } }); });
Save File
Cancel