Commit 19e5f589 authored by Pavlo Dovhan's avatar Pavlo Dovhan Committed by Pavlo Dovhan
Browse files

Issue #3255948 by init90, Alex Liannoy: Remove 'fivestar_select' theme function

parent b48feb54
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -54,11 +54,6 @@ function fivestar_microdata_suggestions() {
 */
function fivestar_theme() {
  return [
    'fivestar_select' => [
      'function' => 'theme_fivestar_select',
      'render element' => 'element',
      'file' => 'includes/fivestar.theme.inc',
    ],
    'fivestar_static' => [
      'variables' => [
        'rating' => NULL,
+0 −15
Original line number Diff line number Diff line
@@ -75,18 +75,3 @@ function theme_fivestar_formatter_default($variables) {
    'is_form' => FALSE,
  ]);
}

/**
 * Themes the straight HTML version of the fivestar select list. This is used
 * to remove the wrapping 'form-item' div from the select list.
 */
function theme_fivestar_select($variables) {
  $element = $variables['element'];
  unset($element['#theme']);
  return \Drupal::service('renderer')->render($element);
  Element::setAttributes($element, ['id', 'name', 'size']);
  RenderElement::setAttributes($element, ['form-select']);
  $variables['#attributes'] = $element['#attributes'];
  $variables['#options'] = form_select_options($element);
  $variables['#theme'] = 'select';
}