forked from GNUsocial/gnu-social
a hook for showing the default local nav
This commit is contained in:
parent
097d76b3d2
commit
3377cd59ce
@ -1139,3 +1139,11 @@ StartNoticeWhoGets: Called at start of inbox delivery prep; plugins can schedule
|
|||||||
EndNoticeWhoGets: Called at end of inbox delivery prep; plugins can filter out profiles from receiving inbox delivery here. Be aware that output can be cached or used several times, so should remain idempotent.
|
EndNoticeWhoGets: Called at end of inbox delivery prep; plugins can filter out profiles from receiving inbox delivery here. Be aware that output can be cached or used several times, so should remain idempotent.
|
||||||
- $notice Notice
|
- $notice Notice
|
||||||
- &$ni: in/out array mapping profile IDs to constants: NOTICE_INBOX_SOURCE_SUB etc
|
- &$ni: in/out array mapping profile IDs to constants: NOTICE_INBOX_SOURCE_SUB etc
|
||||||
|
|
||||||
|
StartDefaultLocalNav: When showing the default local nav
|
||||||
|
- $menu: the menu
|
||||||
|
- $user: current user
|
||||||
|
|
||||||
|
EndDefaultLocalNav: When showing the default local nav
|
||||||
|
- $menu: the menu
|
||||||
|
- $user: current user
|
||||||
|
@ -48,9 +48,11 @@ class DefaultLocalNav extends Menu
|
|||||||
{
|
{
|
||||||
function show()
|
function show()
|
||||||
{
|
{
|
||||||
|
$user = common_current_user();
|
||||||
|
|
||||||
$this->action->elementStart('ul', array('id' => 'nav_local_default'));
|
$this->action->elementStart('ul', array('id' => 'nav_local_default'));
|
||||||
|
|
||||||
$user = common_current_user();
|
if (Event::handle('StartDefaultLocalNav', array($this, $user))) {
|
||||||
|
|
||||||
if (!empty($user)) {
|
if (!empty($user)) {
|
||||||
$pn = new PersonalGroupNav($this->action);
|
$pn = new PersonalGroupNav($this->action);
|
||||||
@ -69,6 +71,9 @@ class DefaultLocalNav extends Menu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Event::handle('EndDefaultLocalNav', array($this, $user));
|
||||||
|
}
|
||||||
|
|
||||||
$this->action->elementEnd('ul');
|
$this->action->elementEnd('ul');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user