From ca44ce5f8cb5ab78d8d5f33c71f29d943ea91a8e Mon Sep 17 00:00:00 2001 From: zotlabs Date: Mon, 12 Dec 2016 20:28:13 -0800 Subject: document the stream_item hook before I forget --- doc/hook/stream_item.bb | 13 +++++++++++++ doc/hooklist.bb | 3 +++ 2 files changed, 16 insertions(+) create mode 100644 doc/hook/stream_item.bb (limited to 'doc') diff --git a/doc/hook/stream_item.bb b/doc/hook/stream_item.bb new file mode 100644 index 000000000..30086961d --- /dev/null +++ b/doc/hook/stream_item.bb @@ -0,0 +1,13 @@ +[h2]stream_item[/h2] + + +Called for each item processed for viewing by conversation(); + +The hook data consists of an array + + array( + 'mode' => current mode of conversation() + 'item' => item being processed + ); + + Set item['blocked'] to block the item from viewing. This action will not affect comment or sub-thread counts, so if there are three comments in a conversation and you block one, three comments will still be reported even though only two are visible. diff --git a/doc/hooklist.bb b/doc/hooklist.bb index 52af9608c..ac3912568 100644 --- a/doc/hooklist.bb +++ b/doc/hooklist.bb @@ -542,6 +542,9 @@ Hooks allow plugins/addons to "hook into" the code at many points and alter the [zrl=[baseurl]/help/hook/smilie]smilie[/zrl] Called when translating emoticons +[zrl=[baseurl]/help/hook/stream_item]stream_item[/zrl] + Called for each item which is rendered for viewing via conversation() + [zrl=[baseurl]/help/hook/tagged]tagged[/zrl] Called when a delivery is processed which results in you being tagged -- cgit v1.2.3