We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A change suggestion to allow plugins hooking onMarkdownInitialized to mergeConfig to allow per-page configuration overrides.
onMarkdownInitialized
mergeConfig
system/src/Grav/Common/Markdown/ParsedownGravTrait.php @@ -47,7 +47,10 @@ trait ParsedownGravTrait $this->setMarkupEscaped($defaults['escape_markup']); $this->setSpecialChars($defaults['special_chars']); - $grav->fireEvent('onMarkdownInitialized', new Event(['markdown' => $this])); + $grav->fireEvent('onMarkdownInitialized', new Event([ + 'markdown' => $this, + 'page' => $page, + ])); }
Perhaps there's a better way? $event['markdown']->page is protected.
$event['markdown']->page
If I do make a PR about this, should it be a one-liner or like above?
The text was updated successfully, but these errors were encountered:
Yes PR please...
Sorry, something went wrong.
Add the page to the onMarkdownInitialized event.
fd23fac
This will allow plugins hooking this event to mergeConfig. Fix getgrav#2412
Add the page to the onMarkdownInitialized event. (#2418)
55aaaee
This will allow plugins hooking this event to mergeConfig #2412
@Goutte You can access it by $event['page'], DO NOT USE $event->page, it is different.
$event['page']
$event->page
No branches or pull requests
A change suggestion to allow plugins hooking
onMarkdownInitialized
tomergeConfig
to allow per-page configuration overrides.Perhaps there's a better way?
$event['markdown']->page
is protected.If I do make a PR about this, should it be a one-liner or like above?
The text was updated successfully, but these errors were encountered: