Incorrect hook param names on page.create:before

I think the parameters of the hook page.create:before are incorrectly named as ($parent, $input) in document page.

When I saw $parent, i thought the returned to its parent object.
I’ve been through a lot of this misunderstanding.
But returned the page object that confirmed following line:

return [
    'hooks' => [
        'page.create:before' => function ($parent, $input) {
            // your code goes here
        }
    ]
]

I think the correct naming is: ($page, $input) or ($page, $props), am I wrong?

Yes, that seems to be wrong, I’ve changed it.

1 Like