I am looking to get meta data about an installed plugin from another plugin. Theoretically, to get the version, I could do:
$data = get_plugin_data( 'expected_plugin_folder_name');
$version = $data['version'];
But, this wouldn't work if the end user had changed the name of the plugin that I'm looking to get the meta data on was installed in.
I think the solution is to search in the array returned from get_plugins()
. The sticky part is the array keys are named for the path, relative to the plugin directory of the plugin file, which brings me back to the same issue as before--the end-user might have changed the directory name of the plugin.
Is there anyway to get the meta data without having to specify the plugin folder? Possibly by specifying slug, uri, name, etc...