<?php

if ( ! function_exists('xs_register_list') ) {

// Register Custom Post Type
function xs_register_list() {

	$labels = array(
		'name'                => _x( 'Register List', 'Post Type General Name', 'xs' ),
		'singular_name'       => _x( 'Register List', 'Post Type Singular Name', 'xs' ),
		'menu_name'           => __( 'Register List', 'xs' ),
		'parent_item_colon'   => __( 'Parent List:', 'xs' ),
		'all_items'           => __( 'All Registers', 'xs' ),
		'view_item'           => __( 'View Registers', 'xs' ),
		'add_new_item'        => __( 'Add New Register', 'xs' ),
		'add_new'             => __( 'Add New Register', 'xs' ),
		'edit_item'           => __( 'Change Register', 'xs' ),
		'update_item'         => __( 'Update Register', 'xs' ),
		'search_items'        => __( 'Search Register', 'xs' ),
		'not_found'           => __( 'Not found', 'xs' ),
		'not_found_in_trash'  => __( 'Not found in Trash', 'xs' ),
	);
	$args = array(
		'label'               => __( 'xs_register_list', 'xs' ),
		'description'         => __( 'Event Register', 'xs' ),
		'labels'              => $labels,
		'supports'            => array( 'title' ),
		'taxonomies'          => array( '' ),
		'hierarchical'        => false,
		'public'              => false,
		'show_ui'             => true,
		'show_in_menu'        => true,
		'show_in_nav_menus'   => false,
		'show_in_admin_bar'   => true,
		'menu_position'       => 5,
		'can_export'          => true,
		'has_archive'         => true,
		'rewrite'			  => false,
		'exclude_from_search' => true,
		'publicly_queryable'  => true,
		'capability_type'     => 'page',
	);
	register_post_type( 'xs_register_list', $args );

}

// Hook into the 'init' action
add_action( 'init', 'xs_register_list', 0 );

}