mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 20:17:24 +08:00
custom menu visibility
This commit is contained in:
@@ -466,8 +466,20 @@ function highlight($search,$subject,$hlstart='<b><font class="striking">',$hlend
|
|||||||
|
|
||||||
function get_user_class()
|
function get_user_class()
|
||||||
{
|
{
|
||||||
|
if (IN_NEXUS) {
|
||||||
global $CURUSER;
|
global $CURUSER;
|
||||||
return $CURUSER["class"] ?? '';
|
return $CURUSER["class"] ?? '';
|
||||||
|
}
|
||||||
|
return auth()->user()->class;
|
||||||
|
}
|
||||||
|
|
||||||
|
function get_user_id()
|
||||||
|
{
|
||||||
|
if (IN_NEXUS) {
|
||||||
|
global $CURUSER;
|
||||||
|
return $CURUSER["id"] ?? 0;
|
||||||
|
}
|
||||||
|
return auth()->user()->id ?? 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_user_class_name($class, $compact = false, $b_colored = false, $I18N = false)
|
function get_user_class_name($class, $compact = false, $b_colored = false, $I18N = false)
|
||||||
|
|||||||
@@ -206,5 +206,6 @@ return [
|
|||||||
'target' => 'Open type',
|
'target' => 'Open type',
|
||||||
'style' => 'Style',
|
'style' => 'Style',
|
||||||
'parent_id' => 'Parent',
|
'parent_id' => 'Parent',
|
||||||
|
'min_class' => 'Minimum visible class',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -209,5 +209,6 @@ return [
|
|||||||
'target' => '打开方式',
|
'target' => '打开方式',
|
||||||
'style' => '样式',
|
'style' => '样式',
|
||||||
'parent_id' => '父菜单',
|
'parent_id' => '父菜单',
|
||||||
|
'min_class' => '最低可见等级',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -206,5 +206,6 @@ return [
|
|||||||
'target' => '打開方式',
|
'target' => '打開方式',
|
||||||
'style' => '樣式',
|
'style' => '樣式',
|
||||||
'parent_id' => '父菜單',
|
'parent_id' => '父菜單',
|
||||||
|
'min_class' => '最低可見等級',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user