Commit c2fcb6d5 authored by Steven Wittens's avatar Steven Wittens

#30993: Make taxonomy selector widget themable

parent 36b62d96
......@@ -919,7 +919,11 @@ function _taxonomy_term_select($title, $name, $value, $vocabulary_id, $descripti
$value = $tree[0]->tid;
}
}
return array('#type' => 'select', '#title' => $title, '#default_value' => $value, '#options' => $options, '#description' => $description, '#multiple' => $multiple, '#size' => $multiple ? 'size="'. min(12, count($options)) .'"' : 0, '#weight' => -15);
return array('#type' => 'select', '#title' => $title, '#default_value' => $value, '#options' => $options, '#description' => $description, '#multiple' => $multiple, '#size' => $multiple ? 'size="'. min(12, count($options)) .'"' : 0, '#weight' => -15, '#theme' => 'taxonomy_term_select');
}
function theme_taxonomy_term_select($element) {
return theme('select', $element);
}
function _taxonomy_depth($depth, $graphic = '--') {
......
......@@ -919,7 +919,11 @@ function _taxonomy_term_select($title, $name, $value, $vocabulary_id, $descripti
$value = $tree[0]->tid;
}
}
return array('#type' => 'select', '#title' => $title, '#default_value' => $value, '#options' => $options, '#description' => $description, '#multiple' => $multiple, '#size' => $multiple ? 'size="'. min(12, count($options)) .'"' : 0, '#weight' => -15);
return array('#type' => 'select', '#title' => $title, '#default_value' => $value, '#options' => $options, '#description' => $description, '#multiple' => $multiple, '#size' => $multiple ? 'size="'. min(12, count($options)) .'"' : 0, '#weight' => -15, '#theme' => 'taxonomy_term_select');
}
function theme_taxonomy_term_select($element) {
return theme('select', $element);
}
function _taxonomy_depth($depth, $graphic = '--') {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment