Events
if ( ! function_exists('cpt_events') ) {
// Register Custom Post Type
function cpt_events() {
$labels = array(
'name' => _x( 'Evénements', 'Post Type General Name', 'text_domain' ),
'singular_name' => _x( 'Evénement', 'Post Type Singular Name', 'text_domain' ),
'menu_name' => __( 'Evénement', 'text_domain' ),
'name_admin_bar' => __( 'Evénement', 'text_domain' ),
'archives' => __( 'Evénements archivés', 'text_domain' ),
'attributes' => __( 'Attributs d'événement', 'text_domain' ),
'parent_item_colon' => __( 'Parent :', 'text_domain' ),
'all_items' => __( 'Tous les événements', 'text_domain' ),
'add_new_item' => __( 'Ajouter un nouvel événement', 'text_domain' ),
'add_new' => __( 'Ajouter nouveau', 'text_domain' ),
'new_item' => __( 'Nouvel événement§', 'text_domain' ),
'edit_item' => __( 'Modifier événement', 'text_domain' ),
'update_item' => __( 'Actualiser événement', 'text_domain' ),
'view_item' => __( 'Afficher événement', 'text_domain' ),
'view_items' => __( 'Afficher tout', 'text_domain' ),
'search_items' => __( 'Chercher vénénement', 'text_domain' ),
'not_found' => __( 'Pas trouvé', 'text_domain' ),
'not_found_in_trash' => __( 'Pas trouvé dans la pouvelle', 'text_domain' ),
'featured_image' => __( 'Illustration promue', 'text_domain' ),
'set_featured_image' => __( 'Promouvoir illustration', 'text_domain' ),
'remove_featured_image' => __( 'Escamoter illustration', 'text_domain' ),
'use_featured_image' => __( 'Utiliser comme illustration promue', 'text_domain' ),
'insert_into_item' => __( 'Insérer événement', 'text_domain' ),
'uploaded_to_this_item' => __( 'Télécharger vers cet élément', 'text_domain' ),
'items_list' => __( 'Liste d'éléments', 'text_domain' ),
'items_list_navigation' => __( 'Parcourir liste éléments', 'text_domain' ),
'filter_items_list' => __( 'Filtrer liste éléments', 'text_domain' ),
);
$args = array(
'label' => __( 'Evénement', 'text_domain' ),
'description' => __( 'Evénement pour un certain type d'activité', 'text_domain' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'trackbacks', 'revisions', 'custom-fields', 'page-attributes', 'post-formats', ),
'taxonomies' => array( 'activity' ),
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-share-alt',
'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',
'show_in_rest' => false,
);
register_post_type( 'Events', $args );
}
add_action( 'init', 'cpt_events', 0 );
}