HEX
Server: Apache
System: Linux vps.webnoxsoftware.com 4.18.0-553.70.1.el8_10.x86_64 #1 SMP Mon Aug 18 04:41:49 EDT 2025 x86_64
User: microfabengineer (1020)
PHP: 8.3.24
Disabled: NONE
Upload Files
File: /home/microfabengineer/public_html/wp-content/themes/Avada/assets/admin/js/avada-admin-notices.js
/* global avadaAdminNotices, ajaxurl */
( function() {

	jQuery( '.avada-dashboard' ).find( '.wrap > .wp-header-end' ).remove();

	// Shorthand for ready event.
	jQuery( function() {

		// Dimiss notice.
		jQuery( 'div[avada-data-dismissible] button.notice-dismiss' ).on( 'click', function( event ) {
			var $optionName,
				$data,
				$this = jQuery( this );

			event.preventDefault();

			$optionName = $this.parent().attr( 'avada-data-dismissible' );

			$data = {
				action: 'avada_dismiss_admin_notice',
				option_name: $optionName,
				nonce: avadaAdminNotices.nonce
			};

			// Make ajax request.
			jQuery.post( ajaxurl, $data );
		} );

		// Show deprecated template notice on page load.
		if ( 0 < jQuery( '#publish' ).length && 0 < jQuery( '#page_template' ).length ) {
			if ( 'side-navigation.php' === jQuery( '#page_template' ).val() ) {
				jQuery( '<div class="notice notice-error is-dismissible side_nav_deprecated_notice"><p>' + avadaAdminNotices.deprecated_side_nav_teamplate + '</p></div>' ).insertAfter( '#lost-connection-notice' );
			}
		}

		// Show deprecated template notice on template change.
		jQuery( '#page_template' ).on( 'change', function() {
			if ( 'side-navigation.php' === jQuery( '#page_template' ).val() && 1 > jQuery( '.side_nav_deprecated_notice' ).length ) {
				jQuery( '<div class="notice notice-error is-dismissible side_nav_deprecated_notice"><p>' + avadaAdminNotices.deprecated_side_nav_teamplate + '</p></div>' ).insertAfter( '#lost-connection-notice' );
			} else {
				jQuery( '.side_nav_deprecated_notice' ).remove();
			}
		} );
	} );

}( jQuery ) );