<?php
/**
 * Custom post type: Expertise.
 *
 * Private content type. Not publicly queryable, no archive, no rewrites.
 * Surfaces only through the audace/expertise-showcase block.
 */

if ( ! defined( 'ABSPATH' ) ) {
    exit;
}

add_action( 'init', function () {
    register_post_type( 'expertise', array(
        'labels' => array(
            'name'               => __( 'Expertises', 'audace' ),
            'singular_name'      => __( 'Expertise', 'audace' ),
            'add_new'            => __( 'Ajouter', 'audace' ),
            'add_new_item'       => __( 'Ajouter une expertise', 'audace' ),
            'edit_item'          => __( 'Modifier l\'expertise', 'audace' ),
            'new_item'           => __( 'Nouvelle expertise', 'audace' ),
            'view_item'          => __( 'Voir l\'expertise', 'audace' ),
            'search_items'       => __( 'Rechercher une expertise', 'audace' ),
            'not_found'          => __( 'Aucune expertise trouvée', 'audace' ),
            'not_found_in_trash' => __( 'Aucune expertise dans la corbeille', 'audace' ),
            'menu_name'          => __( 'Expertises', 'audace' ),
        ),
        'public'             => false,
        'show_ui'            => true,
        'show_in_menu'       => true,
        'show_in_rest'       => true,
        'publicly_queryable' => false,
        'has_archive'        => false,
        'rewrite'            => false,
        'exclude_from_search'=> true,
        'supports'           => array( 'title', 'editor', 'thumbnail', 'page-attributes', 'custom-fields' ),
        'menu_icon'          => 'dashicons-portfolio',
        'menu_position'      => 22,
    ) );
} );
