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.
theme_filter_tips_more_info() is just a link.
Wrapped in a paragraph.
Comment | File | Size | Author |
---|---|---|---|
#20 | interdiff.txt | 724 bytes | mr.baileys |
#20 | 1595614-20-remove-theme-filter-tips-more-info.patch | 1.33 KB | mr.baileys |
#16 | core-remove_theme_filter_tips_more_info-1595614-16.patch | 1.38 KB | jenlampton |
#10 | drupal8.theme-filter-tips-more-info.10.patch | 1.78 KB | sun |
Comments
Comment #1
psynaptic CreditAttribution: psynaptic commentedWrong link in original post:
http://drupalcontrib.org/api/drupal/drupal--modules--filter--filter.modu...
My question would be, how would we override this if it was a hardcoded link?
Comment #2
psynaptic CreditAttribution: psynaptic commentedAhh, this is used in core as:
So we can just change the theme hook to link and use a pattern like link__filter_tips_more_info. This would allow the link to be overridden in this one specific place if needed.
Comment #3
jessebeach CreditAttribution: jessebeach commented@psynaptic, that seems the most backwards-compatible approach that gets us to the goal of standardization in the default case.
Comment #4
droplet CreditAttribution: droplet commentedIn case, if we remove theme_filter_tips_more_info, we also remove its in render element. That seems the best practice. Render Arrays isn't a substitute for theme function. But like to see a patch to show how it being removed.
is it related to html5 ?
Comment #5
helior CreditAttribution: helior commentedRemoving html5 tag.
Comment #6
aspilicious CreditAttribution: aspilicious commentedThis is part of the html5 initiative.
Comment #7
RobLoachThe whole filter tip situation here is really gross. The theme function is difficult to work with, and the markup itself that is generated is pretty ugly. Switching it to a renderable array as droplet suggested is a great start.
Comment #8
JacineIn an effort to get a better picture of issues remaining in the HTML5 Initiative, we are removing the "html5" tag from issues that are not directly HTML5-related. Tagging this "theme system cleanup" instead, as that's more accurate. Note: Any issues assigned to the "Markup, CSS and JavaScript" components will still be broadcast on the HTML5 Twitter feed so that interested parties are aware and can participate.
Comment #9
jenlamptonAlso tagging for Twig since removing this theme function means one less thing to convert.
Comment #10
sunFixed the issue summary.
Closely related: #1595614: [meta] Remove all the theme functions and templates in core that simply output a link. Replace with #type 'link' render arrays
The shared problem space among these is that the link being output intends to be a block element. In this case here, it is wrapped in a paragraph. In aforementioned issue, it is wrapped in a DIV.
Thus, I wonder whether the approach in attached patch would be an acceptable solution for these kind of links?
Essentially this addition to system.theme.css:
What do you think?
Comment #11
sunAdjusting title.
Comment #13
andypost#10: drupal8.theme-filter-tips-more-info.10.patch queued for re-testing.
EDIT This test sometimes fails ...
Comment #14
andypostI think we need better(quicker) selector here
Comment #15
jenlamptonSince theme_filter_tips_more_info currently uses the l() function to generate it's markup. We should remove this theme function, the use of #type = container, and the use of #theme, and instead call l() directly for the form element. If this needs to be altered we have hook_form_alter. Let's not over complicate things.
see #1833906: Remove theme_link() from core
see #1595614: [meta] Remove all the theme functions and templates in core that simply output a link. Replace with #type 'link' render arrays
Comment #16
jenlamptonpatchy
Comment #18
sunCan we keep the #type container, just remove #theme, and turn the value of #markup just into the
l()
?Comment #19
Fabianx CreditAttribution: Fabianx commentedAgree with #18
Comment #20
mr.baileysRe-rolled to catch up with HEAD and made changes requested in #18
Comment #21
andypostnice clean-up
Comment #22
catchCommitted/pushed to 8.x, thanks!
Comment #23.0
(not verified) CreditAttribution: commentedUpdated issue summary.