This repository was archived by the owner on Feb 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Configuration
Ben Constable edited this page Jan 8, 2015
·
2 revisions
###Registering a plugin
In Wordpress, your plugin's main file will typically contain a lot of code, including classes, action registrations, custom post types and whatever else your plugin needs.
When using Wordpress Core, your plugin's main file typically only needs to contain a couple of lines of bootstrap code - configuration of everything is handled in the config/ directory.
As a minimum, you plugin's main file will need the following:
<?php
/*
Plugin Name: My Plugin
Plugin URI: http://www.example.com/
Description: An example plugin.
Author: Me
Author URI: http://www.example.com/
Version: 1.0.0
*/
tev_fetch('plugin_loader')->load(__DIR__);This line does the following:
- Resolves the plugin loader instance from the DI container
- Loads all of the plugin config, telling the loader to use the plugin root directory as the entry point
3ev - Wordpress Core | http://www.3ev.com