Custom Post Type – Les autochtones
// Register Custom Post Type
function les_autochtones() {
$labels = array(
'name' => _x( 'Autochtones', 'Post Type General Name', 'The Island' ),
'singular_name' => _x( 'Autochtone', 'Post Type Singular Name', 'The Island' ),
'menu_name' => __( 'Les autochtones', 'The Island' ),
'name_admin_bar' => __( 'Les autochtones', 'The Island' ),
'archives' => __( 'Archives des autochtones', 'The Island' ),
'attributes' => __( 'Attributs de l'autochtone', 'The Island' ),
'parent_item_colon' => __( 'Parent de l'autochtone', 'The Island' ),
'all_items' => __( 'Tous les autochtones', 'The Island' ),
'add_new_item' => __( 'Ajouter un autochtone', 'The Island' ),
'add_new' => __( 'Ajouter un autochtone', 'The Island' ),
'new_item' => __( 'Nouvel autochtone', 'The Island' ),
'edit_item' => __( 'Modifier l'autochtone', 'The Island' ),
'update_item' => __( 'Mise à jour de l'autochtone', 'The Island' ),
'view_item' => __( 'Voir l'autochtone', 'The Island' ),
'view_items' => __( 'Voir l'autochtone', 'The Island' ),
'search_items' => __( 'Chercher un autochtone', 'The Island' ),
'not_found' => __( 'Aucun autochtone', 'The Island' ),
'not_found_in_trash' => __( 'Aucun autochtone dans la poubelle', 'The Island' ),
'featured_image' => __( 'Image de l'autochtone', 'The Island' ),
'set_featured_image' => __( 'Choisir image de l'autochtone', 'The Island' ),
'remove_featured_image' => __( 'Retirer l'image de l'autochtone', 'The Island' ),
'use_featured_image' => __( 'Utiliser comme image de l'autochtone', 'The Island' ),
'insert_into_item' => __( 'Ajouter un autochtone', 'The Island' ),
'uploaded_to_this_item' => __( 'Uploader pour cet autochtone', 'The Island' ),
'items_list' => __( 'Liste des autochtones', 'The Island' ),
'items_list_navigation' => __( 'Afficher les autochtones par liste', 'The Island' ),
'filter_items_list' => __( 'Filtrer les autochtones par liste', 'The Island' ),
);
$args = array(
'label' => __( 'Autochtone', 'The Island' ),
'description' => __( 'Module permettant d'ajouter des autochtones', 'The Island' ),
'labels' => $labels,
'supports' => array( 'title', 'thumbnail', ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-id',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'page',
);
register_post_type( 'les_autochtones', $args );
}
add_action( 'init', 'les_autochtones', 0 );