I've written a custom plugin. When page-a on my site is loaded:
- My plugin's main PHP prepares data to send to the page. During execution fo this file, a PHP variable is defined and assigned a value (
- During page load, an AJAX call is made back to my server, which executes a custom PHP callback function.
I would like the PHP callback function to know the value of
$myvar. Is this possible? If so, is it advisable, or is it perhaps non-standard and/or risky?
wp_localize_script()), then send that same value back to the server during the AJAX call. But this seems inefficient, especially since in this case, the browser does not need to know the value of
I should say that I have alternative methods of accomplishing what I want, which seem safe and viable. In short, I might be able to simply set the value of