How to use the plugin info you added at the top of the index.php file of your plugin.
/* Plugin Name: My Plugin Plugin URI: myPlugin.com Description: This is my plugin. Version: 1.0 Author: me Author URI: me.com Short Name: myPlugin Plugin update URI: my-plugin-update */
To retrieve the data you need to first tell php which file to look in.
$pluginInfo = osc_plugin_get_info('myPlugin/index.php');
Once you tell php which file to look in it loads info into an array which is stored in the variable $pluginInfo.
Now we can now echo out our data like so.
echo $pluginInfo['plugin_name']; echo $pluginInfo['plugin_uri']; echo $pluginInfo['description']; echo $pluginInfo['version']; echo $pluginInfo['author']; echo $pluginInfo['author_uri']; echo $pluginInfo['short_name']; echo $pluginInfo['filename'];
Below is the results of the above code.
My Plugin
myPlugin.com
This is my plugin.
1.0
me
me.com
myPlugin
myPlugin/index.php
That is all it takes to retrieve the plugins info and use the info within your OSClass plugin.