HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux wordpress-ubuntu-s-2vcpu-4gb-fra1-01 5.4.0-169-generic #187-Ubuntu SMP Thu Nov 23 14:52:28 UTC 2023 x86_64
User: root (0)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/vcz/wp-content/plugins/better-wp-security/core/modules/core/js/admin-notices.js
( function( $, wp, config ) {
	$( function() {
		$( '.itsec-notice .notice-dismiss' ).off( 'click.wp-dismiss-notice' );

		$( document ).on( 'click', '.itsec-notice .notice-dismiss', function( e ) {
			const $this = $( this ),
				$notice = $this.closest( '.itsec-notice' );

			$notice.fadeTo( 100, 0, function() {
				$notice.slideUp( 100 );
			} );

			ajax( $notice, $notice.data( 'close' ) );
		} );

		$( document ).on( 'click', '.itsec-notice [data-action]', function( e ) {
			const $this = $( this ),
				$notice = $this.closest( '.itsec-notice' ),
				action = $this.data( 'action' );

			$this.prop( 'disabled', true );

			ajax( $notice, action ).always( function() {
				$this.prop( 'disabled', false );
			} );
		} );
	} );

	function ajax( $notice, action ) {
		return wp.ajax.post( 'itsec-admin-notice', {
			itsec_action: action,
			notice_id   : $notice.data( 'id' ),
			nonce       : config.nonce,
		} )
			.done( function() {
				if ( $notice.css( 'opacity' ) !== '1' ) {
					if ( $notice.css( 'opacity' ) === '0' ) {
						$notice.remove();
					} else {
						setTimeout( function() {
							$notice.remove();
						}, 100 );
					}
				} else {
					$notice.fadeTo( 100, 0, function() {
						$notice.slideUp( 100, function() {
							$notice.remove();
						} );
					} );
				}
			} )
			.fail( function( response ) {
				if ( response.message ) {
					alert( response.message );
				} else if ( Array.isArray( response ) ) {
					const messages = [];

					for ( let i = 0; i < response.length; i++ ) {
						messages.push( response[ i ].message );
					}

					alert( messages.join( ' ' ) );
				} else {
					alert( 'An unexpected error occurred.' );
				}

				if ( $notice.css( 'opacity' ) !== '1' ) {
					$notice.slideDown( 100, function() {
						$notice.fadeTo( 100, 1 );
					} );
				}
			} );
	}
} )( jQuery, wp, window[ 'ITSECAdminNotices' ] );