From 9c378e8e27e60c79758769fa23b3cfd5482288ae Mon Sep 17 00:00:00 2001 From: iammattthomas Date: Thu, 6 May 2010 03:04:22 +0000 Subject: [PATCH] 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 --- wp-content/themes/twentyten/functions.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/wp-content/themes/twentyten/functions.php b/wp-content/themes/twentyten/functions.php index 2296f983e7..8cfad6b675 100644 --- a/wp-content/themes/twentyten/functions.php +++ b/wp-content/themes/twentyten/functions.php @@ -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. *