/** * render_page * * This is the function that is called when a framework option page gets opened. * It checks the current page slug and based on that slug filters the $this->avia_superobject->option_page_data options array. * All option sets with the same slug get renderd with the help of the avia_htmlhelper class. */ function render_page() { $current_slug = $_GET['page']; $firstClass = 'avia_active_container'; //make page title accessible foreach ($this->avia_superobject->option_pages as $key => $data_set) { if ($data_set['parent'] == $data_set['slug'] && $data_set['slug'] == $current_slug) { $this->avia_superobject->currentpage = $data_set['title']; break; } } $this->avia_superobject->page_slug = $current_slug; $html = new avia_htmlhelper($this->avia_superobject); echo $html->page_header(); foreach ($this->avia_superobject->option_pages as $option_page) { if ($current_slug == $option_page['parent']) { echo $html->create_container_based_on_slug($option_page, $firstClass); $firstClass = ""; } } echo $html->page_footer(); }