Index: wp-includes/plugin.php
===================================================================
--- wp-includes/plugin.php	(revision 17623)
+++ wp-includes/plugin.php	(working copy)
@@ -772,4 +772,55 @@
 	}
 }
 
+/**
+ * Plugin API Function to add a message in admin_notices using standard formatting.
+ * Plugin author calls this function passes is tthe type ('updated' or 'error') and
+ * the message, which is added to a global array for use by _display_admin_notices
+ * which is hooked into admin_notices and echo's out all notices in the array.
+ *
+ * @package WordPress
+ * @subpackage Plugin
+ * @access public
+ * @link http://core.trac.wordpress.org/ticket/12738
+ *
+ * @global array $admin_notices
+ * @param string $type Identify's the type of message being displayed, should be either 'updated' or 'error'.
+ * @param string $message String to store the message contents, can use HTML.
+ * @return bool True on success, False on fail/error
+*/
+function add_admin_notice($type = 'updated', $message = '') {
+	global $admin_notices;
+	
+	if (strtolower($type) == 'updated' && $message != '') {
+		$admin_notices[] = array('updated', $message);
+		return true;
+	}
+	
+	if (strtolower($type) == 'error' && $message != '') {
+		$admin_notices[] = array ('error', $message);
+		return true;
+	}
+	
+	return false;
+}
+
+/**
+ * Iterates though the global variable $admin_notices to be displayed and echo's
+ * out the notices in the standard formatted output. Executed by admin_notices hook.
+ *
+ * @package WordPress
+ * @subpackage Plugin
+ * @access private
+ * @link http://core.trac.wordpress.org/ticket/12738
+ *
+ * @global array $admin_notices
+*/
+function _display_admin_notices() {
+	global $admin_notices;
+	
+	foreach ((array) $admin_notices as $notice) {
+		echo '<div id="message" class="' . $notice[0] . '"><p>' . $notice[1] . '</p></div>';
+	}
+}
+add_action('admin_notices', '_display_admin_notices');
 ?>
