Closed wlabarron closed 5 years ago
It's onTwigRegistered
now, see https://github.com/picocms/Pico/blob/e172dd20a1fe230d162bd918299840aa32e849d2/plugins/DummyPlugin.php#L519-L531
Don't forget about adding the API_VERSION
constant, otherwise your plugin won't be recognized as Pico 2.0 plugin. See https://github.com/picocms/Pico/blob/e172dd20a1fe230d162bd918299840aa32e849d2/plugins/DummyPlugin.php#L26-L31
It was the API_VERSION
constant that I didn't have, thank you!
Hello, I'm working on upgrading my site from Pico 1.0 -> 2.0 and my plugin to add a custom function has stopped working.
I understand that some of the events have changed in the plugins engine, so under which event in the new DummyPlugin should I be adding my function with
$twig->addFunction($customFunction);
?I've tried changing from the old
onPageRendering()
toonTwigRegistered()
but no luck.