Ticket type
if ( ! function_exists('wp_sb_ticket_edit') ) {
// Register Custom Post Type
function wp_sb_ticket_edit() {
$labels = array(
'name' => 'Tickets',
'singular_name' => 'Ticket',
'menu_name' => 'Tickets',
'name_admin_bar' => 'Tickets',
'archives' => 'Ticket Archives',
'parent_item_colon' => 'Parent ticket',
'all_items' => 'All tickets',
'add_new_item' => 'Add New ticket',
'add_new' => 'Add New',
'new_item' => 'New ticket',
'edit_item' => 'Edit ticket',
'update_item' => 'Update ticket',
'view_item' => 'View tickeg',
'search_items' => 'Search ticket',
'not_found' => 'Not found',
'not_found_in_trash' => 'Not found in Trash',
'featured_image' => 'Featured Image',
'set_featured_image' => 'Set featured image',
'remove_featured_image' => 'Remove featured image',
'use_featured_image' => 'Use as featured image',
'insert_into_item' => 'Insert into ticket',
'uploaded_to_this_item' => 'Uploaded to this ticket',
'items_list' => 'Ticket list',
'items_list_navigation' => 'Ticket list navigation',
'filter_items_list' => 'Filter ticket list',
);
$args = array(
'label' => 'Ticket',
'description' => 'A ticket',
'labels' => $labels,
'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'revisions', 'custom-fields', ),
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => true,
'publicly_queryable' => true,
'capability_type' => 'page',
);
register_post_type( 'ticket', $args );
}
add_action( 'init', 'wp_sb_ticket_edit', 0 );
}