# learnpress/4.1.7.1/inc/admin/views/admin-notice.php

LearnPress – WordPress LMS Plugin for Create and Sell Online Courses, version 4.1.7.1. 34 lines.

- Page: https://pluginprobe.com/plugins/learnpress/4.1.7.1/code/inc/admin/views/admin-notice.php
- Raw: https://pluginprobe.com/plugins/learnpress/4.1.7.1/raw/inc/admin/views/admin-notice.php
- Modified: 2022-09-15T05:24:36+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/learnpress/4.1.7.1/code/inc/admin/views/admin-notice.php#L10-L20`.

```php
<?php
/**
 * Template for display a notice in admin
 */

defined( 'ABSPATH' ) || exit;

if ( ! isset( $message ) ) {
	return;
}

if ( ! isset( $type ) ) {
	$type = 'success';
}

if ( ! isset( $dismissible ) ) {
	$dismissible = true;
}

if ( strpos( $type, 'notice-' ) === false ) {
	$type = "notice-{$type}";
}

$classes = array( 'lp-notice', 'notice', $type );
?>

<div id="<?php echo esc_attr( $id ?? '' ); ?>" class="<?php echo esc_attr( implode( ' ', $classes ) ); ?>">
	<p><?php echo esc_html( $message ); ?></p>

	<?php if ( $dismissible ) : ?>
		<button class="notice-dismiss" data-dismiss-notice="<?php echo esc_attr( $id ?? '' ); ?>"></button>
	<?php endif; ?>
</div>

```
