aboutsummaryrefslogtreecommitdiffstats
path: root/doc/hook/item_custom.bb
diff options
context:
space:
mode:
authorManuel Jiménez Friaza <mjfriaza@openmailbox.org>2019-01-20 12:58:27 +0100
committerManuel Jiménez Friaza <mjfriaza@openmailbox.org>2019-01-20 12:58:27 +0100
commit4e8fc6d19851b6d05a49d5151aaa1f0f1fcfb5c0 (patch)
tree49111cffad0616616f4ce76fed9dd6b4fad8e41f /doc/hook/item_custom.bb
parent618d673947dc627dcdac3f9b6da7f31123472b05 (diff)
parent39128c34ccf48cc23ed368cf5bbedd71b5ef75db (diff)
downloadvolse-hubzilla-4e8fc6d19851b6d05a49d5151aaa1f0f1fcfb5c0.tar.gz
volse-hubzilla-4e8fc6d19851b6d05a49d5151aaa1f0f1fcfb5c0.tar.bz2
volse-hubzilla-4e8fc6d19851b6d05a49d5151aaa1f0f1fcfb5c0.zip
Merge remote-tracking branch 'upstream/dev' into dev
Diffstat (limited to 'doc/hook/item_custom.bb')
-rw-r--r--doc/hook/item_custom.bb24
1 files changed, 24 insertions, 0 deletions
diff --git a/doc/hook/item_custom.bb b/doc/hook/item_custom.bb
new file mode 100644
index 000000000..d20c7d76c
--- /dev/null
+++ b/doc/hook/item_custom.bb
@@ -0,0 +1,24 @@
+[h2]item_custom[/h2]
+
+Allow addons to create and process custom item types.
+
+Addon authors will need to use iconfig meta data (with sharing on) or some other method
+to specify and determine whether the custom item is destined for their addon.
+
+It is fed an array of ['item' => ${item_array}, 'allow_exec' => {true/false}]
+
+By default $arr['item']['cancel'] is set to TRUE which will abort storage of the
+custom item in the item table unless the addon unsets it or sets it to false.
+
+[code]
+ if ($arr['item_type']==ITEM_TYPE_CUSTOM) {
+ /* Custom items are not stored by default
+ because they require an addon to process. */
+ $d['item']['cancel']=true;
+
+ call_hooks('item_custom',$d);
+ }
+
+[/code]
+
+see: include/items.php