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
theme_system_powered_by() is not a good fit for being overrideable theme output. It returns a simple string of markup, and if you want your own "powered by" block you can just create a custom block or even use string overrides for that matter.
Proposed resolution
Remove theme_system_powered_by().
Remaining tasks
Patch needs review.
User interface changes
None
API changes
Removal of theme_system_powered_by()
Comment | File | Size | Author |
---|---|---|---|
#6 | 2151117-6.patch | 1.57 KB | star-szr |
Comments
Comment #1
star-szrI'm struggling to understand why this is even a theme function, actually. If you wanted to customize this wouldn't you just make your own block, or even string override for that matter?
Comment #2
star-szrAdding a commit message to the issue summary so the folks who already worked on #1987410: [meta] system.module - Convert theme_ functions to Twig and #1898454: system.module - Convert PHPTemplate templates to Twig (comment #41 and above aka @c4rl) get credit.
Comment #3
joelpittet@Cottser totally agree. Block sounds the best... would this be possible to kill, is there a reason behind it? Looks like legacy cruft.
Comment #4
joelpittetThough I'd rather delete this... here's the split from the meta.
Comment #5
star-szrWell the only use of this theme function is in the powered by block:
http://api.drupal.org/api/search/8/SystemPoweredByBlock
So it seems like we could just move the code there.
Comment #6
star-szr(New patch so no interdiff.)
So this theme function was originally added in #183332: Add an optional 'Powered by Drupal' block.
While I like the following thought from @eaton, I'm not sure any themes out there actually do this (a survey of the 25 most popular themes from https://drupal.org/project/project_theme says nope!).
So I'm not seeing the real use case for providing the ability to override the output of this block via a theme function.
Markup before:
Markup after (it's identical):
Comment #7
star-szrUpdating the summary to reflect the proposed patch.
Comment #8
joelpittetI agree wholeheartedly with this change.
If further changes are to be made... like maybe make the text editable in the block by default a follow-up could be made but this is still changeable with string overrides.
Markup is identical and works as advertised.
Comment #9
catchCommitted/pushed to 8.x, thanks!
Needs a very short change notice.
Comment #10
star-szrThanks! Change notice:
https://drupal.org/node/2153753