Here's a patch that just changes theme("add_style", "path"); to use the new theme_add_style("path");

CommentFileSizeAuthor
tagadelic_theme_add_style.patch1.74 KBAnonymous (not verified)

Comments

Bèr Kessels’s picture

The patch looks weird to me. we NEVER call theme functions directly.

Bèr Kessels’s picture

Status: Active » Needs work
morbus iff’s picture

Status: Needs work » Reviewed & tested by the community

theme_add_style is a core helper monkey, not a traditional theme function.

morbus iff’s picture

Status: Reviewed & tested by the community » Needs review

Actually, oddly, there is one place in core, theme.inc, that uses theme('add_style') for misc/maintenance.css. So I'm not entirely sure now. I coulda swore I've seen it in common usage as just theme_add_style(). Can we define themename_add_style to futz with it?

Bèr Kessels’s picture

Status: Needs review » Needs work

http://drupal.org/node/51306

we must use the theme('stylesheet_import') instead.

Anonymous’s picture

ok, thanks. I was told to use theme_add_style() when I upgraded my modules to 4.7

Tobias Maier’s picture

if you track back the code used in drupal core you will come to the conclusion that this function cant be themed.

theme_add_style() is called by theme_get_style() and this gets called by
theme_page() AND phptamplate_page() directly...

so this is right imho

Bèr Kessels’s picture

Status: Needs work » Fixed

Fixed in 4.7 and HEAD.

Anonymous’s picture

Status: Fixed » Closed (fixed)