Loading fivestar.module +0 −5 Original line number Diff line number Diff line Loading @@ -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, Loading includes/fivestar.theme.inc +0 −15 Original line number Diff line number Diff line Loading @@ -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'; } Loading
fivestar.module +0 −5 Original line number Diff line number Diff line Loading @@ -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, Loading
includes/fivestar.theme.inc +0 −15 Original line number Diff line number Diff line Loading @@ -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'; }