Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

LLMS_Admin_Page_Status::output_logs_content()

Output the HTML for the Logs tab


Return Return

(void)


Top ↑

Source Source

File: includes/admin/class.llms.admin.page.status.php

	private static function output_logs_content() {

		$logs        = self::get_logs();
		$date_format = get_option( 'date_format' ) . ' ' . get_option( 'time_format' );

		$current = sanitize_title( llms_filter_input_sanitize_string( INPUT_POST, 'llms_log_file' ) );

		if ( $logs && ! $current ) {
			$log_keys = array_keys( $logs );
			$current  = array_shift( $log_keys );
		}

		if ( $logs ) {

			// Nonce URL to delete a log file.
			$delete_url = 'debug-log' === $current ? '' : wp_nonce_url(
				add_query_arg(
					array(
						'llms_delete_log' => $current,
					),
					self::get_url( 'logs' )
				),
				'delete_log'
			);

			include_once 'views/status/view-log.php';

		} else {
			echo '<div class="llms-log-viewer">' . __( 'There are currently no logs to view.', 'lifterlms' ) . '</div>';
		}

	}


Top ↑

Changelog Changelog

Changelog
Version Description
5.9.0 Stop using deprecated FILTER_SANITIZE_STRING.
3.37.14 Moved HTML output to the view file located at includes/admin/views/status/view-log.php.
3.33.2 Fix undefined variable notice.
3.33.1 Use llms_filter_input to read current log file.
3.11.2 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.