I'm trying to understand the reasoning behind the current implementation of "global categories" in WordPress MU. More directly, I'm trying to answer (for myself) the question "Can its existence be used for a site wide purpose?". I may have an answer to my own question before I finish this.
The current implementation appears to be a way of forcing categories that have the same "nice name" to also have the same ID . The 'global_categories' function is called by a WordPress hook after a new category has been added to a blog's set of tables - this applies any blog that belongs to the domain. The routine looks up the category in the wp_sitecategory table and if it's there it changes the ID of the category (in the blog that happened to have a category with the same nice-name) - in the end, all categories that have the same "nice-name" will have the same ID. I'm not certain about the "usefulness" of this implementation - since the change to the ID is based on a 'coincidence' of nice-names. What's more, they are only added to the wp_sitecatgories table, they aren't removed if one of the blogs deletes the category from its compliment of categories. There are no admin screens that allow maintenance of the table and as a result, the table is allowed to grow and in all probability over time it will contain a number of unused or abandoned categories.
I can't seem to think of any reasons for having the same ID for categories that are inherently not "shared" to begin with. The number of table entries in the database remains the same so there isn't any "compression" advantage. Since the categories have "no visibility" to any blog other than the ones using it, I guess I don't understand the need for them to share a common ID value.
When I think of the phrase"global categories" in the context of Word Press MU - I thought:
The hosting site creates categories that are intended to be made available to the entire "community" it serves - encouraging people to add their 2-cents to that category. When you write a post you can put the post into a one or more of the "local" blog categories or place it into one or more of the "global categories". Global categories would appear in the post page along side the "local" catgories created by a blog. The hosting blog has control over these global categories and would be responsible for maintaning them. Blogs, other than the host, would not be able to add or change global categories.
Can anyone tell me what this is for or even what it *might* become? I would like to implement the concept of "global categories" as I've described it. However, in the light of the upcoming "tag" implementation in the WordPress core code, it's probably not worth the effort.