theme_X functions should never be called directly. Rather, they should be called like:

theme('X', $stuff);

so that they use Drupal's theme override mechanism.

So for example, in quiz_view:

    $node->body = theme_quiz_view(&$node, $teaser, $page);

should be:

    $node->body = theme('quiz_view', &$node, $teaser, $page);
CommentFileSizeAuthor
#2 quiz_theme_fix.patch5.39 KBseanbfuller

Comments

seanbfuller’s picture

Ack! Oversight on my part. Good catch.

seanbfuller’s picture

Status: Active » Needs review
StatusFileSize
new5.39 KB

Here's a patch to fix the incorrect calls to the theme functions.

seanbfuller’s picture

Status: Needs review » Fixed

Committed to HEAD.

Anonymous’s picture

Status: Fixed » Closed (fixed)

  • Commit 3678fc5 on 4.7.x-1.x, 5.x-1.x, 5.x-2.x, 6.x-2.x, 6.x-3.x, 6.x-4.x, 6.x-5.x, 6.x-6.x, 7.x-4.x, master, 7.x-5.x by seanbfuller:
    #90379 Fixes some of the calls to theme functions so that they don't...

  • Commit 3678fc5 on 4.7.x-1.x, 5.x-1.x, 5.x-2.x, 6.x-2.x, 6.x-3.x, 6.x-4.x, 6.x-5.x, 6.x-6.x, 7.x-4.x, master, 7.x-5.x, quiz-pages by seanbfuller:
    #90379 Fixes some of the calls to theme functions so that they don't...

  • Commit 3678fc5 on 4.7.x-1.x, 5.x-1.x, 5.x-2.x, 6.x-2.x, 6.x-3.x, 6.x-4.x, 6.x-5.x, 6.x-6.x, 7.x-4.x, master, 7.x-5.x, quiz-pages, 2269219 by seanbfuller:
    #90379 Fixes some of the calls to theme functions so that they don't...

  • Commit 3678fc5 on 4.7.x-1.x, 5.x-1.x, 5.x-2.x, 6.x-2.x, 6.x-3.x, 6.x-4.x, 6.x-5.x, 6.x-6.x, 7.x-4.x, master, 7.x-5.x, 2269219 by seanbfuller:
    #90379 Fixes some of the calls to theme functions so that they don't...