1
0
Fork 0

Replace deprecated Addon::*registerHook by Hook::*register

- Updated documentation
This commit is contained in:
Hypolite Petovan 2018-12-26 10:06:05 -05:00
commit c90314cd6a
3 changed files with 17 additions and 17 deletions

View file

@ -32,7 +32,7 @@ It will be displayed in the admin panel and should include some further informat
Register your addon hooks during installation.
Addon::registerHook($hookname, $file, $function);
\Friendica\Core\Hook::register($hookname, $file, $function);
$hookname is a string and corresponds to a known Friendica PHP hook.
@ -74,7 +74,7 @@ If your addon requires adding a stylesheet on all pages of Friendica, add the fo
```php
function <addon>_install()
{
Addon::registerHook('head', __FILE__, '<addon>_head');
\Friendica\Core\Hook::register('head', __FILE__, '<addon>_head');
...
}
@ -97,7 +97,7 @@ If your addon requires adding a script on all pages of Friendica, add the follow
```php
function <addon>_install()
{
Addon::registerHook('footer', __FILE__, '<addon>_footer');
\Friendica\Core\Hook::register('footer', __FILE__, '<addon>_footer');
...
}

View file

@ -26,7 +26,7 @@ Addons sollten einen Kommentarblock mit den folgenden vier Parametern enthalten:
Registriere deine Addon-Hooks während der Installation.
Addon::registerHook($hookname, $file, $function);
\Friendica\Core\Hook::register($hookname, $file, $function);
$hookname ist ein String und entspricht einem bekannten Friendica-Hook.