2007-02-07, 03:36 PM
I don't fully understand the whole Hooks System. I tried looking through plugins to see if that helps, but I get confused when an admin page calls a hook that wasn't created in the 'functionname_activate()' function.
Like, for example, the Inventory Shop plugin. It calls the hook 'inventory_shop_admin_modify', but, in the inventoryshop.php file, it doesn't add that.
Plus, I'm not sure what, in essence, this does:
Does that add the function 'foo_functionname' to the hook 'global_end'? If it does, what would happen if you called the hook 'global_end'? Would, along with all the other code it executes, execute the functions 'foo_functionname'?
I'm really confused. Any help would be greatly appreciated!
Like, for example, the Inventory Shop plugin. It calls the hook 'inventory_shop_admin_modify', but, in the inventoryshop.php file, it doesn't add that.
Plus, I'm not sure what, in essence, this does:
$plugins->add_hook("global_end", "foo_functionname");
Does that add the function 'foo_functionname' to the hook 'global_end'? If it does, what would happen if you called the hook 'global_end'? Would, along with all the other code it executes, execute the functions 'foo_functionname'?
I'm really confused. Any help would be greatly appreciated!