]> git.mxchange.org Git - friendica.git/blobdiff - doc/Plugins.md
Merge pull request #3743 from MrPetovan/task/update-languagedetect
[friendica.git] / doc / Plugins.md
index 49d0665fec9efd2e277816769bd6cfb0b1c09e76..ab8c58eb856801efd20c2cca07e783dbae91f199 100644 (file)
@@ -36,11 +36,14 @@ This *should* be 'addon/plugin_name/plugin_name.php' in most cases.
 
 $function is a string and is the name of the function which will be executed when the hook is called.
 
+Please also add a README or README.md file to the addon directory.
+It will be displayed in the admin panel and should include some further information in addition to the header information.
+
 Arguments
 ---
 Your hook callback functions will be called with at least one and possibly two arguments
 
-    function myhook_function(&$a, &$b) {
+    function myhook_function(App $a, &$b) {
 
     }
 
@@ -77,9 +80,9 @@ This will include:
     $a->argc = 3
     $a->argv = array(0 => 'plugin', 1 => 'arg1', 2 => 'arg2');
 
-Your module functions will often contain the function plugin_name_content(&$a), which defines and returns the page body content.
-They may also contain plugin_name_post(&$a) which is called before the _content function and typically handles the results of POST forms.
-You may also have plugin_name_init(&$a) which is called very early on and often does module initialisation.
+Your module functions will often contain the function plugin_name_content(App $a), which defines and returns the page body content.
+They may also contain plugin_name_post(App $a) which is called before the _content function and typically handles the results of POST forms.
+You may also have plugin_name_init(App $a) which is called very early on and often does module initialisation.
 
 Templates
 ---
@@ -285,7 +288,7 @@ $b is an array with:
 is called after the other queries have passed.
 The registered function can add, change or remove the acl_lookup() variables.
 
-    'results' => array of the acl_lookup() vars 
+    'results' => array of the acl_lookup() vars
 
 
 Complete list of hook callbacks