Admun's NUDN

admun

  • San Francisco, CA

Navigation

Navigation

Categories

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.

15:25:23 on 07/26/04 by Admun - Category: Developer Notes - tags: none - print

Comments

No comments yet

Add Comments