Adding a version constant

This commit is contained in:
Jonathan Bossenger 2017-07-17 10:04:31 +02:00
parent 923fbaf0c8
commit 5af56b19a5
2 changed files with 7 additions and 2 deletions

View File

@ -67,9 +67,12 @@ class Plugin_Name {
* @since 1.0.0
*/
public function __construct() {
if ( defined( 'PLUGIN_VERSION' ) ) {
$this->version = PLUGIN_VERSION;
} else {
$this->version = '1.0.0';
}
$this->plugin_name = 'plugin-name';
$this->version = '1.0.0';
$this->load_dependencies();
$this->set_locale();

View File

@ -30,6 +30,8 @@ if ( ! defined( 'WPINC' ) ) {
die;
}
define( PLUGIN_VERSION, '1.0.0' );
/**
* The code that runs during plugin activation.
* This action is documented in includes/class-plugin-name-activator.php