Hi,
I’m writing an extension that uses both the cp_css_end and cp_js_end hooks as documented in:
https://docs.expressionengine.com/latest/development/extension_hooks/cp/javascript/index.html
They are not firing in Expressionengine 3.3.3. Are they available in that version? If not, what version are they available in?
Kind regards,
James
Thanks Pedro - I checked and it was added to exp_extensions.
It turns out it was firing. The issue was that I thought I could return a string of javascript code in the method that is called.
However, it looks as though the hook is designed to parse the contents of a file rather than parse a string directly from the method.
So, the following works for me now:
public function cp_js_end()
{
return file_get_contents( PATH_THIRD . '/sym_cloner/js/sym_cloner.js');
}
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.