tabs=array(); $this->container_id=uniqid('tab-'); } public function add_tab($title,$slug,$callback,$args=array()) { $new_tab['title']=$title; $new_tab['slug']=$slug; $new_tab['page']=$callback; foreach ($args as $key=>$arg) { $new_tab[$key]=$arg; if($key === 'is_parent_tab') { $this->is_parent_tab = $arg; } } $this->tabs[]=$new_tab; } public function set_tab($tabs) { foreach ($tabs as $tab) { $new_tab['title']=$tab['title']; $new_tab['slug']=$tab['slug']; $new_tab['page']=$tab['page']; $this->tabs[]=$new_tab; } } public function display() { $class = ''; ?>