aboutsummaryrefslogtreecommitdiffstats
path: root/include/nav.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-11-28 20:17:07 -0800
committerfriendica <info@friendica.com>2013-11-28 20:17:07 -0800
commit7536ed6e449e0d405394155b50f5e1ce96fd7776 (patch)
tree31ca9f31003d049df3be83c367fe3f4f257bf5bb /include/nav.php
parent8cd9a2c3a944e804c72ef461df801116c6b44ac7 (diff)
downloadvolse-hubzilla-7536ed6e449e0d405394155b50f5e1ce96fd7776.tar.gz
volse-hubzilla-7536ed6e449e0d405394155b50f5e1ce96fd7776.tar.bz2
volse-hubzilla-7536ed6e449e0d405394155b50f5e1ce96fd7776.zip
allow themes to mess with the navbar contents without a custom template. It's done as a callback using a transient plugin hook.
For instance to get rid of the notifications link: insert_hook('nav','strip_notify'); function strip_notify($a,&$b) { unset($b['nav']['notifications']); }
Diffstat (limited to 'include/nav.php')
-rw-r--r--include/nav.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/nav.php b/include/nav.php
index 51c1cc583..56644f6fd 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -201,16 +201,19 @@ EOT;
if($banner === false)
$banner = 'red';
+ $x = array('nav' => $nav, 'usermenu' => $userinfo );
+ call_hooks('nav', $x);
+
$tpl = get_markup_template('nav.tpl');
$a->page['nav'] .= replace_macros($tpl, array(
'$baseurl' => $a->get_baseurl(),
'$langselector' => ((get_config('system','select_language')) ? lang_selector() : ''),
'$sitelocation' => $sitelocation,
- '$nav' => $nav,
+ '$nav' => $x['nav'],
'$banner' => $banner,
'$emptynotifications' => t('Nothing new here'),
- '$userinfo' => $userinfo,
+ '$userinfo' => $x['usermenu'],
'$localuser' => local_user(),
'$sel' => $a->nav_sel,
'$apps' => $a->get_apps(),