/* 
Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme-child/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 2.0.0
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/* Add your custom styles here */


// Register Custom Post Type Project
function create_project_cpt() {

	$labels = array(
		'name' => _x( 'Projects', 'Post Type General Name', 'pac' ),
		'singular_name' => _x( 'Project', 'Post Type Singular Name', 'pac' ),
		'menu_name' => _x( 'Projects', 'Admin Menu text', 'pac' ),
		'name_admin_bar' => _x( 'Project', 'Add New on Toolbar', 'pac' ),
		'archives' => __( 'Project Archives', 'pac' ),
		'attributes' => __( 'Project Attributes', 'pac' ),
		'parent_item_colon' => __( 'Parent Project:', 'pac' ),
		'all_items' => __( 'All Projects', 'pac' ),
		'add_new_item' => __( 'Add New Project', 'pac' ),
		'add_new' => __( 'Add New', 'pac' ),
		'new_item' => __( 'New Project', 'pac' ),
		'edit_item' => __( 'Edit Project', 'pac' ),
		'update_item' => __( 'Update Project', 'pac' ),
		'view_item' => __( 'View Project', 'pac' ),
		'view_items' => __( 'View Projects', 'pac' ),
		'search_items' => __( 'Search Project', 'pac' ),
		'not_found' => __( 'Not found', 'pac' ),
		'not_found_in_trash' => __( 'Not found in Trash', 'pac' ),
		'featured_image' => __( 'Featured Image', 'pac' ),
		'set_featured_image' => __( 'Set featured image', 'pac' ),
		'remove_featured_image' => __( 'Remove featured image', 'pac' ),
		'use_featured_image' => __( 'Use as featured image', 'pac' ),
		'insert_into_item' => __( 'Insert into Project', 'pac' ),
		'uploaded_to_this_item' => __( 'Uploaded to this Project', 'pac' ),
		'items_list' => __( 'Projects list', 'pac' ),
		'items_list_navigation' => __( 'Projects list navigation', 'pac' ),
		'filter_items_list' => __( 'Filter Projects list', 'pac' ),
	);
	$args = array(
		'label' => __( 'Project', 'pac' ),
		'description' => __( '', 'pac' ),
		'labels' => $labels,
		'menu_icon' => '',
		'supports' => array('title', 'editor', 'excerpt', 'thumbnail'),
		'taxonomies' => array(),
		'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,
		'hierarchical' => true,
		'exclude_from_search' => false,
		'show_in_rest' => true,
		'publicly_queryable' => true,
		'capability_type' => 'post',
	);
	register_post_type( 'project', $args );

}
add_action( 'init', 'create_project_cpt', 0 );


// Register Taxonomy Project Category
function create_projectcategory_tax() {

	$labels = array(
		'name'              => _x( 'Project Categories', 'taxonomy general name', 'pac' ),
		'singular_name'     => _x( 'Project Category', 'taxonomy singular name', 'pac' ),
		'search_items'      => __( 'Search Project Categories', 'pac' ),
		'all_items'         => __( 'All Project Categories', 'pac' ),
		'parent_item'       => __( 'Parent Project Category', 'pac' ),
		'parent_item_colon' => __( 'Parent Project Category:', 'pac' ),
		'edit_item'         => __( 'Edit Project Category', 'pac' ),
		'update_item'       => __( 'Update Project Category', 'pac' ),
		'add_new_item'      => __( 'Add New Project Category', 'pac' ),
		'new_item_name'     => __( 'New Project Category Name', 'pac' ),
		'menu_name'         => __( 'Project Category', 'pac' ),
	);
	$args = array(
		'labels' => $labels,
		'description' => __( '', 'pac' ),
		'hierarchical' => true,
		'public' => true,
		'publicly_queryable' => true,
		'show_ui' => true,
		'show_in_menu' => true,
		'show_in_nav_menus' => true,
		'show_tagcloud' => true,
		'show_in_quick_edit' => true,
		'show_admin_column' => true,
		'show_in_rest' => true,
	);
	register_taxonomy( 'projectcategory', array('project'), $args );

}
add_action( 'init', 'create_projectcategory_tax' );