Support » Plugins » Unset $_GET-variables after action is done

  • I’ve made a plugin to display a random profile image in my sidebar. In my option panel I’ve made a page where the user can upload a photo and also delete existing images.
    The deletion of images sends parameters via $_GET, but after the deletion I’d like to send the user back to the plugin page without the get-variables in the url (this causes an error, since the file is already deleted).

    How can I solve this?
    I tried with headers, but the admin page sends output before my page is loaded.

Viewing 1 replies (of 1 total)
  • You should check out WordPress’s remove_query_arg function, which allows you to specify a $_GET parameter to remove. You could pass the server request variable through it to get your result.

Viewing 1 replies (of 1 total)
  • The topic ‘Unset $_GET-variables after action is done’ is closed to new replies.