Okay after a bunch of poking around I got this working nicely from the permalinks option in the dashboard/control panel.
Unfortunately due to my limited knowledge of WordPress and if the init() function is replaceable by a plugin, I chose to do this directly as a hack for now. Those that know better can see what I did and perhaps make it a complete standalone plugin with no hacks needed?
Okay, start here:
wp-includes\classes.php
function init() at or around line 1425 in wp2.0.3
it’s missing all the options to set ANY base except for category – someone was either in a hurry or lazy
add below the $this->category_base…
$this->author_base = get_settings('author_base');
$this->feed_base = get_settings('feed_base');
$this->search_base = get_settings('search_base');
$this->comments_base = get_settings('comments_base');
that will allow WP to rebuild all the rules for those extra bases
now find this part of code in classes.php
function set_category_base($category_base) {
if ($category_base != $this->category_base) {
update_option('category_base', $category_base);
$this->init();
}
}
and again mimic it for the other bases, adding
function set_author_base($author_base) {
if ($author_base != $this->author_base) {
update_option('author_base', $author_base);
$this->init();
}
}
function set_feed_base($feed_base) {
if ($feed_base != $this->feed_base) {
update_option('feed_base', $feed_base);
$this->init();
}
}
function set_search_base($search_base) {
if ($search_base != $this->search_base) {
update_option('search_base', $search_base);
$this->init();
}
}
function set_comments_base($comments_base) {
if ($comments_base != $this->comments_base) {
update_option('comments_base', $comments_base);
$this->init();
}
}
it’s a shame all this isn’t done in a nice “eval” loop with an array of all the bases but that’s too much work for me right now and I don’t want to break anything
now we need to move to
wp-admin/options-permalink.php
it’s going to need bunch of additions, all mimicking the functions for base_category
first find
<?php _e('Category base'); ?>: <input name="category_base" type="text" class="code" value="<?php echo $category_base; ?>" size="30" />
and again, add and mimic:
<?php _e('Author base'); ?>: <input name="author_base" type="text" class="code" value="<?php echo $author_base; ?>" size="30" />
<?php _e('Feed base'); ?>: <input name="feed_base" type="text" class="code" value="<?php echo $feed_base; ?>" size="30" />
<?php _e('Search base'); ?>: <input name="search_base" type="text" class="code" value="<?php echo $search_base; ?>" size="30" />
<?php _e('Comments base'); ?>: <input name="comments_base" type="text" class="code" value="<?php echo $comments_base; ?>" size="30" />
(saving and coming back to edit)