Inventory_Presser_Admin_Settings_Suggester::get_admin_notice_html( string $message, string $color )

Creates HTML that renders an admin notice.


Parameters

$message

(string) (Required)

$color

(string) (Required) A value of 'red', 'yellow', or 'green' that appears as a left border on the notice box


Return

(string) HTML that renders an admin notice


Source

File: includes/admin/class-admin-settings-suggester.php

	protected function get_admin_notice_html( $message, $color ) {
		switch ( $color ) {
			case 'red':
				$type = 'error';
				break;
			case 'yellow':
				$type = 'update-nag no-pad';
				break;
			case 'green':
				$type = 'updated';
				break;
		}
		return sprintf(
			'<div class="%s notice"><p><strong>%s</strong></p></div>',
			esc_attr( $type ),
			esc_html( $message )
		);
	}