Inventory_Presser_Admin_Settings_Suggester::get_admin_notice_html( string $message, string $color )
Creates HTML that renders an admin notice.
Contents
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
Return Return
(string) HTML that renders an admin notice
Source 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>', $type, $message ); }
Expand full source code Collapse full source code View on Github