HEX
Server: Apache/2.4.41
System: Linux mainweb 5.4.0-182-generic #202-Ubuntu SMP Fri Apr 26 12:29:36 UTC 2024 x86_64
User: nationalmedicaregrp (1119)
PHP: 8.3.7
Disabled: exec,passthru,shell_exec,system,popen,proc_open,pcntl_exec
Upload Files
File: /home/commandofl/public_html/wp-content/themes/hestia/assets/js/admin/customizer-notices-handler.js
/* global dismissNotices */

/**
 * Handle notice dismiss in customizer.
 */
jQuery( function ( $ ) {
	$( document ).on( 'click', '.hestia-notice .notice-dismiss', function () {
		var control_id = $( this ).closest('li').attr( 'id' ).replace( 'accordion-section-', '' );
		$.ajax( {
			url: dismissNotices.ajaxurl,
			type: 'POST',
			data: {
				action: 'dismissed_notice_handler',
				control: control_id
			},
			success: function () {
				$( '#accordion-section-' + control_id ).fadeOut( 300, function () {
					if ( 'function' === typeof wp.customize ) {
						wp.customize.section.remove( control_id );
					} else {
						$( this ).remove();
					}
				} );
			}
		} );
	} );
} );