Passing php variablesUpdated: October 10th, 2018Created: 10/10/18
In making a widget to show the current user's posts, I had to get the php $current_User->.
This was achieved by
1. adding code to the header so that it was global and could be called from anywhere.
var uid = "<?php echo $current_User->ID; ?>";
url="http://calstock.org.uk/?disp=useritems&user_ID=" + uid;
document.write("<a href=" + url + ">My Posts :: <em>All collections/a>");