 implementing plugins to implement plugins you need to implement a single hook in your module to tell the system where your plugins live and then you need to implement one or more inc files that contain the plugin data telling it where your plugins live to implement any plugins at all you must implement a single function for all plugins  hookctoolsplugindirectory  every time a module loads plugins this hook will be called to see which modules implement those plugins and in what directory those plugins will live function hookctoolsplugindirectory module plugin if module panels plugin contenttypes return plugins contenttypes the directory returned should be relative to your module another common usage is to simply return that you implement all plugins owned by a given module or modules function hookctoolsplugindirectory module plugin if module panels return plugins plugin typically it is recommended that all plugins be placed into the plugins directory for clarity and maintainability inside the directory any number of subdirectories can be used for plugins that require extra files such as templates css javascript or image files this is highly recommended mymodulemodule mymoduleinfo plugins contenttypes mycontenttypeinc layouts mylayoutinc mylaoutcss mylayouttplphp mylayoutimagepng how a theme can implement plugins themes can implement plugins if the plugin owner specified that it s possible in its hookctoolsapitype call if so it is generally exactly the same as modules except for one important difference themes don t get hookctoolsplugindirectory instead themes add a line to their info file plugins module type directory how to structure the inc file the top of the inc file should contain an array that defines the plugin this array is simply defined in the global namespace of the file and does not need a function note that previous versions of this plugin system required a specially named function while this function will still work its use is now discouraged as it is annoying to name properly this array should look something like this plugin array key value several values will be filled in for you automatically but you can override them if necessary they include name path file and module additionally the plugin can owner can provide other defaults as well after this array if your plugin needs functions they can be declared different plugin types have different needs here so exactly what else will be needed will change from type to type  