From 5f70e4111889ddf4b97a257abd81f94cac7bac8a Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 1 May 2025 22:36:33 +0300 Subject: add plugin hooks invoked when articles get un/marked or un/published --- classes/Plugin.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'classes/Plugin.php') diff --git a/classes/Plugin.php b/classes/Plugin.php index 62211f338..b66e2082c 100644 --- a/classes/Plugin.php +++ b/classes/Plugin.php @@ -713,4 +713,23 @@ 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 $article_ids ref_ids + * @return void + */ + function hook_articles_marked(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 $article_ids ref_ids + * @return void + */ + function hook_articles_published(array $article_ids) { + user_error("Dummy method invoked.", E_USER_ERROR); + } } -- cgit v1.2.3-54-g00ecf