开发者

Wordpress add plugin version alert

In creating a plugin, how can I ad开发者_开发知识库d a version update reminder for anyone using my plugin? This plugin will not be on Wordpress.org but on my own site. I am assuming the plugin checks on my server for a specific file and if the check version is same, no alert but if it is different an alert message will show? But how? Any direction would be appreciated.

The second part of this question is how to write the plugin to allow auto update like any plugins on wordpress? This way they can just click update and the plugin will just update.

Thanks.


I wouldn't host the plugin on your site for security reasons. There have been cases of malware hidden in plugins in the past and it's advised to get plugins from wp.org.

As for the alert system, you should use wp-cron.php to regularly check the txt file hosted on your server.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜