initial
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
/* global jQuery, ajaxurl */
|
||||
|
||||
import 'scripts/relative-time-element';
|
||||
|
||||
jQuery( document ).ready( function ( $ ) {
|
||||
$( document ).on( 'click', '.vrts-notice .notice-dismiss', ( event ) => {
|
||||
if ( ajaxurl ) {
|
||||
const nonce =
|
||||
event.target.parentElement.querySelector( '#_wpnonce' ).value;
|
||||
const view = event.target.parentElement.dataset.view;
|
||||
|
||||
const data = {
|
||||
action: 'vrts_admin_notice_dismiss',
|
||||
url: ajaxurl,
|
||||
security: nonce,
|
||||
view,
|
||||
};
|
||||
|
||||
$.ajax( {
|
||||
type: 'POST',
|
||||
url: ajaxurl,
|
||||
data,
|
||||
} );
|
||||
}
|
||||
} );
|
||||
} );
|
||||
Reference in New Issue
Block a user