mirror of
https://github.com/e107inc/e107.git
synced 2025-08-12 17:44:37 +02:00
News Carousel added and a method to check if a menu is loaded. (see e107_plugins/news/e_header.php )
This commit is contained in:
@@ -237,8 +237,32 @@ class e_menu
|
||||
return $eMenuArea;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if a menu is currently active.
|
||||
* @param string $menuname (without the '_menu.php' )
|
||||
*/
|
||||
function isLoaded($menuname)
|
||||
{
|
||||
if(empty($menuname))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach($this->eMenuActive as $area)
|
||||
{
|
||||
foreach($area as $menu)
|
||||
{
|
||||
if($menu['menu_name'] == $menuname."_menu")
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user