HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: /var/www/html/shootinschool/wp-content/themes/storefront/assets/js/admin/admin.js
/* global ajaxurl, storefrontNUX */
( function ( wp, $ ) {
	'use strict';

	if ( ! wp ) {
		return;
	}

	/*
	 * Ajax request that will hide the Storefront NUX admin notice or message.
	 */
	function dismissNux() {
		$.ajax( {
			type: 'POST',
			url: ajaxurl,
			data: {
				nonce: storefrontNUX.nonce,
				action: 'storefront_dismiss_notice',
			},
			dataType: 'json',
		} );
	}

	$( function () {
		// Dismiss notice
		$( document ).on(
			'click',
			'.sf-notice-nux .notice-dismiss',
			function () {
				dismissNux();
			}
		);

		// Dismiss notice inside theme page.
		$( document ).on( 'click', '.sf-nux-dismiss-button', function () {
			dismissNux();
			$( '.storefront-intro-setup' ).hide();
			$( '.storefront-intro-message' ).fadeIn( 'slow' );
		} );
	} );
} )( window.wp, jQuery );