diff --git a/lib/navigationlib.php b/lib/navigationlib.php index b8beba71eb847..54ab6ccb4a781 100644 --- a/lib/navigationlib.php +++ b/lib/navigationlib.php @@ -4400,9 +4400,9 @@ protected function load_front_page_settings($forceopen = false) { */ protected function load_local_plugin_settings() { // Get all local plugins with an extend_settings_navigation function in their lib.php file - foreach (get_plugin_list_with_function('local', 'extend_settings_navigation') as $function) { + foreach (get_plugin_list_with_function('local', 'extends_settings_navigation') as $function) { // Call each function providing this (the settings navigation) and the current context. - call_user_func($function, $this, $this->context); + $function($this, $this->context); } } diff --git a/local/readme.txt b/local/readme.txt index 9e09311c12187..b7ec6e3f7880d 100644 --- a/local/readme.txt +++ b/local/readme.txt @@ -205,6 +205,25 @@ You will need to write the /local/nicehack/externallib.php - external functions description and code. See some examples from the core files (/user/externallib.php, /group/externallib.php...). +Local plugin navigation hooks +----------------------------- +There are two functions that your plugin can define that allow it to extend the main +navigation and the settings navigation. +These two functions both need to be defined within /local/nicehack/lib.php. + +sample code +