👁 查看:license-reminder.js
路径:/home/forge/kingkrunch.com/wp/wp-content/plugins/simple-history/js/license-reminder.js
大小:571 B · 修改:2026-09-25 00:42:29 · 权限:0644 · 可写
/* global simpleHistoryLicenseReminder */

jQuery( document ).ready( function ( $ ) {
	$( document ).on( 'click', '.sh-LicenseReminder-dismiss', function ( e ) {
		e.preventDefault();

		const $card = $( this ).closest( '.sh-LicenseReminder' );

		$.post( simpleHistoryLicenseReminder.ajaxurl, {
			action: simpleHistoryLicenseReminder.action,
			nonce: simpleHistoryLicenseReminder.nonce,
		} )
			.done( function ( response ) {
				if ( response && response.success ) {
					$card.fadeOut();
				}
			} )
			.fail( function () {
				$card.fadeOut();
			} );
	} );
} );