Skip to content

Kirby 4.5.0

hooks

Hook into Kirby events and execute your functions in the background

There are two ways to register hooks: In a plugin or in your config.php:

/site/config/config.php
return [
  'hooks' => [
    'page.delete:before' => function ($page) {
      // do something before a page gets deleted
    }
  ]
];

Find more detailed information about hooks and their usage in the corresponding plugin docs.

Available hooks