]> git.mxchange.org Git - friendica.git/blobdiff - doc/Addons.md
Merge pull request #13484 from xundeenergie/better-navigation
[friendica.git] / doc / Addons.md
index 497717e6f798e846824e11706567f5289dd5f1b9..bfccde5ddf8908da796480199ba8a2151c1ec23c 100644 (file)
@@ -221,12 +221,13 @@ Please note: body contents are bbcode - not HTML
 Called when receiving a post from another source. This may also be used to post local activity or system generated messages.
 `$b` is the item array of information to be stored in the database and the item body is bbcode.
 
-### get_language
+### detect_languages
 Called after the language detection. This can be used for alternative language detection methods.
 `$data` is an array:
 
 - **text**: The text that is analyzed.
-- **detected**: The array with the original language detection. Can be overwritten via an addon.
+- **detected**: (input/output) Array of language codes detected in the related text. The array key is the language code, the array value the probability.
+- **uri-id**: The Uri-Id of the item.
 
 ### addon_settings
 Called when generating the HTML for the addon settings page.
@@ -807,7 +808,7 @@ Here is a complete list of all hook callbacks with file locations (as of 24-Sep-
 
 ### src/Model/Item.php
 
-    Hook::callAll('get_language', $item);
+    Hook::callAll('detect_languages', $item);
     Hook::callAll('post_local', $item);
     Hook::callAll('post_remote', $item);
     Hook::callAll('post_local_end', $posted_item);