I’m building an admin options page for my plugin and using register_settings to setup my validation function. All working fine, but would like a function to define and display an error message in the case of field validation failing. Is there a built-in function in WordPress and if not, what’s the recommended method for doing this?
I’m building an admin options page for my plugin and using register_settings to setup
Share
The answer is to use
add_settings_error(), documentation at http://codex.wordpress.org/Function_Reference/add_settings_error