<?php

/**
 * Custom post types
 * @see codex.wordpress.org/Function_Reference/register_post_type
 * @see developer.wordpress.org/resource/dashicons
 * @category Functions
 * @author Krik
 */

// Book post type
// add_action('init', 'krik_book_post_type');

function krik_book_post_type()
{
	$labels = array(
		'name' => __('Books', 'krik'),
		'singular_name' => __('Book', 'krik'),
		'menu_name' => __('Books', 'krik'),
		'name_admin_bar' => __('Book', 'krik'),
		'add_new' => __('Add New', 'krik'),
		'add_new_item' => __('Add New Book', 'krik'),
		'new_item' => __('New Book', 'krik'),
		'edit_item' => __('Edit Book', 'krik'),
		'view_item' => __('View Book', 'krik'),
		'all_items' => __('All Books', 'krik'),
		'search_items' => __('Search Books', 'krik'),
		'parent_item_colon' => __('Parent Books:', 'krik'),
		'not_found' => __('No books found.', 'krik'),
		'not_found_in_trash' => __('No books found in Trash.', 'krik')
	);
	$args = array(
		'labels' => $labels,
		'description' => __('Description.', 'krik'),
		'public' => true,
		'publicly_queryable' => true,
		'show_ui' => true,
		'show_in_menu' => true,
		'query_var' => true,
		'menu_icon' => 'dashicons-admin-page',
		'rewrite' => array('slug' => 'book'),
		'capability_type' => 'post',
		'has_archive' => true,
		'hierarchical' => false,
		'menu_position' => null,
		'supports' => array('title', 'editor', 'author', 'thumbnail', 'excerpt')
	);
	register_post_type('book', $args);
}
