Log in

View Full Version : When a hook is called...


fly
03-24-2006, 03:35 PM
Are all the variables in the script that called it available to the plugin that uses the hook?

For example:
$hellomom = 'a/s/l';
($hook = vBulletinHook::fetch_hook('vbplaza_action_openthre ad_purchase_complete')) ? eval($hook) : false;

If I create a plugin that uses the vbplaza_action_openthread_purchase_complete hook, can I use $hellomom?

Upon thinking at lunch, that was a retarded question. If someone else is ever dumb enough to ask it, the answer is yes. o.O

merk
03-24-2006, 08:03 PM
You cant always use every variable above a hook call. But generally if it is above the hook, yes you can.

fly
03-28-2006, 11:39 AM
You cant always use every variable above a hook call. But generally if it is above the hook, yes you can.
Well thats interesting. Can you explain an instance where you can't?