diff options
| author | 2023-07-05 11:00:26 +0200 | |
|---|---|---|
| committer | 2023-07-05 11:00:26 +0200 | |
| commit | 1db606bc1b6cf25d9b9c4bef362acdb964ce1e8a (patch) | |
| tree | 9556fec20e66270f7117850530de01f0f3c36b65 /docs/fr/developers | |
| parent | ebf62a4296b8007527325374608de5a7b972d598 (diff) | |
New extension hook entry_auto_read (#5505)
* New extension hook entry_auto_read
For extensions to be notified of articles being automatically marked as read for various reasons
* Documentation + entry_auto_unread
Diffstat (limited to 'docs/fr/developers')
| -rw-r--r-- | docs/fr/developers/03_Backend/05_Extensions.md | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/docs/fr/developers/03_Backend/05_Extensions.md b/docs/fr/developers/03_Backend/05_Extensions.md index 548aebf4f..14a774704 100644 --- a/docs/fr/developers/03_Backend/05_Extensions.md +++ b/docs/fr/developers/03_Backend/05_Extensions.md @@ -187,13 +187,13 @@ Your class will benefit from four methods to redefine: You can register at the FreshRSS event system in an extensions `init()` method, to manipulate data when some of the core functions are executed. -```html +```php class HelloWorldExtension extends Minz_Extension { - public function init() { - $this->registerHook('entry_before_display', array($this, 'renderEntry')); + public function init(): void { + $this->registerHook('entry_before_display', [$this, 'renderEntry']); } - public function renderEntry($entry) { + public function renderEntry(FreshRSS_Entry $entry): FreshRSS_Entry { $entry->_content('<h1>Hello World</h1>' . $entry->content()); return $entry; } @@ -206,6 +206,10 @@ The following events are available: every time a URL is added. The URL itself will be passed as parameter. This way a website known to have feeds which doesn’t advertise it in the header can still be automatically supported. +* `entry_auto_read` (`function(FreshRSS_Entry $entry, string $why): void`): + Appelé lorsqu’une entrée est automatiquement marquée comme lue. Le paramètre *why* supporte les règles {`filter`, `upon_reception`, `same_title_in_feed`}. +* `entry_auto_unread` (`function(FreshRSS_Entry $entry, string $why): void`): + Appelé lorsqu’une entrée est automatiquement marquée comme non-lue. Le paramètre *why* supporte les règles {`updated_article`}. * `entry_before_display` (`function($entry) -> Entry | null`): will be executed every time an entry is rendered. The entry itself (instance of FreshRSS\_Entry) will be passed as parameter. |
