Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Main info from parent issue:
Use of theme functions is discouraged in D8 and removed in D9 in favor of using Twig templates.
All theme function in includes/fivestar.theme.inc should be replaced by templates in templates/ and hook_theme() should be modified to use these templates.
Proposed resolution
Move static element theme output into twig template
Comment | File | Size | Author |
---|---|---|---|
#9 | interdiff_7-9.txt | 371 bytes | init90 |
#9 | 3186838-9.patch | 3 KB | init90 |
|
Comments
Comment #2
V.Hilkov CreditAttribution: V.Hilkov commentedHere is patch, which replaces static element theme function with twig template
Comment #3
V.Hilkov CreditAttribution: V.Hilkov commentedForgot to add template, here is patch with twig template
Comment #4
V.Hilkov CreditAttribution: V.Hilkov commentedComment #5
RenrhafComment #6
Renrhaf+1 RTBC
Comment #7
init90Thanks for the work here!
I've updated the patch according to the coding standards and remove 'is_form' check as is not used in current implementation.
In next few days I'll plan to commit it.
Comment #8
TR CreditAttribution: TR commentedMight be good to finish this before making the changes in #3190556: Illegal choice 0 in field_fivestar element for fivestar widget?
Comment #9
init90@TR, agree.
Removed unneeded CSS.
Comment #11
init90Committed! Thanks!