Created
October 8, 2018 00:58
-
-
Save nektobit/e64f0fc2aa0d0c9c9f492431c67818c3 to your computer and use it in GitHub Desktop.
Get version of current plugin (in frontend also works)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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