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

get_admin_notice_html


Description Description

Creates HTML that renders an admin notice.


Top ↑

Parameters Parameters

$message

(string) (Required)

$color

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


Top ↑

Return Return

(string) HTML that renders an admin notice


Top ↑

Source Source

File: includes/class-settings-suggester.php

	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>',
			$type,
			__( $message, 'inventory-presser' )
		);
	}