X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=doc%2FAddons.md;h=567e5b27563c273502c505ea29eae05a82901595;hb=9678618dd42ea1877d24db683ef79b3b09817584;hp=dbb2c501fe34d11b4de6b6d1a44eab385d4bdc52;hpb=21f172c585aff8c606774a05fde1548ddff1667d;p=friendica.git diff --git a/doc/Addons.md b/doc/Addons.md index dbb2c501fe..567e5b2756 100644 --- a/doc/Addons.md +++ b/doc/Addons.md @@ -44,7 +44,7 @@ Uninstalling an addon automatically unregisters any hook it registered, but if y The install and uninstall functions will be called (i.e. re-installed) if the addon changes after installation. Therefore your uninstall should not destroy data and install should consider that data may already exist. -Future extensions may provide for "setup" amd "remove". +Future extensions may provide for "setup" and "remove". ## PHP addon hooks @@ -124,7 +124,7 @@ function _footer() ### JavaScript hooks The main Friendica script provides hooks via events dispatched on the `document` property. -In your Javascript file included as described above, add your event listener like this: +In your JavaScript file included as described above, add your event listener like this: ```js document.addEventListener(name, callback); @@ -133,7 +133,7 @@ document.addEventListener(name, callback); - *name* is the name of the hook and corresponds to a known Friendica JavaScript hook. - *callback* is a JavaScript anonymous function to execute. -More info about Javascript event listeners: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener +More info about JavaScript event listeners: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener #### Current JavaScript hooks @@ -264,7 +264,7 @@ $data = [ ##### With multiple submit buttons ```php $data = [ - 'addon' => 'catavar', + 'addon' => 'catavatar', 'title' => DI::l10n()->t('Cat Avatar Settings'), 'html' => $html, 'submit' => [ @@ -402,7 +402,7 @@ Called prior to output of personal XRD file. ### home_content Called prior to output home page content, shown to unlogged users. -`$b` is the HTML sring of section region. +`$b` is the HTML string of section region. ### contact_edit Called when editing contact details on an individual from the Contacts page. @@ -425,7 +425,7 @@ Called after HTML content functions have completed. ### footer Called after HTML content functions have completed. -Deferred Javascript files should be registered using this hook. +Deferred JavaScript files should be registered using this hook. `$b` is (string) HTML of footer div/element. ### avatar_lookup @@ -638,6 +638,14 @@ Hook data: - **uid** (input): the user id to revoke the block for. - **result** (output): a boolean value indicating wether the operation was successful or not. +### support_probe + +Called to assert whether a connector addon provides probing capabilities. + +Hook data: +- **protocol** (input): shorthand for the protocol. List of values is available in `src/Core/Protocol.php`. +- **result** (output): should be true if the connector provides follow capabilities, left alone otherwise. + ### storage_instance Called when a custom storage is used (e.g. webdav_storage) @@ -907,6 +915,7 @@ Here is a complete list of all hook callbacks with file locations (as of 24-Sep- Hook::callAll('revoke_follow', $hook_data); Hook::callAll('block', $hook_data); Hook::callAll('unblock', $hook_data); + Hook::callAll('support_probe', $hook_data); ### src/Core/Logger/Factory.php