mirror of
https://github.com/inretio/WordPress-Plugin-Boilerplate
synced 2024-12-22 11:53:53 +02:00
Adding a version constant
This commit is contained in:
parent
923fbaf0c8
commit
5af56b19a5
2 changed files with 7 additions and 2 deletions
|
@ -67,9 +67,12 @@ class Plugin_Name {
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
|
if ( defined( 'PLUGIN_VERSION' ) ) {
|
||||||
|
$this->version = PLUGIN_VERSION;
|
||||||
|
} else {
|
||||||
|
$this->version = '1.0.0';
|
||||||
|
}
|
||||||
$this->plugin_name = 'plugin-name';
|
$this->plugin_name = 'plugin-name';
|
||||||
$this->version = '1.0.0';
|
|
||||||
|
|
||||||
$this->load_dependencies();
|
$this->load_dependencies();
|
||||||
$this->set_locale();
|
$this->set_locale();
|
||||||
|
|
|
@ -30,6 +30,8 @@ if ( ! defined( 'WPINC' ) ) {
|
||||||
die;
|
die;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
define( PLUGIN_VERSION, '1.0.0' );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The code that runs during plugin activation.
|
* The code that runs during plugin activation.
|
||||||
* This action is documented in includes/class-plugin-name-activator.php
|
* This action is documented in includes/class-plugin-name-activator.php
|
||||||
|
|
Loading…
Reference in a new issue