# adminify/4.2.22/Inc/Modules/ServerInformation/error-logs.js

Adminify – White Label, Admin Menu Editor, Login Customizer, version 4.2.22. 108 lines.

- Page: https://pluginprobe.com/plugins/adminify/4.2.22/code/Inc/Modules/ServerInformation/error-logs.js
- Raw: https://pluginprobe.com/plugins/adminify/4.2.22/raw/Inc/Modules/ServerInformation/error-logs.js
- Modified: 2026-05-20T13:22:08+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/adminify/4.2.22/code/Inc/Modules/ServerInformation/error-logs.js#L10-L20`.

```javascript
(function ($)
{
	'use strict';

	var WP_Adminify_Error_Logs = {

		// AJAX request: Clear Log Data
		Error_Refresh: function() {

			$( '#adminify_error_log_refresh' ).on(
				'click',
				function (e) {
					e.preventDefault();

					var tempLabel = $( '#adminify_error_log_refresh' ).html();

					$.ajax(
						{
							type: 'POST',
							dataType: 'text',
							async:false,
							url: PXLBSADMINIFY_ERROR_LOGS.ajax_url,
							data: {
								action: 'pxlbsadminify_error_log_content_refresh',
								security: PXLBSADMINIFY_ERROR_LOGS.security_nonce,
								command: 'refresh_error_log',
							},
							beforeSend: function () {
								$( '#adminify_error_log_refresh' ).text( PXLBSADMINIFY_ERROR_LOGS.label_update );
							},
							cache: false,
							success: function (data){
								var refresh_content = $.parseJSON( data );
								// Refresh the textarea content
								$( "textarea#adminify_error_log_area" ).val( refresh_content.file_content );
								// // Change the button text
								$( '#adminify_error_log_refresh' ).html( PXLBSADMINIFY_ERROR_LOGS.label_done );

								// // Set button text to start text
								setTimeout( function () { $( '#adminify_error_log_refresh' ).html( tempLabel ); }, 1500 );
							},
							error: function (data){
								$( '#adminify_error_log_refresh' ).html( 'ERROR' );
							}
						}
					);

				}
			);
		},

		// AJAX request: Clear Log Data
		Error_Clear_Logs: function(){

			$( '#adminify_error_log_clear' ).on(
				'click',
				function (e) {
					e.preventDefault();

					var tempLabel = $( '#adminify_error_log_clear' ).html();

					$.ajax(
						{
							type: 'POST',
							dataType: 'text',
							async:false,
							url: PXLBSADMINIFY_ERROR_LOGS.ajax_url,
							data: {
								action: 'pxlbsadminify_error_log_content_clear',
								security: PXLBSADMINIFY_ERROR_LOGS.security_nonce,
								command: 'clear_error_log',
							},
							beforeSend: function () {
								// Clearing button text
								$( '#adminify_error_log_clear' ).html( PXLBSADMINIFY_ERROR_LOGS.label_clear );
							},
							cache: false,
							success: function (data) {
								// Refresh the textarea content
								$( "textarea#adminify_error_log_area" ).val( data.file_content );

								// Change the button text
								$( '#adminify_error_log_clear' ).html( PXLBSADMINIFY_ERROR_LOGS.label_done );

								// Set button text to start text
								setTimeout( function () { $( '#adminify_error_log_clear' ).html( tempLabel ); }, 1500 );
							},
							error: function (data) {
								$( '#adminify_error_log_clear' ).html( 'ERROR' );
							}
						}
					);

				}
			);
		}
	}

	// Documents Loaded
	$( document ).ready(
		function() {
			WP_Adminify_Error_Logs.Error_Refresh();
			WP_Adminify_Error_Logs.Error_Clear_Logs();
		}
	);

})( jQuery );

```
