Breaking things to fix others

I know, that I promised not to break existing child themes with future versions of Thematic. But sometimes it is necessary to break things ’cause we need to fix others.

With the last revision I fixed an issue, where wp_page_menu() got the class sf-menu permanently. Plugin and Widget Developers suffered from headaches because of that. To get rid of this issue I had to change the way Thematic called wp_page_menu().

The old call:

wp_page_menu('sort_column=menu_order')

And the new call:

echo thematic_add_menuclass(wp_page_menu(thematic_page_menu_args()));

The parameter echo changed from TRUE to FALSE.

If you use the standard procedure as described in the sample child theme to add a ‘Home’-link to your menu, your menu will come up without any styling. To fix this behavior you need to remove the parameter echo from your function. It should look like this to work with the latest SVN revision:

function childtheme_menu_args($args) {
	$args = array(
		'show_home' => 'Home',
		'sort_column' => 'menu_order',
		'menu_class' => 'menu',
		'echo' => false
	);
	return $args;
}
add_filter('wp_page_menu_args','childtheme_menu_args', 20);

If you use wp_page_menu() in other locations than the header and you need Superfish, make sure that you use the above mentioned call

echo thematic_add_menuclass(wp_page_menu(thematic_page_menu_args()));
Posted in Announcement | Tagged , , | 11 Responses

Thematic Revision 653

ADDED some experimental code. A child theme running under WordPress 3.0 will use wp_page_menu() by default.

To switch the menu to wp_nav_menu() use the following PHP snippet in your child theme’s functions.php:

function change_menu_type() {
	return 'wp_nav_menu';
}
add_filter('thematic_menu_type', 'change_menu_type');
Posted in Experimental | Tagged , , | 2 Responses

Thematic Revision 652

ADDED:
- New filter thematic_page_menu_args to filter the arguments for wp_page_menu().
FIXED:
- The UL Class sf-menu will be created only for the wp_page_menu() in the header.

Posted in Added, Fixed | Tagged , , , | 3 Responses

Thematic Revision 651

ADDED:
- New filter thematic_use_superfish to prevent the use of Superfish for the menu.

Posted in Added | Tagged , , | Leave a comment

Thematic Revision 650

ADDED:
- New BODY class blogid-n.
- New filter thematic_show_bc_blogid to prevent the BODY class blogid-n.

Posted in Added | Tagged , , | 1 Response

Thematic Revision 644

ADDED: Theme options support WordPress mu and WordPress 3.0 Multi-User option.

Posted in Added | Tagged , | Leave a comment

Thematic Revision 643

FIXED: Widget areas can now be moved based on a conditional tag.

Posted in Fixed | Tagged , | Leave a comment

Thematic Revision 642

FIXED: Removed thematic_before_widget() and thematic_after_widget() from Search widget.

Posted in Fixed | Tagged , | Leave a comment

Thematic Revision 641

UPDATED: Norwegian language files

Credits: Thomas Misund

Posted in Updated | Tagged , | Leave a comment