Update version management to dynamically extract from plugin header

This commit is contained in:
Marcus Quinn
2025-03-17 13:41:52 +00:00
parent 41781daf58
commit 1aec0d3de6

View File

@ -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() {