From 696f300b4746e1ed758cb57393b78afba200caaf Mon Sep 17 00:00:00 2001 From: Ryan Boren 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: https://develop.svn.wordpress.org/trunk@4151 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 2c7db3a3aa..c50b969c66 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);