diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2025-05-01 22:36:33 +0300 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2025-05-01 22:36:33 +0300 |
| commit | 5f70e4111889ddf4b97a257abd81f94cac7bac8a (patch) | |
| tree | fc3efcbf8c1854bfafe2dca51fbd25398bdef15a /classes/Plugin.php | |
| parent | 4ae17d0f1c956bfe392653ab847eb2e3da6f7bfc (diff) | |
add plugin hooks invoked when articles get un/marked or un/published
Diffstat (limited to 'classes/Plugin.php')
| -rw-r--r-- | classes/Plugin.php | 19 |
1 files changed, 19 insertions, 0 deletions
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<int> $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<int> $article_ids ref_ids + * @return void + */ + function hook_articles_published(array $article_ids) { + user_error("Dummy method invoked.", E_USER_ERROR); + } } |