开发者

Wordpress - another plugin wants to update my plugin

I'm developing my own Wordpress plugins & widgets and after I load some of them Wordpress displays message开发者_运维百科 next to them saying:

There is a new version of [my plugin name] available. View version [version number] Details or upgrade automatically.

What the hell? :)

I always set Plugin and Author URIs in plugin .php file along with autor's name and plugin's version.

At this moment I'm pretty sure there's a Wordpress mechanism based on plugin name, and if finds plugin with similar name - it thinks that's the right one.

The funny thing is even renaming isn't helpful in many cases. Example? I've been working on plugin based on Google Maps. So I've decided to name it "Google Maps". Wordpress wants to update my plugin. So I'm renaming it. "[fomicz] Google Maps". Still the same. "Fomicz Google Maps Plugin". Nothing. "Mystupidplugin Google Maps Please Stop Asking For Updates". STILL shows "new version" message!

What to do? I don't want to disable update option, because I'm pretty sure I'll be updating my plugins in the future.

Thanks!


As already mentioned in the comments, WordPress retrieves the plug-in name from the comment block header in the main plug-in file (using the function get_plugin_data defined in /wp-admin/includes/plugin.php).

The thing is, it doesn't look for updates every time you visit the page - it schedules a chron job that fires every few hours to ease load on the servers running the repository. So after it finds an update for a plug-in, it will cache that find.

My recommendation:

  1. Deactivate and delete your plug-in from the site.
  2. Re-name the plug-in in the code.
  3. Re-add your re-named plug-in to your site

This should circumvent any caching done by the update system.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜