public function isPageAllowed($page) { if ($this->hook('isPageAllowed', array($page)) === true) { return true; } return in_array($page, $this->allowed_pages) || in_array(str_replace('_', '/', $page), $this->allowed_pages); }