robertlove
Member
Posted 2 years ago #
Is there a flash messaging API for creating custom flash messages? For example, a flash message appears when a plugin is activated:
<div class="updated" id="message"><p>Plugin <strong>activated</strong>.</p></div>
How can you modify the message stack? Is there even a message stack?
If not, does anyone have a best-practice hack?
Take a look in http://core.trac.wordpress.org/browser/trunk/wp-admin/admin-header.php#L200
Looks like you'd just have to add an action (to the appropriate hook) that echoes the markup of your message. Doesn't seem to be any tutorials, but it seems simple enough.
Alternatively, if it's your plugin's option page, you can do something similar to http://core.trac.wordpress.org/browser/trunk/wp-admin/update-core.php#L128 where the message is below the heading.