Skip to content
Extraits de code Groupes Projets
Valider 2a9e57a2 rédigé par sgiehl's avatar sgiehl
Parcourir les fichiers

add widget only when hook is called

git-svn-id: http://dev.piwik.org/svn/trunk@7788 59fd770c-687e-43c8-a1e3-f5a4ff64c105
parent 932775a8
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -27,7 +27,13 @@ class Piwik_UserCountryMap extends Piwik_Plugin
);
}
function postLoad()
function getListHooksRegistered()
{
$hooks = array('WidgetsList.add' => 'addWidgets');
return $hooks;
}
function addWidgets()
{
Piwik_AddWidget('General_Visitors', Piwik_Translate('UserCountry_WidgetLocation').' ('.Piwik_Translate('UserCountryMap_worldMap').')', 'UserCountryMap', 'worldMap');
}
......
......@@ -40,7 +40,7 @@ class WidgetsListTest extends DatabaseTestCase
$numberOfWidgets = array(
'VisitsSummary_VisitsSummary' => 6,
'Live!' => 2,
'General_Visitors' => 12,
'General_Visitors' => 13,
'UserSettings_VisitorSettings' => 10,
'Actions_Actions' => 8,
'Actions_SubmenuSitesearch' => 5,
......@@ -88,7 +88,7 @@ class WidgetsListTest extends DatabaseTestCase
$numberOfWidgets = array(
'VisitsSummary_VisitsSummary' => 6,
'Live!' => 2,
'General_Visitors' => 12,
'General_Visitors' => 13,
'UserSettings_VisitorSettings' => 10,
'Actions_Actions' => 8,
'Actions_SubmenuSitesearch' => 5,
......@@ -136,7 +136,7 @@ class WidgetsListTest extends DatabaseTestCase
$numberOfWidgets = array(
'VisitsSummary_VisitsSummary' => 6,
'Live!' => 2,
'General_Visitors' => 12,
'General_Visitors' => 13,
'UserSettings_VisitorSettings' => 10,
'Actions_Actions' => 8,
'Actions_SubmenuSitesearch' => 5,
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter