This is a question about a plugin.
A form to search the database works. What I am trying to do is have the search term reload into the form input field when returning search results. The problem is strange and appears to be something to do with
I am setting a variable
$search_url = site_url( 'wp-admin/admin.php?page=my-plugin&action=search&searchstringSO=' . $_REQUEST["sigsearch"] ); which is the URL that is loaded with my results. Note the
SO at the end of the key, that is a debug flag so I know I am looking at the right URL - I am.
The resulting URL is
https://example.com/wp-admin/admin.php?page=my-plugin&action=search&searchstringSO&_wpnonce=8664768fcc notice the
= and the search string are missing.
I am pretty good at trouble shooting and can't find where it is being stripped.
Things I have tried:
- displaying the value of
$_REQUEST["sigsearch"]right before creating the
$search_urlvariable - it works
- loading the URL string into it's own variable (which works) and then passing that to
&dummy=0at the end - that also works
For some reason the querystring value (which is nothing more than a text string) plus the
= are stripped out of the URL.
Is this a quirk of
site_url() or am I missing something obvious?