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

git-svn-id: http://svn.automattic.com/wordpress/trunk@14469 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
iammattthomas 2010-05-06 03:04:22 +00:00
parent 8b27606b04
commit 9c378e8e27
1 changed files with 16 additions and 0 deletions

View File

@ -204,6 +204,22 @@ function twentyten_the_page_number() {
} }
endif; 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. * Sets the post excerpt length to 40 characters.
* *