1
0
Fork 0
mirror of https://github.com/inretio/WordPress-Plugin-Boilerplate synced 2024-12-22 11:53:53 +02:00

defining a base class from which all other components can inherit

also getting rid of the version constant in place of a properly, defining a single entry point with the run function, and defining the plugin slug as a property
This commit is contained in:
Tom McFarlin 2014-05-05 00:18:04 -04:00
parent d29ebf7dc8
commit b5549d5f9c

View file

@ -23,6 +23,20 @@
*/ */
class Plugin_Name { class Plugin_Name {
protected $plugin_slug = 'plugin-name-slug';
protected $version = '1.0.0';
protected $loader;
public function __construct( Plugin_Name_Loader $loader = NULL ) {
$this->loader = $loader;
}
public function run() {
$this->loader->run();
}
/** /**
* This class is used to define common functionality that exists between * This class is used to define common functionality that exists between
* both the dashboard and the public-facing side of the website. Think * both the dashboard and the public-facing side of the website. Think