Convert filter.module theme functions to Twig templates.
- Patch needs review
- Manual testing (steps below)
|Theme function name/template path||Conversion status|
|Converted to #type table (and committed) in|
|Already converted to #type table in|
|theme_filter_html_image_secure_image||Changed to an alter hook (see API changes section)|
- Add an article node (node/add/article)
- The body field should be wrapped in text-format-wrapper.html.twig.
- The set of filter guidelines for each text format should be output by filter-guidelines.html.twig.
- The list of filter tips should be output by filter-tips.html.twig.
- Using the Basic HTML format, click the image button in the editor toolbar and add an image hosted on another site.
- Save the node.
- When viewing the node, the external image you added should be replaced with a red X.
See also /filter/tips.
The patch removes theme_filter_html_image_secure_image() and replaces it with an alter hook (hook_filter_secure_image_alter()). Part of the Twig conversion is removing theme functions, and unlike other theme functions, theme_filter_html_image_secure_image():
- Doesn't return a string.
- Alters the variables (a DOMElement to boot) by reference.