diff --git a/lib/navigationlib.php b/lib/navigationlib.php index 19284f772ed..c650ae0b736 100644 --- a/lib/navigationlib.php +++ b/lib/navigationlib.php @@ -4616,6 +4616,14 @@ class settings_navigation extends navigation_node { $categorynode->add(get_string('restorecourse', 'admin'), $url, self::TYPE_SETTING, null, 'restorecourse', new pix_icon('i/restore', '')); } + // Let plugins hook into category settings navigation. + $pluginsfunction = get_plugins_with_function('extend_navigation_category_settings', 'lib.php'); + foreach ($pluginsfunction as $plugintype => $plugins) { + foreach ($plugins as $pluginfunction) { + $pluginfunction($categorynode, $catcontext); + } + } + return $categorynode; } diff --git a/lib/upgrade.txt b/lib/upgrade.txt index 3ff40604582..6daec09147c 100644 --- a/lib/upgrade.txt +++ b/lib/upgrade.txt @@ -138,6 +138,8 @@ information provided here is intended especially for developers. * external_api::validate_context now is public, it can be called from other classes. * rss_error() now supports returning of correct HTTP status of error and will return '404 Not Found' unless other status is specified. +* Plugins can extend the navigation for categories settings by declaring the following callback: + _extend_navigation_category_settings(navigation_node, context_coursecat) === 2.9.1 ===