-
Notifications
You must be signed in to change notification settings - Fork 0
Creating a Plugin with Lava
The following outlines all the files/folders that are to do with the Lava Framework. A working Plugin doesn't need all of these files & folders and can indeed have many more.
/plugin.php
- The main file that contains the Plugin Header, and sets up the plugin administration options.
/pluginCallbacks.php
- Contains the Plugin Callback Class which has all of the code that makes the plugin do its stuff
/branding.php
- manages the look of the admin pages as well as any custom interfaces etc. The code is isolated from the rest of the plugin definitions as it is usually the same for every plugin by one author and isn;t included except on admin requests.
/skins/
- If the plugin needs skins then these are placed in here.
/extensions/
- Any extensions that the plugin has should be in here. The directory should exist whether the plugin is bundled with extensions or not.
/_static/
- This folder contains any custom styles or scripts for the admin interface.
The top of your Plugin's main PHP file must contain a standard Plugin information header. This header lets WordPress recognize that your Plugin exists, add it to the Plugin management screen so it can be activated, load it, and run its functions; without the header, your Plugin will never be activated and will never run. Here is the header format:
<?php
/*
Plugin Name: Name Of The Plugin
Plugin URI: http://URI_Of_Page_Describing_Plugin_and_Updates
Description: A brief description of the Plugin.
Version: The Plugin's Version Number, e.g.: 1.0
Author: Name Of The Plugin Author
Author URI: http://URI_Of_The_Plugin_Author
License: A "Slug" license name e.g. GPL2
*/
?>