Codex

Plugin API/Action Reference/admin notices

Description

Notices displayed near the top of admin pages. The hook function should echo a message to be displayed.

Example

function my_admin_notice(){
    echo '<div class="updated">
       <p>Aenean eros ante, porta commodo lacinia.</p>
    </div>';
}
add_action('admin_notices', 'my_admin_notice');

The class "updated" will display the message with a yellow background.

The class "error" will display the message with a red background.

Related

network_admin_notices, user_admin_notices, all_admin_notices