Configuration - 3ev/wordpress-core GitHub Wiki
###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