Main Plugin Instance
Last updated
Was this helpful?
Last updated
Was this helpful?
Your plugin should have exactly one class that implements the interface. If you have a very simple plugin, it can be the only class you have, but you need to have it. For convenience, the trait provides a basic implementation for most methods.
Basically what this interface enforces is a way to retrieve the most useful information from the plugin's . The class even goes a step further and actually retrieves all the values from said comment during the .
Therefore it would be enough to have a file Plugin.php
that looks a bit like this:
As always, our provides a more complex example (albeit it relies on the extended classes provided by the ).