diff --git a/CHANGELOG.md b/CHANGELOG.md index c294dc7..9d2a2b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ + +# [3.0.3](https://github.com/blankogmbh/kirby-git-commit-and-push-content/compare/v3.0.2...v3.0.3) (2020-07-12) + +The maintainer has switched, be prepared for config option name changes in version 4 which will be released shortly. + +### Bug Fixes + +* Plugin works with Kirby 3.4 (#66) + -# [3.0.1](https://github.com/blankogmbh/kirby-git-commit-and-push-content/compare/v3.0.2...v3.0.1) (2020-03-06) +# [3.0.2](https://github.com/blankogmbh/kirby-git-commit-and-push-content/compare/v3.0.1...v3.0.2) (2020-03-06) ### Bug Fixes @@ -7,7 +16,7 @@ -# [3.0.1](https://github.com/blankogmbh/kirby-git-commit-and-push-content/compare/v3.0.1...v3.0.0) (2019-09-24) +# [3.0.1](https://github.com/blankogmbh/kirby-git-commit-and-push-content/compare/v3.0.0...v3.0.1) (2019-09-24) ### Bug Fixes diff --git a/src/KirbyGit.php b/src/KirbyGit.php index 145db9d..f06ec02 100644 --- a/src/KirbyGit.php +++ b/src/KirbyGit.php @@ -76,7 +76,7 @@ public function getHooks() /* * Site */ - 'site.update:after' => function ($site) use ($gitHelper) { + 'site.update:after' => function () use ($gitHelper) { $gitHelper->kirbyChange('update(site)'); }, @@ -86,26 +86,26 @@ public function getHooks() 'page.create:after' => function ($page) use ($gitHelper) { $gitHelper->kirbyChange('create(page): ' . $page->uri()); }, - 'page.update:after' => function ($page) use ($gitHelper) { - $gitHelper->kirbyChange('update(page): ' . $page->uri()); + 'page.update:after' => function ($newPage) use ($gitHelper) { + $gitHelper->kirbyChange('update(page): ' . $newPage->uri()); }, 'page.delete:after' => function ($status, $page) use ($gitHelper) { $gitHelper->kirbyChange('delete(page): ' . $page->uri()); }, - 'page.changeNum:after' => function ($page) use ($gitHelper) { - $gitHelper->kirbyChange('sort(page): ' . $page->uri()); + 'page.changeNum:after' => function ($newPage) use ($gitHelper) { + $gitHelper->kirbyChange('sort(page): ' . $newPage->uri()); }, - 'page.changeSlug:after' => function ($page) use ($gitHelper) { - $gitHelper->kirbyChange('update(page): ' . $page->uri()); + 'page.changeSlug:after' => function ($newPage) use ($gitHelper) { + $gitHelper->kirbyChange('update(page): ' . $newPage->uri()); }, - 'page.changeStatus:after' => function ($page) use ($gitHelper) { - $gitHelper->kirbyChange('update(page): ' . $page->uri()); + 'page.changeStatus:after' => function ($newPage) use ($gitHelper) { + $gitHelper->kirbyChange('update(page): ' . $newPage->uri()); }, - 'page.changeTemplate:after' => function ($page) use ($gitHelper) { - $gitHelper->kirbyChange('update(page): ' . $page->uri()); + 'page.changeTemplate:after' => function ($newPage) use ($gitHelper) { + $gitHelper->kirbyChange('update(page): ' . $newPage->uri()); }, - 'page.changeTitle:after' => function ($page) use ($gitHelper) { - $gitHelper->kirbyChange('update(page): ' . $page->uri()); + 'page.changeTitle:after' => function ($newPage) use ($gitHelper) { + $gitHelper->kirbyChange('update(page): ' . $newPage->uri()); }, /* @@ -118,33 +118,33 @@ public function getHooks() $gitHelper->kirbyChange('create(file): ' . $file->page()->uri() . '/' . $file->filename()); }, - 'file.replace:after' => function ($file) use ($gitHelper) { - if (!$file->page()) { + 'file.replace:after' => function ($newFile) use ($gitHelper) { + if (!$newFile->page()) { return; } - $gitHelper->kirbyChange('replace(file): ' . $file->page()->uri() . '/' . $file->filename()); + $gitHelper->kirbyChange('replace(file): ' . $newFile->page()->uri() . '/' . $newFile->filename()); }, - 'file.changeName:after' => function ($file) use ($gitHelper) { - if (!$file->page()) { + 'file.changeName:after' => function ($newFile) use ($gitHelper) { + if (!$newFile->page()) { return; } - $gitHelper->kirbyChange('rename(file): ' . $file->page()->uri() . '/' . $file->filename()); + $gitHelper->kirbyChange('rename(file): ' . $newFile->page()->uri() . '/' . $newFile->filename()); }, - 'file.update:after' => function ($file) use ($gitHelper) { - if (!$file->page()) { + 'file.update:after' => function ($newFile) use ($gitHelper) { + if (!$newFile->page()) { return; } - $gitHelper->kirbyChange('update(file): ' . $file->page()->uri() . '/' . $file->filename()); + $gitHelper->kirbyChange('update(file): ' . $newFile->page()->uri() . '/' . $newFile->filename()); }, - 'file.changeSort:after' => function ($file) use ($gitHelper) { - if (!$file->page()) { + 'file.changeSort:after' => function ($newFile) use ($gitHelper) { + if (!$newFile->page()) { return; } - $gitHelper->kirbyChange('sort(file): ' . $file->page()->uri() . '/' . $file->filename()); + $gitHelper->kirbyChange('sort(file): ' . $newFile->page()->uri() . '/' . $newFile->filename()); }, 'file.delete:after' => function ($status, $file) use ($gitHelper) { if (!$file->page()) {