fix for initializer - widget is now registered

This commit is contained in:
Jonathan Labreuille
2016-02-03 10:42:56 +01:00
parent a2ef62302f
commit 8ba9fdccbc
3 changed files with 21 additions and 22 deletions

View File

@@ -9,13 +9,13 @@ class Widget {
}
function init() {
add_action('widgets_init', array($this, 'registerWidget'));
$this->registerWidget();
if(!is_admin()) {
//$this->setupActions();
add_action('widgets_init', array($this, 'setupDependencies'));
$this->setupDependencies();
} else {
add_action('widgets_init', array($this, 'setupAdminDependencies'));
$this->setupAdminDependencies();
}
}