<?php
if ( ! function_exists('xs_post_type_speaker') ) {

// Register Custom Post Type
function xs_post_type_speaker() {

	$labels = array(
		'name'                => _x( 'Speakers', 'Post Type General Name', 'xs' ),
		'singular_name'       => _x( 'Speaker', 'Post Type Singular Name', 'xs' ),
		'menu_name'           => __( 'Speaker', 'xs' ),
		'parent_item_colon'   => __( 'Parent Speaker:', 'xs' ),
		'all_items'           => __( 'All Speakers', 'xs' ),
		'view_item'           => __( 'View Speaker', 'xs' ),
		'add_new_item'        => __( 'Add New Speaker', 'xs' ),
		'add_new'             => __( 'Add New Speaker', 'xs' ),
		'edit_item'           => __( 'Change Speaker', 'xs' ),
		'update_item'         => __( 'Update Speaker', 'xs' ),
		'search_items'        => __( 'Search Speaker', 'xs' ),
		'not_found'           => __( 'Not found', 'xs' ),
		'not_found_in_trash'  => __( 'Not found in Trash', 'xs' ),
	);
	$args = array(
		'label'               => __( 'speaker', 'xs' ),
		'description'         => __( 'onEvent Speaker', 'xs' ),
		'labels'              => $labels,
		'supports'            => array( 'title', 'editor', 'page-attributes', ),
		'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( 'speaker', $args );

}

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

}