diff options
author | Mario <mario@mariovavti.com> | 2018-12-15 20:55:28 +0100 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2018-12-15 20:55:28 +0100 |
commit | 3ed6763da9cd34a1124d57928a850d0583cdc023 (patch) | |
tree | 356172e9d8ffe837bee95bc9c1698ece3d5b4606 /doc/hook/item_custom.bb | |
parent | dbeabb8ff08819e35774b527c18c31ba9237ca3f (diff) | |
parent | 09b2cdd618217c2dfc0149579ce1780c201a50ea (diff) | |
download | volse-hubzilla-3ed6763da9cd34a1124d57928a850d0583cdc023.tar.gz volse-hubzilla-3ed6763da9cd34a1124d57928a850d0583cdc023.tar.bz2 volse-hubzilla-3ed6763da9cd34a1124d57928a850d0583cdc023.zip |
Merge branch 'custom-item-types' into 'dev'
Add ITEM_TYPE_CUSTOM and hooks for processing custom item types
See merge request hubzilla/core!1431
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 |