Taxonomy - Reserved words - Questions ?
|Reported by:||michelwppi||Owned by:||ryan|
|Severity:||normal||Keywords:||taxonomy reserved words|
Today, some words are reserved to build taxonomy - (category, post_tag, link_category)... and these taxonomies are essentially done for grouping posts as described at the top of taxonomy.php script in wp-includes folder.
$wp_taxonomies['category'] = (object) array('name' => 'category', 'object_type' => 'post', 'hierarchical' => true, 'update_count_callback' => '_update_post_term_count');
To avoid future conflicts and database problems, is it possible to reserve another words in an official "registering catalog" ?
Since 2.3, for plugins like xili-language, language and dictionary are used.
In lastest xili-tidy-tags plugin, xili-tidy-tags taxonomy (xili_tidy_tags) was created to build (thematic or lingual) groups of tags.
So the second arg is term as here below :
/* add new taxonomy in available taxonomies */ register_taxonomy( TAXOTIDYTAGS, 'term',array('hierarchical' => true, 'update_count_callback' => ''));
The default get_terms functions provided by wp cannot be used here because the target object is a term, it's why, a function -get_terms_of_groups- was added in the plugin like xili-tidy-tags
get_terms_of_groups - line 947
What will be happen if others use these words ?
Suggestions for reserved taxonomy words:
- prefix of four letters (like the unique ID of apps in mac os since his origin) attributed for a plugin developer when he open his account. (prefix can also be used for constants)
- a registering catalog as domain name, first registered, first attributed,...