I'm writing a plugin that creates a new sub menu in users. it's called with ...wp-admin/profile.php?page=headshot I everything except one tiny thing that is confusing the heck out of me. I can't get the current user id. I need it so I can name a file with that number.
For testing the plugin, I have some extremely simple code as follows:
It return nothing. So I thought it might need:
I'm new to wordpress, but from what I've read, $user_ID is a global variable. Am I missing something really simple here? Or is there some reason that variable is not available through profile.php (which makes no sense to me).
Help is appreciated.