WordPress.org

Forums

Flash Messaging API (2 posts)

  1. 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?

  2. WraithKenny
    Member
    Posted 2 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic