From a4698030adc4d44735cc480dc0814a6a28f43ccc Mon Sep 17 00:00:00 2001 From: Ozh Date: Thu, 25 Oct 2012 19:24:01 +0000 Subject: [PATCH] Allow different styles of notice boxes. Fixes issue 1218. git-svn-id: http://yourls.googlecode.com/svn/trunk@787 12232710-3e20-11de-b438-597f59cd7555 --- includes/functions-html.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/functions-html.php b/includes/functions-html.php index 7f16d9f..26bde56 100644 --- a/includes/functions-html.php +++ b/includes/functions-html.php @@ -608,15 +608,15 @@ function yourls_html_menu() { } // Wrapper to admin notices -function yourls_add_notice( $message ) { - $message = yourls_notice_box( $message ); +function yourls_add_notice( $message, $style = 'notice' ) { + $message = yourls_notice_box( $message, $style ); yourls_add_action( 'admin_notices', create_function( '', "echo '$message';" ) ); } // Return a formatted notice -function yourls_notice_box( $message ) { +function yourls_notice_box( $message, $style = 'notice' ) { return << +

$message

HTML; -- 2.45.0