mirror of
https://github.com/getgrav/grav.git
synced 2026-07-07 11:53:29 +02:00
New onPageContent() event
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
## mm/dd/2019
|
||||
|
||||
1. [](#new)
|
||||
* Added new `onPageContent()` event for every call to `Page::content()`
|
||||
* Added phpstan: PHP Static Analysis Tool [#2393](https://github.com/getgrav/grav/pull/2393)
|
||||
* Added `composer test-plugins` to test plugin issues with the current version of Grav
|
||||
* Grav 1.6: Renamed `$grav['users']` service to `$grav['accounts']`
|
||||
|
||||
@@ -749,6 +749,8 @@ class Page implements PageInterface
|
||||
$this->content = str_replace("<p>{$delimiter}</p>", '', $this->content);
|
||||
}
|
||||
|
||||
// Fire event when Page::content() is called
|
||||
Grav::instance()->fireEvent('onPageContent', new Event(['page' => $this]));
|
||||
}
|
||||
|
||||
return $this->content;
|
||||
|
||||
Reference in New Issue
Block a user