Add a home link to the navigation in twenty ten. Props iandstewart.

git-svn-id: https://develop.svn.wordpress.org/trunk@14469 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Thomas 2010-05-06 03:04:22 +00:00
parent 6c397f5e43
commit 624ab9b864

View File

@ -204,6 +204,22 @@ function twentyten_the_page_number() {
}
endif;
if ( ! function_exists( 'twentyten_page_menu_args' ) ) :
/**
* Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link
*/
function twentyten_page_menu_args($args) {
$args = array(
'sort_column' => 'menu_order, post_title',
'menu_class' => 'menu',
'echo' => true,
'show_home' => true
);
return $args;
}
add_filter('wp_page_menu_args', 'twentyten_page_menu_args');
endif;
/**
* Sets the post excerpt length to 40 characters.
*