In the course of developing our site, we will frequently come across situations where various elements of the site need to be tweaked in PHP using Drupal's APIs. While a lot of theme-specific cases can be stored in template files, certain tweaks which are theme-agnostic require that we store them in a module to ensure that they are available to all themes.
This recipe covers the creation of a module to hold all these bits and pieces.
Create a folder inside
modules. This is where custom and contributed modules are usually housed.
The following list details the procedure involved in creating a module named
mysite to hold our theme-agnostic customizations and ...