Move from hook_init to hook_page_build for widgets.