As we have pointed out previously, theme.php
must be there in order for a theme to work. There are no prescribed functions that must exist in the vmTheme
class though. You can just simply inherit (or extend, in terms of PHP) from the vmTemplate
class without adding any extra code, if that fits your needs.
In the default
theme, the theme.php
file contains a few lines of initialization code before actually defining the vmTheme
class. There are four additional functions defined in the class. The following screenshot shows the major elements in this PHP file:
The initialization code is placed before the vmTheme
class definition. This will enable the code to run as soon as the file is included. The intention of the code is clear. It just instructs the PHP to add theme.js
and theme.css
to the output HTML. We want to add this to the HTML as soon as possible. The best location for this is, of course, the <head>
section. However, as the comment among...