# wpdirectorykit/1.3.4/vendor/WordPress-Importer/class-logger-html.php

WP Directory Kit, version 1.3.4. 37 lines.

- Page: https://pluginprobe.com/plugins/wpdirectorykit/1.3.4/code/vendor/WordPress-Importer/class-logger-html.php
- Raw: https://pluginprobe.com/plugins/wpdirectorykit/1.3.4/raw/vendor/WordPress-Importer/class-logger-html.php
- Modified: 2024-06-20T21:53:40+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/wpdirectorykit/1.3.4/code/vendor/WordPress-Importer/class-logger-html.php#L10-L20`.

```php
<?php

class WP_Importer_Logger_HTML extends WP_Importer_Logger {
	/**
	 * Logs with an arbitrary level.
	 *
	 * @param mixed $level
	 * @param string $message
	 * @param array $context
	 * @return null
	 */
	public function log( $level, $message, array $context = array() ) {
		switch ( $level ) {
			case 'emergency':
			case 'alert':
			case 'critical':
				echo '<p><strong>' . __( 'Sorry, there has been an error.', 'wordpress-importer' ) . '</strong><br />';
				echo esc_html( $message );
				echo '</p>';
				break;

			case 'error':
			case 'warning':
			case 'notice':
			case 'info':
				echo '<p>' . esc_html( $message ) . '</p>';
				break;

			case 'debug':
				if ( defined( 'IMPORT_DEBUG' ) && IMPORT_DEBUG ) {
					echo '<p class="debug">' . esc_html( $message ) . '</p>';
				}
				break;
		}
	}
}

```
