Show an urgent message in the WordPress admin panel


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. function showMessage($message, $errormsg = false)
  2. {
  3. if ($errormsg) {
  4. echo '<div id="message" class="error">';
  5. }
  6. else {
  7. echo '<div id="message" class="updated fade">';
  8. }
  9. echo "<p><strong>$message</strong></p></div>";
  10. }
  11.  
  12. function showAdminMessages()
  13. {
  14. showMessage("Working on Theme's function.php, Do not touch it till further notice.", true);
  15. }
  16. add_action('admin_notices', 'showAdminMessages');

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.