I want to set up a function that notifies me when a core update is available. But i can’t find any functions that check for updates.
I have looked at list_core_updates() and it may be possible to check if it returns anything, but i don’t know if that is smart.
There is
get_core_updates()
.Note that you might need to manually include admin file that declares it, if running in front end and such.
Example use:
Example return:
An alternative way is to query the API directly via http://api.wordpress.org/core/version-check/1.6/
You can see it buried in there as
"current";s:5:"3.4.2"