Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • Good question. I think you could get rid of the admin_footer hook if you clear out the errors at the end of your notice handler function. Simplifies things just a bit. Commented May 3, 2011 at 6:54
  • 1
    How are you dealing with repopulating the form fields (with the possible invalid data)? Commented May 3, 2011 at 6:58
  • 1
    I have a basic question. What Wordpress php file is this in? Commented May 26, 2011 at 23:25
  • @Karen This would be in a custom plugin file, or in your functions.php. Commented May 27, 2011 at 4:38
  • I might be missing something obvious, but would it be slightly more efficient to run update_option('my_admin_errors', false); immediately after the if statement at the end of wpse_5102_admin_notice_handler()? Commented Nov 30, 2012 at 22:55