mirror of
https://github.com/inretio/WordPress-Plugin-Boilerplate
synced 2024-12-22 20:03: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:
parent
d29ebf7dc8
commit
b5549d5f9c
1 changed files with 14 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue