I am developing plugin. Currently my plugin has 1.0 version. If in future I will update my plugins with new version 1.1 , so how can user get message like below image

enter image description here

How to compare current version with new version.

I have stored my current version in database.

I have googled it. But didn't find any perfect solution.

  • 2
    You cannot that that exact message because that message comes from the WordPress.org plugin repo. So unless your plugin is in that repo, you won't get that exact message. You can however show that type of message elsewhere like in the header on top..etc..
    – user23654
    Sep 5, 2013 at 13:26
  • So what will be happend, if I will update my plugins with new version in worpress.org plugin repo? Will Wordpress directly detect and give that message? Sep 5, 2013 at 13:30
  • 1
    Yes if you put your plugin in the WP repo, you don't need to code that part, it will automatically show it for you.
    – user23654
    Sep 5, 2013 at 13:31

1 Answer 1


Not sure if exactly what you're looking for, but Advanced Custom Fields has a custom update message.

enter image description here

Checking its code, it uses:

add_action( 'in_plugin_update_message-' . $hook, array($this, 'in_plugin_update_message'), 10, 2 );

The in_plugin_update_message() callback method it's not exactly simple and worth a detailed look. Note that it only works if the plugin is active.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.