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
This commit is contained in:
Ryan Boren 2006-08-31 21:36:21 +00:00
parent 78a3e54add
commit 696f300b47
1 changed files with 1 additions and 0 deletions

View File

@ -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);