public function __construct($nav_selector, $params = array()) { $this->raw = wp_get_nav_menu_items($nav_selector, $params); //If false, invalid name passed if ($this->raw === false) { trigger_error("Navigable could not find the navigation object called '{$nav_selector}'", E_USER_NOTICE); } $this->raw = $this->raw === false ? array() : $this->raw; $this->page_slugs = $this->get_page_slugs(); parent::__construct(); }
public function __construct($params = array()) { $this->raw = get_pages($params); parent::__construct(); }