]> git.mxchange.org Git - friendica.git/blobdiff - mod/home.php
Improve Addons documentation
[friendica.git] / mod / home.php
index 733f612bd0bb3b02caec9503bbd0bda97937ac0d..206a1827ea1d67eb4a0a575b2c39f2cdebdc8cea 100644 (file)
@@ -1,7 +1,11 @@
 <?php
-
+/**
+ * @file mod/home.php
+ */
 use Friendica\App;
+use Friendica\Core\Addon;
 use Friendica\Core\Config;
+use Friendica\Core\L10n;
 use Friendica\Core\System;
 use Friendica\Module\Login;
 
@@ -9,7 +13,7 @@ if(! function_exists('home_init')) {
 function home_init(App $a) {
 
        $ret = [];
-       call_hooks('home_init',$ret);
+       Addon::callHooks('home_init',$ret);
 
        if (local_user() && ($a->user['nickname'])) {
                goaway(System::baseUrl()."/network");
@@ -31,8 +35,8 @@ function home_content(App $a) {
                unset($_SESSION['mobile-theme']);
        }
 
-       $customhome = False;
-       $defaultheader = '<h1>'.((x($a->config,'sitename')) ? sprintf(t("Welcome to %s"), $a->config['sitename']) : "").'</h1>';
+       $customhome = false;
+       $defaultheader = '<h1>'.((x($a->config,'sitename')) ? L10n::t("Welcome to %s", $a->config['sitename']) : "").'</h1>';
 
        $homefilepath = $a->basepath . "/home.html";
        $cssfilepath = $a->basepath . "/home.css";
@@ -46,7 +50,7 @@ function home_content(App $a) {
        $login = Login::form($a->query_string, $a->config['register_policy'] == REGISTER_CLOSED ? 0 : 1);
 
        $content = '';
-       call_hooks("home_content",$content);
+       Addon::callHooks("home_content",$content);
 
 
        $tpl = get_markup_template('home.tpl');