]> git.mxchange.org Git - friendica.git/blobdiff - doc/Addons.md
Merge pull request #8044 from annando/contact-adding
[friendica.git] / doc / Addons.md
index fb9956089dbf4d2ca371d7f61ce588675e8a8c9a..d448b026b8cd8cf6d1fa23cf11cd747161c106f1 100644 (file)
@@ -104,7 +104,7 @@ function <addon>_install()
 
 function <addon>_head(App $a)
 {
-       $a->registerStylesheet(__DIR__ . '/relative/path/to/addon/stylesheet.css');
+       \Friendica\DI::page()->registerStylesheet(__DIR__ . '/relative/path/to/addon/stylesheet.css');
 }
 ```
 
@@ -126,7 +126,7 @@ function <addon>_install()
 
 function <addon>_footer(App $a)
 {
-       $a->registerFooterScript(__DIR__ . '/relative/path/to/addon/script.js');
+       \Friendica\DI::page()->registerFooterScript(__DIR__ . '/relative/path/to/addon/script.js');
 }
 ```
 
@@ -472,14 +472,14 @@ Here is a complete list of all hook callbacks with file locations (as of 24-Sep-
 
     Hook::callAll('init_1');
     Hook::callAll('app_menu', $arr);
-    Hook::callAll('page_content_top', $a->page['content']);
+    Hook::callAll('page_content_top', DI::page()['content']);
     Hook::callAll($a->module.'_mod_init', $placeholder);
     Hook::callAll($a->module.'_mod_init', $placeholder);
     Hook::callAll($a->module.'_mod_post', $_POST);
     Hook::callAll($a->module.'_mod_afterpost', $placeholder);
     Hook::callAll($a->module.'_mod_content', $arr);
     Hook::callAll($a->module.'_mod_aftercontent', $arr);
-    Hook::callAll('page_end', $a->page['content']);
+    Hook::callAll('page_end', DI::page()['content']);
 
 ### include/api.php
 
@@ -703,7 +703,7 @@ Here is a complete list of all hook callbacks with file locations (as of 24-Sep-
 
 ### src/Content/Nav.php
 
-    Hook::callAll('page_header', $a->page['nav']);
+    Hook::callAll('page_header', DI::page()['nav']);
     Hook::callAll('nav_info', $nav);
 
 ### src/Worker/Directory.php
@@ -716,7 +716,6 @@ Here is a complete list of all hook callbacks with file locations (as of 24-Sep-
 
 ### src/Module/Login.php
 
-    Hook::callAll('authenticate', $addon_auth);
     Hook::callAll('login_hook', $o);
 
 ### src/Module/Logout.php
@@ -740,6 +739,7 @@ Here is a complete list of all hook callbacks with file locations (as of 24-Sep-
 ### src/Core/Authentication.php
 
     Hook::callAll('logged_in', $a->user);
+    Hook::callAll('authenticate', $addon_auth);
 
 ### src/Core/Hook.php