Cria Pacientes Custom Post Type
if ( ! function_exists('cria_paciente_post_type') ) {
// Register Custom Post Type
function cria_paciente_post_type() {
$labels = array(
'name' => _x( 'Pacientes', 'Post Type General Name', 'paciente' ),
'singular_name' => _x( 'Paciente', 'Post Type Singular Name', 'paciente' ),
'menu_name' => __( 'Pacientes', 'paciente' ),
'name_admin_bar' => __( 'Paciente', 'paciente' ),
'archives' => __( 'Pacientes Arquivos', 'paciente' ),
'attributes' => __( 'Atributos do Paciente', 'paciente' ),
'parent_item_colon' => __( 'Descendente:', 'paciente' ),
'all_items' => __( 'Todos os Pacientes', 'paciente' ),
'add_new_item' => __( 'Adicionar novo Paciente', 'paciente' ),
'add_new' => __( 'Adicionar Paciente', 'paciente' ),
'new_item' => __( 'Novo Paciente', 'paciente' ),
'edit_item' => __( 'Editar Paciente', 'paciente' ),
'update_item' => __( 'Atualizar Paciente', 'paciente' ),
'view_item' => __( 'Ver Paciente', 'paciente' ),
'view_items' => __( 'Ver Pacientes', 'paciente' ),
'search_items' => __( 'Procurar Paciente', 'paciente' ),
'not_found' => __( 'Não encontrado!', 'paciente' ),
'not_found_in_trash' => __( 'Nada encontrado na Lixeira!', 'paciente' ),
'featured_image' => __( 'Selfie do Paciente', 'paciente' ),
'set_featured_image' => __( 'Carregar Selfie do Paciente', 'paciente' ),
'remove_featured_image' => __( 'Remover Selfie', 'paciente' ),
'use_featured_image' => __( 'Usar como Selfie do Paciente', 'paciente' ),
'insert_into_item' => __( 'Inserir no Paciente', 'paciente' ),
'uploaded_to_this_item' => __( 'Enviado para este Paciente', 'paciente' ),
'items_list' => __( 'Lista de Pacientes', 'paciente' ),
'items_list_navigation' => __( 'Lista de Navegação dos Pacientes', 'paciente' ),
'filter_items_list' => __( 'Filtrar lista de Pacientes', 'paciente' ),
);
$args = array(
'label' => __( 'Paciente', 'paciente' ),
'description' => __( 'Pacientes da clínica.', 'paciente' ),
'labels' => $labels,
'supports' => array( 'title', 'thumbnail', 'comments', 'custom-fields' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-groups',
'show_in_admin_bar' => false,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => 'paciente',
'exclude_from_search' => false,
'publicly_queryable' => true,
'query_var' => 'paciente',
'capability_type' => 'page',
'show_in_rest' => false,
);
register_post_type( 'paciente', $args );
}
add_action( 'init', 'cria_paciente_post_type', 0 );
}