protected function registerWordpressAction()
    {
        if (function_exists('add_action')) {
            if (Router::isAjax() || is_admin()) {
                add_action('init', array($this, "onWordpressEarlyInit"));
            } else {
                add_action('wp', array($this, "onWordpressInit"), 10);
            }
        }

        $this->registered = true;
    }