Initial Commit

This commit is contained in:
David Stone
2024-11-30 18:24:12 -07:00
commit e8f7955c1c
5432 changed files with 1397750 additions and 0 deletions

View File

@ -0,0 +1,43 @@
(function($) {
$(document).ready(function() {
/**
* Prevent notices from jumping around.
*/
$('.notice.wu-hidden').removeClass('wu-hidden');
/**
* Dismisses a WP Ultimo notice
*
* When a notice is dismissable, we save the key of that notice after the dismiss
* button is clicked to avoid showing that notice again for that customer in the future.
*/
$('.notice.wu-admin-notice').on('click', '.notice-dismiss', function(e) {
e.preventDefault();
const $this = $(this);
const $notice = $this.parents('.notice');
if ($notice.find('[name="notice_id"]').val()) {
$.ajax({
method: 'post',
// eslint-disable-next-line no-undef
url: ajaxurl,
data: {
action: 'wu_dismiss_admin_notice',
nonce: $notice.find('[name="nonce"]').val(),
notice_id: $notice.find('[name="notice_id"]').val(),
},
});
} // end if;
});
});
}(jQuery));