From 37d342ef03deb22c164f47ef03655769b3a823fc Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 31 Aug 2006 21:36:21 +0000 Subject: [PATCH] Make the current cat the selected cat when doing a category query. fixes #1194 git-svn-id: http://svn.automattic.com/wordpress/trunk@4151 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/category-template.php | 1 + 1 file changed, 1 insertion(+) diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php index 2c7db3a3a..c50b969c6 100644 --- a/wp-includes/category-template.php +++ b/wp-includes/category-template.php @@ -169,6 +169,7 @@ function wp_dropdown_categories($args = '') { 'hide_empty' => 1, 'child_of' => 0, 'exclude' => '', 'echo' => 1, 'selected' => 0, 'hierarchical' => 0, 'name' => 'cat', 'class' => 'postform'); + $defaults['selected'] = ( is_category() ) ? get_query_var('cat') : 0; $r = array_merge($defaults, $r); $r['include_last_update_time'] = $r['show_last_update']; extract($r);