aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorM. Dent <dentm42@gmail.com>2018-09-29 20:22:27 +0200
committerM. Dent <dentm42@gmail.com>2018-09-29 20:22:27 +0200
commitff20370d0bd8c08942c062ab105bc839969a3902 (patch)
tree9b0f7404da31898da98d295f0686c252050f763c /doc
parentcc9ca8bbffaceb7273b4999e538a3d211ae3cf09 (diff)
downloadvolse-hubzilla-ff20370d0bd8c08942c062ab105bc839969a3902.tar.gz
volse-hubzilla-ff20370d0bd8c08942c062ab105bc839969a3902.tar.bz2
volse-hubzilla-ff20370d0bd8c08942c062ab105bc839969a3902.zip
Status editor hook
Diffstat (limited to 'doc')
-rw-r--r--doc/hook/status_editor.bb31
-rw-r--r--doc/hooklist.bb3
2 files changed, 34 insertions, 0 deletions
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/hooklist.bb b/doc/hooklist.bb
index b71a28e63..aab4aff33 100644
--- a/doc/hooklist.bb
+++ b/doc/hooklist.bb
@@ -595,6 +595,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/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()