Js Hooks In V.4

Hi there,



How does one go about defining and implementing a JS hook in V.4?



Here is an example of the particular issue I am facing:



An old addon I am trying to upgrade contains the following snippet:


```php


```



and when I run it in v.4, firebug has this to say:



“ReferenceError: fn_register_hooks is not defined”



Has the function name changed?

How is js hooking done in v.4?

Any help with this would be awesomely appreciated, thanks!

The js in your addon needs to supply the function. The call above only defines it.

Since the whole structure of where css/js files are placed and included changed in V4 I would assume your addon has them in the wrong place to be picked up properly.