calls to theme functions should be made via the theme() function.

theme('img_box', attribute, attribute, attribute);
rather than
theme_img_box(attribute, attribute, attribute);

the way they are called now does not allow for the theme to override the output of the theme_ functions.

I would make these changes myself but do not want to commit changes to a package I don't know much about.

CommentFileSizeAuthor
#2 img.module.txt29.47 KBpaul-at-murphymaphia.com

Comments

paul-at-murphymaphia.com’s picture

In addition, the theme_ functions need to be registered in the theme registry:

/**
 * Implementation of hook_theme().
 */
function img_theme() {
  return array(
    'img_box' => array(
      'arguments' => array('title', 'image', 'additional_box_class', 'width', 'title_position'),
    ),
  );
}
paul-at-murphymaphia.com’s picture

Status: Active » Needs review
StatusFileSize
new29.47 KB

Attached is my updated module with these changes made.

Please review.

he_who_shall_not_be_named’s picture

Status: Needs review » Reviewed & tested by the community

I didn't intend to develop a theme function. The function name is a coincidence. :)
Good catch! This patch will be included into the next release.

he_who_shall_not_be_named’s picture

Status: Reviewed & tested by the community » Fixed

Fixed in 6.x-1.9. Thanks!

he_who_shall_not_be_named’s picture

Status: Fixed » Closed (fixed)

Project: » Lost & found issues

This issue’s project has disappeared. Most likely, it was a sandbox project, which can be deleted by its maintainer. See the Lost & found issues project page for more details. (The missing project ID was 150270)