<?php
class AnpsTeam {
    public function __construct() {
        $this->register_post_type();
    }
    
    private function register_post_type() {
        //team single page option
        $team_single_option = get_option('anps_team_single_page', '1');
        
        $query_var = 'team';
        if($team_single_option == '') {
            $query_var = false;
        }
        
        $args = array(
          'labels' => array(
              'name' =>'Team',
              'singular_name' => 'Team',
              'add_new' => 'Add new',
              'add_new_item' => 'Add new item',
              'edit_item' => 'Edit item',
              'new_item' => 'New item',
              'view_item' => 'View team',
              'search_items' => 'Search team',
              'not_found' => 'No team found'
            ),
            'query_var' => $query_var,
            'rewrite' => array(
                'slug' => 'team'
            ),
            'public' => true,
            'supports' => array(
                            'title',
                            'thumbnail',
                            'editor',
                            'excerpt'
            )
        );
        
       register_post_type('team', $args);
    }
}