WordPress.org

Ready to get started?Download WordPress

Forums

Error reporting API? (3 posts)

  1. Sebastian
    Member
    Posted 10 months 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
    Member
    Posted 9 months ago #

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

  3. Timothy Jacobs
    Member
    Posted 9 months ago #

    You can use the admin notice hook.

Reply

You must log in to post.

About this Topic