Updated pagebar v2.58

Some days I was happy that pagebar v2.57 does seem to work with the new WordPress v3.0 flawlessly but I laughed too soon. Mark (no link given) pointed out that custom taxonomies are disrupted when using pagebar v2.57.

The reason was some code I borrows from the “Multi Page Toolkit“:

add_action('init', 'pb_allpage_permalink', -1);
function pb_allpage_permalink() {
global $wp_rewrite;
$wp_rewrite->add_endpoint("all", EP_ALL);
$wp_rewrite->flush_rules();
}

This code enables pagebar to display all parts of a page which is splitted into multiple parts. As you might see the code adds a new rule to the permalink structure. Unfortunately it corrupted the permalinks in a way that custom taxonomies stopped to worked.

The solution to this problem was to fire the action much, much later and to to update the rules transient (soft flush):

add_action('init', 'pb_allpage_permalink', 99);
function pb_allpage_permalink() {
global $wp_rewrite;
$wp_rewrite->add_endpoint("all", EP_ALL);
$wp_rewrite->flush_rules(false);
}

Hopefully this will solve the problems with custom taxonomies completely.

Download:

pagebar258.zip