Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#9546 closed feature request (wontfix)

Taxonomy - Reserved words - Questions ?

Reported by: michelwppi's profile michelwppi Owned by: ryan's profile ryan
Milestone: Priority: high
Severity: normal Version:
Component: Taxonomy Keywords: taxonomy reserved words
Focuses: Cc:


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,...

Change History (3)

#1 @ryan
15 years ago

We have the same situation with plugin function names. That's why we tell plugin authors to prefix everything with a unique string.

#2 @Denis-de-Bernardy
15 years ago

suggesting wontfix for this one

#3 @Denis-de-Bernardy
15 years ago

  • Milestone Unassigned deleted
  • Resolution set to wontfix
  • Status changed from new to closed

let's see if an angry mob shows up upon closing...

Note: See TracTickets for help on using tickets.