Extension
WTF is extension?
Extension is a core feature enhancer that has a higher level than plugin. An extension doesn’t have to change the behavior of your site directly, it can also be used as an API enhancer that does nothing until you use it on a particular plugin or shield, or even in a private function file that you have.
An extension is a folder with a unique name, stored in .\lot\extend
folder:
lot\
└── extend\
├── asset\
├── page\
├── extension-1\
├── extension-2\
├── …
└── …
A standard extension should at least contains files that structured like this:
extension-1\
├── engine\
│ ├── kernel\
│ │ └── extension-1.php
│ ├── plug\
│ │ └── extension-1.php
│ └── fire.php
├── lot\
│ ├── asset\
│ │ ├── .htaccess
│ │ ├── css\
│ │ └── js\
│ ├── language\
│ │ ├── en-us.page
│ │ └── id-id.page
│ └── state\
│ └── config.php
├── about.page
└── index.php
But the simplest one can be achieved as:
extension-1\
├── about.page
└── index.php
Note: The
.htaccess
file is required to enable access of the asset files publicly. It only contains this command:allow from all
The most important part is the index.php
file. The automatic extension loader will seek for index.php
file and once it found, then the engine will include it before the shield is loaded.