public static function show()
{
// Check for notices
$notices = self::get_user_meta(get_current_user_id(), self::KEY);
if (empty($notices)) {
return;
}
// Show the notices
foreach ($notices as $notice) {
if (!empty($notice['message'])) {
$type = isset($notice['type']) ? $notice['type'] : 'updated';
self::show_notice($notice['message'], $type);
}
}
// Clear the notice
self::delete_user_meta(get_current_user_id(), self::KEY);
}