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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

JohnAlbin’s picture

Status: Active » Needs review
FileSize
917 bytes

theme_node_links() is one that should be removed.

JohnAlbin’s picture

I 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?

JohnAlbin’s picture

oh! 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.

moshe weitzman’s picture

Status: Needs review » Reviewed & tested by the community

Agreed - this is cruft.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.