From: CiaranG Date: Wed, 4 Mar 2009 15:34:04 +0000 (+0000) Subject: Plugins - added a new event (RouterInitialized) which allows a plugin to register... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a7efd4ff556bbf6bafcfc81db758ab192b8802ad;p=quix0rs-gnu-social.git Plugins - added a new event (RouterInitialized) which allows a plugin to register new paths to be routed --- diff --git a/EVENTS.txt b/EVENTS.txt index 2f33b2d5d5..5edf59245a 100644 --- a/EVENTS.txt +++ b/EVENTS.txt @@ -99,3 +99,7 @@ StartPublicGroupNav: Showing the public group nav menu EndPublicGroupNav: At the end of the public group nav menu - $action: the current action + +RouterInitialized: After the router instance has been initialized +- $m: the Net_URL_Mapper that has just been set up + diff --git a/lib/router.php b/lib/router.php index 4b70c01505..d4a4d2ca93 100644 --- a/lib/router.php +++ b/lib/router.php @@ -393,6 +393,8 @@ class Router array('action' => 'showstream'), array('nickname' => '[a-zA-Z0-9]{1,64}')); + Event::handle('RouterInitialized', array($m)); + return $m; }