views:

29

answers:

1

Hi,

Wordpress checks periodically to make sure that the version of Wordpress being used is the most up to date available... If it's not, the latest version number is displayed in the footer and in a notice below the header. Does anyone know the variable/constant/option I can use to get this number?

Thanks.

+1  A: 

$wp_version is the global variable for the currently running version. If you want to check for new versions, use this (only works in admin by default):

$cur = get_preferred_from_update_core();
if($cur !== false && isset($cur->current) && !empty($cur->current)){
  $new_version = $cur->current;
} else {
  $new_version = "You have the latest version of WordPress!";
}
John P Bloch