Created
August 4, 2013 02:57
-
-
Save jentanbernardus/6148906 to your computer and use it in GitHub Desktop.
WordPress Functions: Show error message in dashboard
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function showMessage($message, $errormsg = false) | |
{ | |
if ($errormsg) { | |
echo ' | |
<div id="message" class="error">'; | |
} | |
else { | |
echo ' | |
<div id="message" class="updated fade">'; | |
} | |
echo " | |
<strong>$message</strong> | |
</div> | |
"; | |
} | |
function showAdminMessages() | |
{ | |
showMessage("Welcome to the new WordPress theme.", true); | |
} | |
add_action('admin_notices', 'showAdminMessages'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment