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.
All of these links are just links, no need for separate theme functions.
Their specialized use-case can be indicated through theme function sub-patterns; e.g., 'link__menu'
, 'link__menu_task'
, 'link__menu_action'
.
Comments
Comment #1
sun#1777332: Replace theme_menu_link() and menu-tree.html.twig with a single Twig template handles local tasks/actions already, so removing those from the goals/task list here.
Comment #2
jenlamptonSince all these things are just links, they do not need to be run through the theme layer at all. Updating title.
see #1833906: Remove theme_link() from core
Comment #3
jenlamptonOkay, so maybe it's too soon to remove theme_link from core. But I also think its too soon to make any other functions depend on theme_link - just incase we do end up deciding to remove it. Can we postpone this and wait till our Theme Component Library starts to take shape? :)
Comment #4
sunAs discussed in #1833920: [META] Markup Utility Functions, I think this should actually be merged and marked as duplicate of:
#1777332: Replace theme_menu_link() and menu-tree.html.twig with a single Twig template
All of these are lists, containing links, but the outer thing is a list.
Unfortunately, that means we're again blocked on #891112: Replace theme_item_list()'s 'data' items with render elements (which still looks RTBC to me)
Comment #5
thedavidmeister CreditAttribution: thedavidmeister commentedtheme_link() has been removed from core.
Comment #6
jenlamptonActually, let's mark this as a dupe of #1595614: [meta] Remove all the theme functions and templates in core that simply output a link. Replace with #type 'link' render arrays
Since that's where we are removing these functons :)