diff options
author | Thomas Steur <thomas.steur@googlemail.com> | 2014-06-06 07:50:06 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@googlemail.com> | 2014-06-06 07:50:06 +0400 |
commit | bedfa1c9de069801d58de9642c92f8681c69d7bb (patch) | |
tree | 7abafc84eb446736dbe9df5f6c5e8d7b4d7aaf1f /plugins/SEO | |
parent | b457fcc96885ae6a33896be4f1e98aec9efaf0fa (diff) |
working on simplifying widgets. Pushing into a branch since I am not 100% happy with it yet.
Diffstat (limited to 'plugins/SEO')
-rw-r--r-- | plugins/SEO/SEO.php | 15 | ||||
-rw-r--r-- | plugins/SEO/Widgets.php | 20 |
2 files changed, 20 insertions, 15 deletions
diff --git a/plugins/SEO/SEO.php b/plugins/SEO/SEO.php index 334a5ed2a6..17ce2d5eb6 100644 --- a/plugins/SEO/SEO.php +++ b/plugins/SEO/SEO.php @@ -9,7 +9,6 @@ namespace Piwik\Plugins\SEO; use Piwik\Version; -use Piwik\WidgetsList; /** */ @@ -28,18 +27,4 @@ class SEO extends \Piwik\Plugin 'license_homepage' => 'http://www.gnu.org/licenses/gpl.html' ); } - - /** - * @see Piwik\Plugin::getListHooksRegistered - */ - public function getListHooksRegistered() - { - $hooks = array('WidgetsList.addWidgets' => 'addWidgets'); - return $hooks; - } - - function addWidgets() - { - WidgetsList::add('SEO', 'SEO_SeoRankings', 'SEO', 'getRank'); - } } diff --git a/plugins/SEO/Widgets.php b/plugins/SEO/Widgets.php new file mode 100644 index 0000000000..9e65a0185c --- /dev/null +++ b/plugins/SEO/Widgets.php @@ -0,0 +1,20 @@ +<?php +/** + * Piwik - Open source web analytics + * + * @link http://piwik.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + * + */ +namespace Piwik\Plugins\SEO; + +use Piwik\WidgetsList; + +class Widgets extends \Piwik\Plugin\Widgets +{ + public function configure(WidgetsList $widgetsList) + { + $widgetsList->add('SEO', 'SEO_SeoRankings', 'SEO', 'getRank'); + } + +} |