From d670bf1e72d92c3bbeeca874f6a042f4e3a74007 Mon Sep 17 00:00:00 2001 From: KleinMann <47398070+rnkln@users.noreply.github.com> Date: Thu, 18 Sep 2025 23:44:17 +0200 Subject: 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 --- lib/Minz/ExtensionManager.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib') diff --git a/lib/Minz/ExtensionManager.php b/lib/Minz/ExtensionManager.php index b3a29f9f7..b91a89de7 100644 --- a/lib/Minz/ExtensionManager.php +++ b/lib/Minz/ExtensionManager.php @@ -62,6 +62,14 @@ final class Minz_ExtensionManager { 'list' => [], 'signature' => 'OneToOne', ], + 'entry_before_add' => [ // function($entry) -> Entry | null + 'list' => [], + 'signature' => 'OneToOne', + ], + 'entry_before_update' => [ // function($entry) -> Entry | null + 'list' => [], + 'signature' => 'OneToOne', + ], 'feed_before_actualize' => [ // function($feed) -> Feed | null 'list' => [], 'signature' => 'OneToOne', -- cgit v1.2.3