Skip to content

Instantly share code, notes, and snippets.

@nektobit
Created October 8, 2018 00:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nektobit/e64f0fc2aa0d0c9c9f492431c67818c3 to your computer and use it in GitHub Desktop.
Save nektobit/e64f0fc2aa0d0c9c9f492431c67818c3 to your computer and use it in GitHub Desktop.
Get version of current plugin (in frontend also works)
function get_my_version() {
if (!function_exists('get_plugin_data')) {
include_once( ABSPATH . 'wp-admin/includes/plugin.php');
}
$pluginObject = get_plugin_data( __FILE__ );
return $pluginObject['Version'];
}
//wp_die(get_my_version());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment