add plugin hooks invoked when articles get un/marked or un/published

This commit is contained in:
Andrew Dolgov
2025-05-01 22:36:33 +03:00
parent 4ae17d0f1c
commit 5f70e41118
5 changed files with 45 additions and 0 deletions

View File

@@ -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);
}
}