Skip to content

Commit

Permalink
refs #4199 inline this event name as we cannot automatically resolve …
Browse files Browse the repository at this point in the history
…it in hook doc generator
  • Loading branch information
tsteur committed Oct 8, 2013
1 parent b738433 commit 73c9b97
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
16 changes: 15 additions & 1 deletion plugins/Live/API.php
Expand Up @@ -357,7 +357,21 @@ public function getVisitorProfile($idSite, $visitorId = false, $segment = false,
$result['nextVisitorId'] = $this->getAdjacentVisitorId($idSite, $visitorId, $latestVisitTime, $segment, $getNext = true);
$result['previousVisitorId'] = $this->getAdjacentVisitorId($idSite, $visitorId, $latestVisitTime, $segment, $getNext = false);

Piwik_PostEvent(Live::GET_EXTRA_VISITOR_DETAILS_EVENT, array(&$result));
/**
* This event is called in the Live.getVisitorProfile API method. Plugins can use this event
* to discover and add extra data to visitor profiles.
*
* For example, if an email address is found in a custom variable, a plugin could load the
* gravatar for the email and add it to the visitor profile so it will display in the
* visitor profile popup.
*
* The following visitor profile elements can be set to augment the visitor profile popup:
* - visitorAvatar: A URL to an image to display in the top left corner of the popup.
* - visitorDescription: Text to be used as the tooltip of the avatar image.
*
* Callback Signature: function (array &$result);
*/
Piwik_PostEvent('Live.getExtraVisitorDetails', array(&$result));

return $result;
}
Expand Down
15 changes: 0 additions & 15 deletions plugins/Live/Live.php
Expand Up @@ -20,21 +20,6 @@
*/
class Live extends \Piwik\Plugin
{
/**
* This event is called in the Live.getVisitorProfile API method. Plugins can use this event
* to discover and add extra data to visitor profiles.
*
* For example, if an email address is found in a custom variable, a plugin could load the
* gravatar for the email and add it to the visitor profile so it will display in the
* visitor profile popup.
*
* The following visitor profile elements can be set to augment the visitor profile popup:
* - visitorAvatar: A URL to an image to display in the top left corner of the popup.
* - visitorDescription: Text to be used as the tooltip of the avatar image.
*
* Callback Signature: function (array &$result);
*/
const GET_EXTRA_VISITOR_DETAILS_EVENT = 'Live.getExtraVisitorDetails';

/**
* @see Piwik_Plugin::getListHooksRegistered
Expand Down

0 comments on commit 73c9b97

Please sign in to comment.