Change URI query string while processing shortcode
-
During processing of a shortcode, my plugin reacts to a URI query string
?action=1
, changes some state in the database, and includes a status message in the content returned by the shortcode.
When the page is eventually rendered, the browser’s Location bar still contains that query string, as part of the URI.
If the user then refreshes the page, my shortcode processing will again process the query string but now see that the state has already been changed, so include a warning message in the content by the shortcode.
The warning is confusing to the user, so I’m looking for a way to remove that query string, after it has first been processed.
I considered including some javascript which would remove the query string from the URI and reload the page. But the user would then never see the status message included when the query string was originally processed.
Any ideas on removing the query string after it’s been processed?
- The topic ‘Change URI query string while processing shortcode’ is closed to new replies.