When someone logs into the wordpress dashboard I want the Pro version of my plugin to check for the latest version of itself on a remote (my) server. All it retrieves is the most recent version number.
function plugin_version_check() {
global $latestversion
$latestversion = (something);
return $latestversion;
}
do_action('wp_login', 'plugin_version_check');
so far so good, it works.
Then I would expect the value of $latestversion to be available elsewhere, but it isn't
function dk_plugin_meta_links( $links, $file ) {
//use the value of $latestversion here
}
add_filter( 'plugin_row_meta', 'dk_plugin_meta_links', 10, 2 );
Without success I have also tried
function dk_plugin_meta_links( $links, $file, $latestversion ) {
(including changing the accepted args to 3)
which I would expect to work since $latestversion is a global variable, right?
Looking for solutions I have gone in circles and gotten ridiculously confused. How do I do this?