Update version management to dynamically extract from plugin header
This commit is contained in:
@ -19,8 +19,12 @@ if ( ! defined( 'WPINC' ) ) {
|
|||||||
die;
|
die;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Define plugin version
|
// Define plugin version - extract from plugin header
|
||||||
define( 'WP_ALLSTARS_VERSION', '0.1 (Beta)' );
|
function wp_allstars_get_plugin_version() {
|
||||||
|
$plugin_data = get_file_data(__FILE__, array('Version' => 'Version'));
|
||||||
|
return $plugin_data['Version'];
|
||||||
|
}
|
||||||
|
define( 'WP_ALLSTARS_VERSION', wp_allstars_get_plugin_version() );
|
||||||
|
|
||||||
// Activation hook
|
// Activation hook
|
||||||
function wp_allstars_activate() {
|
function wp_allstars_activate() {
|
||||||
|
Reference in New Issue
Block a user