summaryrefslogtreecommitdiff
path: root/classes/Plugin.php
diff options
context:
space:
mode:
authorAndrew Dolgov <fox@fakecake.org>2025-05-02 18:40:47 +0000
committerAndrew Dolgov <fox@fakecake.org>2025-05-02 18:40:47 +0000
commitbc0da8edb699eec9fb6424bb5d8650ac48dca69d (patch)
tree1433d63b437b719bca1f11f9b6a605352aac3677 /classes/Plugin.php
parent4ae17d0f1c956bfe392653ab847eb2e3da6f7bfc (diff)
parent3098dc0a163b4b70105da2eae1237057ae97ccb1 (diff)
Merge branch 'marked-hook' into 'master'
add plugin hooks invoked when articles get un/marked or un/published See merge request tt-rss/tt-rss!123
Diffstat (limited to 'classes/Plugin.php')
-rw-r--r--classes/Plugin.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/classes/Plugin.php b/classes/Plugin.php
index 62211f338..3165d62f4 100644
--- a/classes/Plugin.php
+++ b/classes/Plugin.php
@@ -713,4 +713,26 @@ abstract class Plugin {
return false;
}
+ /** Invoked after passed article IDs were either marked (i.e. starred) or unmarked.
+ *
+ * **Note** resulting state of the articles is not passed to this function (because
+ * tt-rss may do invert operation on ID range), you will need to get this from the database.
+ * @param array<int> $article_ids ref_ids
+ * @return void
+ */
+ function hook_articles_mark_toggled(array $article_ids) {
+ user_error("Dummy method invoked.", E_USER_ERROR);
+ }
+
+ /** Invoked after passed article IDs were either published or unpublished.
+ *
+ * **Note** resulting state of the articles is not passed to this function (because
+ * tt-rss may do invert operation on ID range), you will need to get this from the database.
+ *
+ * @param array<int> $article_ids ref_ids
+ * @return void
+ */
+ function hook_articles_publish_toggled(array $article_ids) {
+ user_error("Dummy method invoked.", E_USER_ERROR);
+ }
}