Checking and Calling a Plugin
While looking at action.php code, I found this useful information how to check whether a plugin exist and to access it.
global $manager;
$pluginName = 'NP_MyPlugin';
if (!$manager->pluginInstalled($pluginName))
doError(_ERROR_NOSUCHPLUGIN);
$pluginObject =& $manager->getPlugin($pluginName);
if ($pluginObject)
$error = $pluginObject->doAction($actionType);
I think it will be useful for NP_Batch I am planning to do soon.
Comments
No comments yet