mirror of
https://github.com/inretio/WordPress-Plugin-Boilerplate
synced 2024-12-22 11:53:53 +02:00
Merge pull request #439 from jonathanbossenger/feature/version-constant
Adding a version constant
This commit is contained in:
commit
872c67477a
2 changed files with 7 additions and 2 deletions
|
@ -67,9 +67,12 @@ class Plugin_Name {
|
|||
* @since 1.0.0
|
||||
*/
|
||||
public function __construct() {
|
||||
|
||||
$this->plugin_name = 'plugin-name';
|
||||
if ( defined( 'PLUGIN_VERSION' ) ) {
|
||||
$this->version = PLUGIN_VERSION;
|
||||
} else {
|
||||
$this->version = '1.0.0';
|
||||
}
|
||||
$this->plugin_name = 'plugin-name';
|
||||
|
||||
$this->load_dependencies();
|
||||
$this->set_locale();
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue