1
0
Fork 0
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:
Devin 2017-08-30 09:04:32 -04:00 committed by GitHub
commit 872c67477a
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