Over in #373201: Enhance drupal_render() themeing. Return renderable array on tracker page., we removed some theme functions that were originally meant as wrappers to other theme functions.
Close observers will note that we have been adding theme functions recently with our greater use drupal_render(). For example, theme_node_links() wraps theme_links(), theme_list() wraps theme_item_list(), etc. […] The reason why we did this is that drupal_render() always passes a single parameter to a theme function. So we needed to add a wrapper function to pass additional parameters.
That issue fixed the underlying problem with one parameter theme functions and drupal_render() and removed theme_node_links() theme_list(), but the other wrapping theme functions were not removed. And they should be removed.
Comment | File | Size | Author |
---|---|---|---|
#1 | remove-wrapping-theme-functions-767852-1.patch | 917 bytes | JohnAlbin |
Comments
Comment #1
JohnAlbintheme_node_links() is one that should be removed.
Comment #2
JohnAlbinI just did a regex search for
function theme_[^\n]+\n return theme\(
and found nothing (apart from the theme_image_crop_summary() oddity).So it looks like theme_node_list() was the only one?
Comment #3
JohnAlbinoh! I just realized this brain-dead theme function is in D6 as well. :-\ So I guess it wasn't added in order to fix the drupal_render() issue. But it still should be removed, IMO.
Comment #4
moshe weitzman CreditAttribution: moshe weitzman commentedAgreed - this is cruft.
Comment #5
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks!