For Plugin* Authors: Changes of Interest in Version 2.5
Quite a lot has changed with Vanilla version 2.5 and I thought it would be a waste of time if everything that I've already stumbled upon would be forgotten. So I will write it down here.
Before I start: the Vanilla repository on GitHub has a label "Good first contribution". So if you are reading this discussion out of curiosity and not because you are a plugin author, think about becoming one
The most obvious change for a developer is the addon.json file. It is already good documented (here and here). The online documentation is getting better and better now and I would be happy if some of the info I pin down here would be carried over to the official docs by some volunteers whose English is good (enough). After all the documentation is just another public repository.
I'll be happy to check your writings if you like to before you contribute.
Here are the keys that are used in the addon.json that I found are used, not all of them are yet in the official docs ("Good first contribution" )
- className (string): If the plugins class isn't named "KeyPlugin" ("key" like the value of the key above) you can give that name here.
- nameSpace: the namespace of the plugin class
- path: the plugin files path
- iconUrl (url): allows showing an external image in the dashboard
- pluginUrl (string): Shown as a "Visit Site" titled link in the plugin list
- newVersion (string): pluginUrl must be set and it must be a link to the addons application here, otherwise it generates a useless link. Link text is buggy in 2.5, but already fixed in master
- usePopupSettings (bool): setting this to false will open the settings page in a new page instead of showing it in a popup
- authors: What is not said there is that "AuthorEmail" is never used anywhere.
- author, authorEmail, authorUrl: don't use them anymore
- require: replaces "RequiredApplications", "RequiredPlugins", "RequiredThemes"
- conflict (array): if you know that your plugin doesn't play well with another plugin you should give the key and the version number here. Implementation isn't working yet (Advanced Editor and Button Bar use it already, but you can activate both of them nevertheless).
- hasLocale (bool): if your plugin has translatable strings
- meta (array): if you want to provide additional info that should be displayed in the plugin list
You can surely use whatever key=>value pair you like.
One word of caution: a key that you can see quite often is "settingsPermission", but that has no effect at all! You always have to do permission checks in your public endpoints by yourself. Specifying this key is merely informational and therefore you should consider to stop using it.
By the way: I found this information by looking at
and last but not least /cache/addon.php
* = this information might also be of interest for theme authors. At least everything you can read about the addon.json file, although there are even more keys available, just look at the class.thememanager.php