From 0ce4a8bf36e461c2844b12fced9d2e749f578d34 Mon Sep 17 00:00:00 2001 From: Antoine M Date: Tue, 24 Feb 2026 14:52:07 +0100 Subject: [PATCH] REFACTOR Commenting now useless default post-type rename --- mu-plugins/carhop-post-types.php | 48 ++++++++++++++++---------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/mu-plugins/carhop-post-types.php b/mu-plugins/carhop-post-types.php index c162f26..2ce041e 100644 --- a/mu-plugins/carhop-post-types.php +++ b/mu-plugins/carhop-post-types.php @@ -245,30 +245,30 @@ add_action('init', 'carhop_register_taxonomies', 0); /* ------------------------------------------------ ##### CHANGE LE NOM DES POSTS PAR ACTUALITES --------------------------------------------------*/ -function carhop_change_post_object() -{ - $current_site = get_current_blog_id(); - if ($current_site !== 1) return; +// function carhop_change_post_object() +// { +// $current_site = get_current_blog_id(); +// if ($current_site !== 1) return; - $get_post_type = get_post_type_object('post'); - $labels = $get_post_type->labels; - $labels->name = 'Actualités'; - $labels->singular_name = 'Actualité'; - $labels->add_new = 'Ajouter une actualité'; - $labels->add_new_item = 'Ajouter une nouvelle actualité'; - $labels->edit_item = 'Editer l\'actualité'; - $labels->new_item = 'Actualité'; - $labels->view_item = 'Voir l\'actualité'; - $labels->search_items = 'Chercher une actualité'; - $labels->not_found = 'Pas d\'actualité trouvée'; - $labels->not_found_in_trash = 'Pas d\'actualité trouvée dans la corbeille'; - $labels->all_items = 'Toutes les actualités'; - $labels->menu_name = 'Actualités'; - $labels->name_admin_bar = 'Actualités'; +// $get_post_type = get_post_type_object('post'); +// $labels = $get_post_type->labels; +// $labels->name = 'Actualités'; +// $labels->singular_name = 'Actualité'; +// $labels->add_new = 'Ajouter une actualité'; +// $labels->add_new_item = 'Ajouter une nouvelle actualité'; +// $labels->edit_item = 'Editer l\'actualité'; +// $labels->new_item = 'Actualité'; +// $labels->view_item = 'Voir l\'actualité'; +// $labels->search_items = 'Chercher une actualité'; +// $labels->not_found = 'Pas d\'actualité trouvée'; +// $labels->not_found_in_trash = 'Pas d\'actualité trouvée dans la corbeille'; +// $labels->all_items = 'Toutes les actualités'; +// $labels->menu_name = 'Actualités'; +// $labels->name_admin_bar = 'Actualités'; - // remove_post_type_support('post', 'editor'); - unregister_taxonomy_for_object_type('category', 'post'); - unregister_taxonomy_for_object_type('post_tag', 'post'); -} +// // remove_post_type_support('post', 'editor'); +// unregister_taxonomy_for_object_type('category', 'post'); +// unregister_taxonomy_for_object_type('post_tag', 'post'); +// } -add_action('init', 'carhop_change_post_object'); +// add_action('init', 'carhop_change_post_object');