Add an event to get plugin discovery hints from XRD

This commit is contained in:
Mikael Nordfeldth 2015-10-04 14:46:45 +02:00
parent 2aed59a02a
commit 684b9419a0

View File

@ -24,6 +24,7 @@ class DiscoveryHints {
{ {
$hints = array(); $hints = array();
if (Event::handle('StartDiscoveryHintsFromXRD', array($xrd, &$hints))) {
foreach ($xrd->links as $link) { foreach ($xrd->links as $link) {
switch ($link->rel) { switch ($link->rel) {
case WebFingerResource_Profile::PROFILEPAGE: case WebFingerResource_Profile::PROFILEPAGE:
@ -47,6 +48,8 @@ class DiscoveryHints {
break; break;
} }
} }
Event::handle('EndDiscoveryHintsFromXRD', array($xrd, &$hints));
}
return $hints; return $hints;
} }