[wp-hackers] how to use wp_version_check() function?

Otto otto at ottodestruct.com
Mon Sep 14 19:46:38 UTC 2009

wp_version_check() performs the version check, and then sets the
update_core transient if there's a new version. It doesn't return
anything of value.

Basically, WordPress checks for updates all by itself. All you have to
do is to do a get_transient( 'update_core' ) and then, when it
changes, it'll have information about a new version in it which you
can use to send the email.


On Mon, Sep 14, 2009 at 2:30 PM, Konrad Karpieszuk
<kkarpieszuk at gmail.com> wrote:
> hello :)
> I am this guy who created few days ago plugin to notify by email if new
> version of wordpress is available.
> http://www.muzungu.pl/moje-pluginy-do-wordpressa/upgrade-notification-by-email/
> in many places (eg http://www.wptavern.com/upgrade-notifications-by-email )
> you suggest me to use function wp_version_check() but i don't know how to do
> this :(
> i found its description in update.php file but i still dont know how to use
> it. i see that i return false or null. ok, but what it returns else?
> could anyone axplain me how to check if new version of wordpress is
> available using this function and if it is available perform some action
> (for example print "is available")?
> i tried to use this function in template file footer.php. i putted there:
> <?php  if (wp_version_check()) { print "OK"; } else {print "not ok"; }   ?>
> and it prints "not ok" at wordpress 2.8.1 and at 2.8.4. so result is thesame
> on not actual and actual version of wordpress :(
> --
> (en) regards / (pl) pozdrawiam
> Konrad Karpieszuk
> http://konradjestwrwandzie.wordpress.com/
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers

More information about the wp-hackers mailing list