2014-04-09 23:22:44 +03:00
|
|
|
<?php
|
2014-04-26 01:58:07 +03:00
|
|
|
|
2014-04-09 23:22:44 +03:00
|
|
|
/**
|
2014-05-03 22:28:04 +03:00
|
|
|
* Define a short description for what this class does (no period)
|
2014-04-09 23:22:44 +03:00
|
|
|
*
|
2014-05-03 22:07:05 +03:00
|
|
|
* @package Plugin_Name
|
|
|
|
* @subpackage Plugin_Name/includes
|
|
|
|
* @author Your Name <email@example.com>
|
2014-05-03 22:28:04 +03:00
|
|
|
* @license GPL-2.0+
|
|
|
|
* @link http://example.com
|
|
|
|
* @copyright 2014 Your Name or Company Name
|
|
|
|
* @since 1.0.0
|
2014-05-01 05:55:34 +03:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2014-05-03 22:28:04 +03:00
|
|
|
* Define a short description for what this class does.
|
2014-04-26 01:58:07 +03:00
|
|
|
*
|
2014-05-03 22:28:04 +03:00
|
|
|
* Define a longer description for the purpose of this class.
|
2014-05-01 05:55:34 +03:00
|
|
|
*
|
2014-05-03 22:28:04 +03:00
|
|
|
* @package Plugin_Name
|
|
|
|
* @subpackage Plugin_Name/includes
|
|
|
|
* @author Your Name <email@example.com>
|
2014-04-09 23:22:44 +03:00
|
|
|
*/
|
|
|
|
class Plugin_Name {
|
|
|
|
|
2014-05-09 01:10:04 +03:00
|
|
|
/**
|
|
|
|
* This class is used to define common functionality that exists between
|
|
|
|
* both the dashboard and the public-facing side of the website. Think
|
|
|
|
* of this as a shared class.
|
|
|
|
*
|
|
|
|
* If any hooks are defined in this class, then they should be defined
|
|
|
|
* in their respective Loader classes (that is, Plugin_Name_Admin_Loader
|
|
|
|
* or Plugin_Name_Public_Loader).
|
|
|
|
*
|
|
|
|
* An instance of this class should then be passed to the loader.
|
|
|
|
*/
|
|
|
|
|
2014-05-05 07:18:04 +03:00
|
|
|
protected $plugin_slug = 'plugin-name-slug';
|
|
|
|
|
|
|
|
protected $version = '1.0.0';
|
|
|
|
|
|
|
|
protected $loader;
|
|
|
|
|
2014-05-09 01:10:04 +03:00
|
|
|
public function __construct( Plugin_Name_Loader $loader ) {
|
2014-05-05 07:18:04 +03:00
|
|
|
$this->loader = $loader;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function run() {
|
|
|
|
$this->loader->run();
|
|
|
|
}
|
|
|
|
|
2014-05-09 01:10:04 +03:00
|
|
|
public function get_version() {
|
|
|
|
return $this->version;
|
2014-05-08 23:50:23 +03:00
|
|
|
}
|
|
|
|
|
2014-05-09 01:10:04 +03:00
|
|
|
public function get_slug() {
|
|
|
|
return $this->plugin_slug;
|
|
|
|
}
|
2014-05-01 05:55:34 +03:00
|
|
|
|
2014-04-26 01:39:31 +03:00
|
|
|
}
|