mirror of
https://github.com/inretio/WordPress-Plugin-Boilerplate
synced 2024-12-22 11:53:53 +02:00
adding getters for the protected properties
This commit is contained in:
parent
0fdaeaa67c
commit
0d63ec21e5
1 changed files with 22 additions and 18 deletions
|
@ -23,24 +23,6 @@
|
|||
*/
|
||||
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();
|
||||
}
|
||||
|
||||
public function get_plugin_slug() {
|
||||
return $this->plugin_slug;
|
||||
}
|
||||
|
||||
/**
|
||||
* This class is used to define common functionality that exists between
|
||||
* both the dashboard and the public-facing side of the website. Think
|
||||
|
@ -53,4 +35,26 @@ class Plugin_Name {
|
|||
* An instance of this class should then be passed to the loader.
|
||||
*/
|
||||
|
||||
protected $plugin_slug = 'plugin-name-slug';
|
||||
|
||||
protected $version = '1.0.0';
|
||||
|
||||
protected $loader;
|
||||
|
||||
public function __construct( Plugin_Name_Loader $loader ) {
|
||||
$this->loader = $loader;
|
||||
}
|
||||
|
||||
public function run() {
|
||||
$this->loader->run();
|
||||
}
|
||||
|
||||
public function get_version() {
|
||||
return $this->version;
|
||||
}
|
||||
|
||||
public function get_slug() {
|
||||
return $this->plugin_slug;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue