blob: e91ac1c00cc5cbc41b4549390779a29d80eb770f (
plain)
1
2
3
4
5
6
7
8
9
10
|
function WMP_UPGRADE_NOTICE(){var t=this;this.changingStatus=!1,this.init=function(){this.addButtonsActions()},this.addButtonsActions=function(){var n=jQuery(".wmp_upgrade_notice .notice-dismiss");n.length>0&&n.on("click",function(){1!=t.changingStatus&&(t.changingStatus=!0,jQuery.post(ajaxurl,{action:"wmp_settings_save",wmp_option_upgrade_notice_updated:0},function(n){t.changingStatus=!1}))})}}
// normally this part will be added in the html document using JSInterface, but this notice can appear outside the admin pages
if (window.WMPJSInterface && window.WMPJSInterface != null){
jQuery(document).ready(function(){
var WMP_UI_upgradenotice = new WMP_UPGRADE_NOTICE();
WMP_UI_upgradenotice.init();
});
}
|