Fix all/none handling in dropdown_cats(). http://mosquito.wordpress.org/view.php?id=1120 Props: nbachiyski
git-svn-id: http://svn.automattic.com/wordpress/trunk@2450 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
57f741c827
commit
8b3937b621
|
@ -211,9 +211,9 @@ function dropdown_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_
|
||||||
echo "<select name='cat' class='postform'>\n";
|
echo "<select name='cat' class='postform'>\n";
|
||||||
if (intval($optionall) == 1) {
|
if (intval($optionall) == 1) {
|
||||||
$all = apply_filters('list_cats', $all);
|
$all = apply_filters('list_cats', $all);
|
||||||
echo "\t<option value='all'>$all</option>\n";
|
echo "\t<option value='0'>$all</option>\n";
|
||||||
}
|
}
|
||||||
if (intval($optionnone) == 1) echo "\t<option value='0'>None</option>\n";
|
if (intval($optionnone) == 1) echo "\t<option value='-1'>".__('None')."</option>\n";
|
||||||
if ($categories) {
|
if ($categories) {
|
||||||
foreach ($categories as $category) {
|
foreach ($categories as $category) {
|
||||||
$cat_name = apply_filters('list_cats', $category->cat_name, $category);
|
$cat_name = apply_filters('list_cats', $category->cat_name, $category);
|
||||||
|
@ -409,4 +409,4 @@ function in_category($category) { // Check if the current post is in the given c
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue