diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/hook/addon_app_installed_filter.bb | 18 | ||||
-rw-r--r-- | doc/hook/app_destroy.bb | 4 | ||||
-rw-r--r-- | doc/hook/app_installed_filter.bb | 17 | ||||
-rw-r--r-- | doc/hook/status_editor.bb | 31 | ||||
-rw-r--r-- | doc/hook/system_app_installed_filter.bb | 18 | ||||
-rw-r--r-- | doc/hooklist.bb | 15 |
6 files changed, 103 insertions, 0 deletions
diff --git a/doc/hook/addon_app_installed_filter.bb b/doc/hook/addon_app_installed_filter.bb new file mode 100644 index 000000000..e610b3205 --- /dev/null +++ b/doc/hook/addon_app_installed_filter.bb @@ -0,0 +1,18 @@ +[h2]addon_app_installed_filter[/h2] + +Allow plugins to filter the result of addon_app_installed. + +Code excerpt: + +[code] + $filter_arr = [ + 'uid'=>$uid, + 'app'=>$app, + 'installed'=>$r + ]; + call_hooks('addon_app_installed_filter',$filter_arr); + $r = $filter_arr['installed']; +[/code] + +cxref: Zotlabs/Lib/Apps.php + diff --git a/doc/hook/app_destroy.bb b/doc/hook/app_destroy.bb new file mode 100644 index 000000000..386d7af16 --- /dev/null +++ b/doc/hook/app_destroy.bb @@ -0,0 +1,4 @@ +[h2]app_destroy[/h2] + +Allows addons to perform some post delete actions. + diff --git a/doc/hook/app_installed_filter.bb b/doc/hook/app_installed_filter.bb new file mode 100644 index 000000000..f0d91d6f0 --- /dev/null +++ b/doc/hook/app_installed_filter.bb @@ -0,0 +1,17 @@ +[h2]app_installed_filter[/h2] + +Allow plugins to filter the result of app_installed. + +Code excerpt: + +[code] + $filter_arr = [ + 'uid'=>$uid, + 'app'=>$app, + 'installed'=>$r + ]; + call_hooks('app_installed_filter',$filter_arr); + $r = $filter_arr['installed']; +[/code] + +cxref: Zotlabs/Lib/Apps.php diff --git a/doc/hook/status_editor.bb b/doc/hook/status_editor.bb new file mode 100644 index 000000000..00e97a7c9 --- /dev/null +++ b/doc/hook/status_editor.bb @@ -0,0 +1,31 @@ +[h2]status_editor[/h2] + +Replace the default status_editor (jot). + +Allow plugins to replace the default status editor in a context dependent manner. + +It is fed an array of ['editor_html' => '', 'x' => $x, 'popup' => $popup, 'module' => $module]. + +All calls to the status_editor at the time of the creation of this hook have been updated +to set $module at invocation. This allows addon developers to have a context dependent editor +based on the Hubzilla module/addon. + +Calls to status_editor() are in the form of: + status_editor($a, $x, $popup, $module). + +Future module/addon developers are encouraged to set $popup and $module when invoking the +status_editor. + + +[code] + $hook_info = ['editor_html' => '', 'x' => $x, 'popup' => $popup, 'module' => $module]; + call_hooks('status_editor',$hook_info); + if ($hook_info['editor_html'] == '') { + return hz_status_editor($a, $x, $popup); + } else { + return $hook_info['editor_html']; + } + +[/code] + +see: include/conversation.php diff --git a/doc/hook/system_app_installed_filter.bb b/doc/hook/system_app_installed_filter.bb new file mode 100644 index 000000000..a269a79a8 --- /dev/null +++ b/doc/hook/system_app_installed_filter.bb @@ -0,0 +1,18 @@ +[h2]system_app_installed_filter[/h2] + +Allow plugins to filter the result of system_app_installed. + +Code excerpt: + +[code] + $filter_arr = [ + 'uid'=>$uid, + 'app'=>$app, + 'installed'=>$r + ]; + call_hooks('system_app_installed_filter',$filter_arr); + $r = $filter_arr['installed']; +[/code] + +cxref: Zotlabs/Lib/Apps.php + diff --git a/doc/hooklist.bb b/doc/hooklist.bb index d7fe633ba..d493e4feb 100644 --- a/doc/hooklist.bb +++ b/doc/hooklist.bb @@ -37,6 +37,9 @@ Hooks allow plugins/addons to "hook into" the code at many points and alter the [zrl=[baseurl]/help/hook/activity_order]activity_order[/zrl] Called when generating the list of order options for the network page +[zrl=[baseurl]/help/hook/addon_app_installed_filter]addon_app_installed_filter[/zrl] + Called when determining whether an addon_app is installed + [zrl=[baseurl]/help/hook/activity_received]activity_received[/zrl] Called when an activity (post, comment, like, etc.) has been received from a zot source @@ -49,6 +52,12 @@ Hooks allow plugins/addons to "hook into" the code at many points and alter the [zrl=[baseurl]/help/hook/api_perm_is_allowed]api_perm_is_allowed[/zrl] Called when perm_is_allowed() is executed from an API call. +[zrl=[baseurl]/help/hook/app_destroy]app_destroy[/zrl] + Called when an app is deleted + +[zrl=[baseurl]/help/hook/app_installed_filter]app_installed_filter[/zrl] + Called when determining whether an app is installed + [zrl=[baseurl]/help/hook/app_menu]app_menu[/zrl] Called when generating the app_menu dropdown (may be obsolete) @@ -589,9 +598,15 @@ 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/status_editor]status_editor[/zrl] + Called when generating the status_editor. + [zrl=[baseurl]/help/hook/stream_item]stream_item[/zrl] Called for each item which is rendered for viewing via conversation() +[zrl=[baseurl]/help/hook/system_app_installed_filter]system_app_installed_filter[/zrl] + Called when determining whether a system app is installed + [zrl=[baseurl]/help/hook/tagged]tagged[/zrl] Called when a delivery is processed which results in you being tagged |