File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 44
55Kirby::plugin ('sylvainjule/categories ' , array (
66 'options ' => [
7- 'watch ' => []
7+ 'watch ' => [],
8+ 'hook ' => true ,
89 ],
910 'hooks ' => [
1011 'page.update:after ' => function ($ newPage , $ oldPage ) {
11- if (!option ('languages ' )) return ;
12+ if (!option ('languages ' ) || ! option ( ' sylvainjule.categories.hook ' ) ) return ;
1213
1314 $ categories = new Categories ();
1415 $ changes = $ categories ->getChangesArray ($ this , $ newPage , $ oldPage );
2021 return $ newPage ;
2122 },
2223 'site.update:after ' => function ($ newSite , $ oldSite ) {
23- if (!option ('languages ' )) return ;
24+ if (!option ('languages ' ) || ! option ( ' sylvainjule.categories.hook ' ) ) return ;
2425
2526 $ categories = new Categories ();
2627 $ changes = $ categories ->getChangesArray ($ this , $ newSite , $ oldSite );
You can’t perform that action at this time.
0 commit comments