kirby3-related icon indicating copy to clipboard operation
kirby3-related copied to clipboard

Page.update:after is dubbed

Open wizhou opened this issue 5 years ago • 1 comments

Hello @texnixe, I was looking inside your plugin for some insights and saw that the hook page.update:after is written two times in hooks.php and with the same call to the static function Related::flush(). I don't know if this is relevant or not, I just wanted to point it out in case.

Here is the code inside the file :

return [
    // here 
    'page.update:after' => function() {
        Related::flush();
    },
    'page.create:after' => function() {
        Related::flush();
    },
    'file.create:after' => function() {
        Related::flush();
    },
    // and here 
    'page.update:after' => function() {
        Related::flush();
    }
];

Anyway, thank you for this nice plugin !

wizhou avatar Feb 04 '20 19:02 wizhou

Oh right, thanks for pointing that out, the second one should indeed by file.update:after.

texnixe avatar Feb 04 '20 19:02 texnixe