I've developed a few plugin for Wordpress. Currently I've not been able to replicate the way wp save settings. I've a setting page which I learned from a tutorial. It POST to
option.php, and wp take care of saving the data.
Currently I use GET with
add_query_arg(), the url will display the data that I passed. Using POST will trigger a redirect prompt when refreshed.
Is there a built in wp function that does it automatically? OR If I were to POST to
option.php, how should I access the data without it handling automatically?
EDIT: Example of one of the complex page would be like this:
I assign a usermeta to some users which we would call SU (SpecialUser). To ease the job of admin, I have a page to display the list of users with a column showing whether they are SU. The text in that column of each row is a link which if clicked, will toggle the state of SU for that user. Currently I use GET, to pass the id of the user and also action to be carried out. Then page itself will detect, if both action and id is valid, the state of the user is toggled. At the same time, the updated result is displayed. The GET query remain at the URL
Sorry for the long explaination. I'm sure there's a term to what I wanted to do, but I'm not sure what it is.
EDIT: It's more or less like the Plugin page, when you activate/deactivate the plugin. The plugin page is using GET. The problem I have is actually redirecting, so GET or POST shouldn't matter.