<?php 

function cptui_register_my_cpts_emails() {

	/**
	 * Post Type: Emails.
	 */
	$labels = array(
		"name" => __( "Emails", "EMQ" ),
		"singular_name" => __( "Email", "EMQ" ),
		"menu_name" => __( "Emails", "EMQ" ),
		"all_items" => __( "Todos los emails", "EMQ" ),
		"add_new" => __( "Agregar email", "EMQ" ),
		"add_new_item" => __( "Añadir nuevo email", "EMQ" ),
		"edit_item" => __( "Editar email", "EMQ" ),
		"new_item" => __( "Nuevo email", "EMQ" ),
		"view_item" => __( "Ver email", "EMQ" ),
		"view_items" => __( "Ver email", "EMQ" ),
		"search_items" => __( "Buscar email", "EMQ" ),
		"not_found" => __( "No se encontró el email", "EMQ" ),
		"not_found_in_trash" => __( "No se encontro en la papelera", "EMQ" ),
		"featured_image" => __( "Imagen destacada", "EMQ" ),
		"set_featured_image" => __( "Establecer imagen destacada", "EMQ" ),
		"remove_featured_image" => __( "Remover imagen destacada", "EMQ" ),
		"use_featured_image" => __( "Utilizar como imagen destacada", "EMQ" ),
	);

	$args = array(
		"label" => __( "Emails", "EMQ" ),
		"labels" => $labels,
		"description" => "",
		"public" => true,
		"publicly_queryable" => true,
		"show_ui" => true,
		"delete_with_user" => false,
		"show_in_rest" => false,
		"rest_base" => "",
		"rest_controller_class" => "WP_REST_Posts_Controller",
		"has_archive" => false,
		"show_in_menu" => true,
		"show_in_nav_menus" => true,
		"exclude_from_search" => false,
		"capability_type" => "post",
		"map_meta_cap" => true,
		"hierarchical" => false,
		"rewrite" => array( "slug" => "email", "with_front" => true ),
		"query_var" => true,
		"menu_icon" => "dashicons-email-alt",
		"supports" => array( "title", "editor", "thumbnail", "custom-fields", "author" ),
		"show_in_graphql" => true,
		"hierarchical" => true,
		"graphql_single_name" => "email",
		"graphql_plural_name" => "emails",
	);

	register_post_type( "email", $args );
}

add_action( 'init', 'cptui_register_my_cpts_emails' );

?>