In this section, we described how to create a basic plug-in that allows you to add a new feature into Oempro.
Names, Files and Locations
Naming Your Plug-In
We strongly recommend you to choose a unique name that describes what your plug-in does. Click here to browse officially promoted Oempro plug-ins to get an idea.
Creating Plug-In Directory and Mandatory Files
Once you decided a name for your plug-in, it’s time to create the plug-in directory and put mandatory files inside the directory. For instance, you have named your plug-in “Great Plug-In”, the plug-in directory name can be “great_plugin”. Create “great_plugin” directory under oempro/plugins/ directory. The path of our new plug-in will be similar to the following one:
Next step is to create the main class file which will perform major operations such as plug-in enable/disable actions. Create a new file under your great_plugin directory. The file name must be example same with the plug-in directory name with a file extension ‘.php’. In our example, it should be:
That’s all for the beginning.
Creating Main Class Properties and Methods
PHP Coding Standards and Standard Codes
Advanced Plug-In Techniques
Adding Menu Items
Adding New Sections
Saving Data To Oempro Database
User Interface Template Tags
Plug-In Hook Reference
User Interface Hooks