Last active
August 29, 2015 14:27
-
-
Save gregoirenoyelle/ffc8ec2ec366ed2f48d3 to your computer and use it in GitHub Desktop.
Créer taxonomie pour image
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* initialiser la taxonomie */ | |
add_action( 'init', 'gncom_register_taxonomy', 0 ); | |
/* fonction pour parametrer l'enregistrement */ | |
function gncom_register_taxonomy() { | |
/************************** | |
Type Image | |
**************************/ | |
$labels_typeimage = array( | |
'name' => 'Type Image', | |
'singular_name' => 'Type Image', | |
'edit_item' => 'Editer Type Image', | |
'update_item' => 'Mettre à jour Type Image', | |
'add_new_item' => 'Ajouter un Type Image', | |
'new_item_name' => 'Nouveau nom de Type Image', | |
'all_items' => 'Toutes les Types Images', | |
'search_items' => 'Chercher un Type Image', | |
'popular_items' => 'Les Types Images populaires', | |
'separate_items_with_commas' => 'Séparer les Type Images avec une virgule', | |
'add_or_remove_items' => 'Ajouter ou supprimer un Type Image', | |
'choose_from_most_used' => 'Choisir parmi les Type Images les plus populaires', | |
); | |
$typeimage_args = array( | |
'hierarchical' => true, | |
'labels' => $labels_typeimage, | |
'query_var' => 'gntx_typeimage', | |
'show_tagcloud' => false, | |
'show_in_nav_menus' => false, | |
'show_admin_column' => true, | |
'rewrite' => array( | |
'slug' => 'typeimage', | |
'with_front' => false | |
) | |
); | |
register_taxonomy( 'gntx_typeimage', array( 'attachment' ), $typeimage_args ); | |
} // fin gncom_register_taxonomies() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment