diff options
author | DM42.Net (Matt Dent) <dentm42@dm42.net> | 2018-12-14 20:20:26 -0500 |
---|---|---|
committer | DM42.Net (Matt Dent) <dentm42@dm42.net> | 2018-12-14 20:20:26 -0500 |
commit | 09b2cdd618217c2dfc0149579ce1780c201a50ea (patch) | |
tree | c32cba336c19e08f5ec2fc4389c176b52ca1adf0 /doc/hook/item_custom.bb | |
parent | f81a3ba45d50c0a0e4da68c17aba73425058e23d (diff) | |
download | volse-hubzilla-09b2cdd618217c2dfc0149579ce1780c201a50ea.tar.gz volse-hubzilla-09b2cdd618217c2dfc0149579ce1780c201a50ea.tar.bz2 volse-hubzilla-09b2cdd618217c2dfc0149579ce1780c201a50ea.zip |
Add ITEM_TYPE_CUSTOM and hooks for processing custom item types
Diffstat (limited to 'doc/hook/item_custom.bb')
-rw-r--r-- | doc/hook/item_custom.bb | 24 |
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 |