I would like to show an admin notice (https://codex.wordpress.org/Plugin_API/Action_Reference/admin_notices) when my plugin has a update.
Like this:
How to do this?
I would like to show an admin notice (https://codex.wordpress.org/Plugin_API/Action_Reference/admin_notices) when my plugin has a update.
Like this:
How to do this?
You must be logged in to post a comment.
Assuming that your plugin is in the WordPress repository, then you can do this by hooking into the WordPress update functionality. Note that
get_site_transient()
is always used by falls back to theget_option()
when it is not a multisite install..In the result of
update_plugins
the$update_plugins->response
is anarray()
that will be something like this: