Error reporting API? (3 posts)

  1. Sebastian
    Posted 2 years ago #

    In my plugin, I want to notify the admin of wrong settings or problems. So for example, if the admin submits the settings form, I check the input and want to inform him about values being wrong. However, it seems I have to come up with some custom code to keep track of the error message while processing the form.

    This is a bit surprising, because e.g. in Drupal you have a simple
    set_message() function allowing to set a message, which is shown in a certain div on the page.

    Am I just missing something or does something simple really not exist in WordPress?

  2. bcworkz
    Posted 2 years ago #

    It's not that simple, but perhaps you did miss Class_Reference/WP_Error.

  3. Timothy Jacobs
    Posted 2 years ago #

    You can use the admin notice hook.

Topic Closed

This topic has been closed to new replies.

About this Topic