Commit f3a1a36f authored by Richard Mansfield's avatar Richard Mansfield

Add hook for local customisation of logged-in menu

parent 09ea00e2
......@@ -80,6 +80,7 @@ ensure_sanity();
require('dml.php');
require('web.php');
require('user.php');
require(get_config('docroot') . 'local/lib.php');
// Database access functions
require('adodb/adodb-exceptions.inc.php');
......
......@@ -2005,6 +2005,10 @@ function main_nav() {
$menu = mahara_standard_nav();
}
// local_main_nav_update allows sites to customise the menu by munging the $menu array.
if (function_exists('local_main_nav_update')) {
local_main_nav_update($menu);
}
$menu_structure = find_menu_children($menu, '');
return $menu_structure;
}
......
<?php
/**
* Library file for miscellaneous local customisations.
*
* For simple customisation of a Mahara site, the core code will call some local_* functions
* which may be defined in this file.
*
* - Define the function local_main_nav_update(&$menu) to modify the main navigation menu in the header.
*/
?>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment