Skip to content
Snippets Groups Projects

feature(ajax): added nonce

Merged Grzegorz Rola requested to merge feature/dismiss-nonce into master

Files

+ 5
2
jQuery( document ).on( 'click', '.notice-dismiss', function() {
var notice_name = jQuery(this).closest('div.notice').data('notice-name');
var source = jQuery(this).closest('div.notice').data('source');
const $notice_div= jQuery(this).closest('div.notice');
const notice_name = $notice_div.data('notice-name');
const source = $notice_div.data('source');
const security = $notice_div.data('security');
if ('' !== notice_name) {
jQuery.ajax({
url: ajaxurl,
type: 'post',
data: {
security: security,
action: 'wpdesk_notice_dismiss',
notice_name: notice_name,
source: source,
Loading