aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorGravatar KleinMann <47398070+rnkln@users.noreply.github.com> 2025-09-18 23:44:17 +0200
committerGravatar GitHub <noreply@github.com> 2025-09-18 23:44:17 +0200
commitd670bf1e72d92c3bbeeca874f6a042f4e3a74007 (patch)
tree4510716c59ef202f2b5746b7cc1968ee1c810944 /docs
parent055342118fd26d85b4be045f582fd1b8568bf6e4 (diff)
Add `entry_before_update` and `entry_before_add` hooks (#7977)
Discussion: https://github.com/FreshRSS/FreshRSS/discussions/7973 Changes proposed in this pull request: - Add new extension hook "entry_before_add" - Add new extension hook "entry_before_update" How to test the feature manually: 1. Create extension that uses the hooks and confirm they are invoked correctly. Extension to use for testing https://github.com/rnkln/freshrss-xExtension-Discord/pull/2
Diffstat (limited to 'docs')
-rw-r--r--docs/en/developers/03_Backend/05_Extensions.md2
-rw-r--r--docs/fr/developers/03_Backend/05_Extensions.md8
2 files changed, 10 insertions, 0 deletions
diff --git a/docs/en/developers/03_Backend/05_Extensions.md b/docs/en/developers/03_Backend/05_Extensions.md
index 6550b8e6a..fcae42b5a 100644
--- a/docs/en/developers/03_Backend/05_Extensions.md
+++ b/docs/en/developers/03_Backend/05_Extensions.md
@@ -178,6 +178,8 @@ Example response for a `query_icon_info` request:
* `entry_auto_unread` (`function(FreshRSS_Entry $entry, string $why): void`): Triggered when an entry is automatically marked as unread. The *why* parameter supports the rules {`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.
* `entry_before_insert` (`function($entry) -> Entry | null`): will be executed when a feed is refreshed and new entries will be imported into the database. The new entry (instance of FreshRSS\_Entry) will be passed as parameter.
+* `entry_before_add` (`function($entry) -> Entry | null`): will be executed when a feed is refreshed and just before an entry is added to the database. Useful for reading the final state of the entry after filter actions have been applied. The new entry (instance of FreshRSS\_Entry) will be passed as parameter.
+* `entry_before_update` (`function($entry) -> Entry | null`): will be executed when a feed is refreshed and just before an entry is updated in the database. Useful for reading the final state of the entry after filter actions have been applied. The updated entry (instance of FreshRSS\_Entry) will be passed as parameter.
* `feed_before_actualize` (`function($feed) -> Feed | null`): will be executed when a feed is updated. The feed (instance of FreshRSS\_Feed) will be passed as parameter.
* `feed_before_insert` (`function($feed) -> Feed | null`): will be executed when a new feed is imported into the database. The new feed (instance of FreshRSS\_Feed) will be passed as parameter.
* `freshrss_init` (`function() -> none`): will be executed at the end of the initialization of FreshRSS, useful to initialize components or to do additional access checks.
diff --git a/docs/fr/developers/03_Backend/05_Extensions.md b/docs/fr/developers/03_Backend/05_Extensions.md
index cdf70fe74..18cc892be 100644
--- a/docs/fr/developers/03_Backend/05_Extensions.md
+++ b/docs/fr/developers/03_Backend/05_Extensions.md
@@ -235,6 +235,14 @@ The following events are available:
executed when a feed is refreshed and new entries will be imported into
the database. The new entry (instance of FreshRSS\_Entry) will be passed
as parameter.
+* `entry_before_add` (`function($entry) -> Entry | null`): will be
+ executed when a feed is refreshed and just before an entry is added to the database.
+ Useful for reading the final state of the entry after filter actions have been applied.
+ The new entry (instance of FreshRSS\_Entry) will be passed as parameter.
+* `entry_before_update` (`function($entry) -> Entry | null`): will be
+ executed when a feed is refreshed and just before an entry is updated in the database.
+ Useful for reading the final state of the entry after filter actions have been applied.
+ The updated entry (instance of FreshRSS\_Entry) will be passed as parameter.
* `entries_favorite` (`function(array $ids, bool $is_favorite): void`):
will be executed when some entries are marked or unmarked as favorites (starred)
* `feed_before_actualize` (`function($feed) -> Feed | null`): will be