SGE – Travaux taxo commune
// Register Custom Taxonomy
function syage_register_taxo_travaux_commune() {
$labels = array(
'name' => _x( 'Communes', 'Taxonomy General Name', 'syage_domain' ),
'singular_name' => _x( 'Commune', 'Taxonomy Singular Name', 'syage_domain' ),
'menu_name' => __( 'Communes', 'syage_domain' ),
'all_items' => __( 'Toutes les communes', 'syage_domain' ),
'parent_item' => __( '', 'syage_domain' ),
'parent_item_colon' => __( '', 'syage_domain' ),
'new_item_name' => __( 'Nouvelle commune', 'syage_domain' ),
'add_new_item' => __( 'Ajouter une commune', 'syage_domain' ),
'edit_item' => __( 'Editer la commune', 'syage_domain' ),
'update_item' => __( 'Modifier la commune', 'syage_domain' ),
'view_item' => __( 'Voir la commune', 'syage_domain' ),
'separate_items_with_commas' => __( 'Communes séparées par des virgules', 'syage_domain' ),
'add_or_remove_items' => __( 'Ajouter ou supprimer des communes', 'syage_domain' ),
'choose_from_most_used' => __( 'Choisir à partir des plus utilisées', 'syage_domain' ),
'popular_items' => __( 'Communes les plus utilisées', 'syage_domain' ),
'search_items' => __( 'Rechercher', 'syage_domain' ),
'not_found' => __( 'Pas de commune trouvée', 'syage_domain' ),
'no_terms' => __( 'Pas de commune', 'syage_domain' ),
'items_list' => __( 'Liste des communes', 'syage_domain' ),
'items_list_navigation' => __( 'Navigation dans les communes', 'syage_domain' ),
);
$args = array(
'labels' => $labels,
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_admin_column' => true,
'show_in_nav_menus' => true,
'show_tagcloud' => false,
'rewrite' => false,
);
register_taxonomy( 'syage_travaux_filtre_commune', array( 'syage_travaux' ), $args );
}
add_action( 'init', 'syage_register_taxo_travaux_commune', 0 );