From 9c299e610c37f9eec9b2fe505a320e6a9a3d1708 Mon Sep 17 00:00:00 2001 From: Antoine Date: Mon, 12 May 2025 16:52:26 +0200 Subject: [PATCH] STYLE Refactor taxonomy registration: comment out existing taxonomy functions and add new custom taxonomy structure for future implementation. --- includes/taxonomy.php | 68 +++++++++++++++++++++++++------------------ 1 file changed, 40 insertions(+), 28 deletions(-) diff --git a/includes/taxonomy.php b/includes/taxonomy.php index b8e937f..7d71193 100644 --- a/includes/taxonomy.php +++ b/includes/taxonomy.php @@ -1,30 +1,42 @@ - true, - - // This array of options controls the labels displayed in the WordPress Admin UI - 'labels' => array( - 'name' => _x( 'Thématiques', 'taxonomy general name' ), - 'singular_name' => _x( 'Thématique', 'taxonomy singular name' ), - 'search_items' => __( 'Chercher une Thématique' ), - 'all_items' => __( 'Toutes les Thématiques' ), - 'parent_item' => __( 'Thématique Parent' ), - 'parent_item_colon' => __( 'Thématique Parent:' ), - 'edit_item' => __( 'Editer la Thématique' ), - 'update_item' => __( 'Mettre à jour la Thématique' ), - 'add_new_item' => __( 'Ajouter une Thématique' ), - 'new_item_name' => __( 'Nom de la nouvelle Thématique' ), - 'menu_name' => __( 'Thématiques' ), - ), - // Control the slugs used for this taxonomy - 'rewrite' => array( - 'slug' => 'thematiques', // This controls the base slug that will display before each term - // 'with_front' => false, // Don't display the category base before "/locations/" - 'hierarchical' => true // This will allow URL's like "/locations/boston/cambridge/" - ), - )); -} -add_action( 'init', 'add_custom_taxonomies', 0 ); \ No newline at end of file +// $labels = array( +// 'name' => _x('Étiquettes', 'Taxonomy General Name', 'text_domain'), +// 'singular_name' => _x('Étiquette', 'Taxonomy Singular Name', 'text_domain'), +// 'menu_name' => __('Étiquettes', 'text_domain'), +// 'all_items' => __('Toutes les étiquettes', 'text_domain'), +// 'parent_item' => __('Étiquette parente', 'text_domain'), +// 'parent_item_colon' => __('Étiquette parente:', 'text_domain'), +// 'new_item_name' => __('Nouvelle étiquette', 'text_domain'), +// 'add_new_item' => __('Ajouter une étiquette', 'text_domain'), +// 'edit_item' => __('Modifier l\'étiquette', 'text_domain'), +// 'update_item' => __('Mettre à jour l\'étiquette', 'text_domain'), +// 'view_item' => __('Voir l\'étiquette', 'text_domain'), +// 'separate_items_with_commas' => __('Séparer les étiquettes avec des virgules', 'text_domain'), +// 'add_or_remove_items' => __('Ajouter ou supprimer des étiquettes', 'text_domain'), +// 'choose_from_most_used' => __('Choisir parmi les plus utilisées', 'text_domain'), +// 'popular_items' => __('Étiquettes populaires', 'text_domain'), +// 'search_items' => __('Rechercher des étiquettes', 'text_domain'), +// 'not_found' => __('Non trouvé', 'text_domain'), +// 'no_terms' => __('Aucune étiquette', 'text_domain'), +// 'items_list' => __('Liste des étiquettes', 'text_domain'), +// 'items_list_navigation' => __('Navigation dans la liste des étiquettes', 'text_domain'), +// ); +// $args = array( +// 'show_in_rest' => true, +// 'labels' => $labels, +// 'hierarchical' => false, +// 'public' => true, +// 'show_ui' => true, +// 'show_admin_column' => true, +// 'show_in_nav_menus' => true, +// 'show_tagcloud' => true, +// 'meta_box_cb' => true, +// ); +// register_taxonomy('etiquettes', array('articles', 'revues'), $args); +// } +// add_action('init', 'custom_taxonomy', 0);