Index: term_display.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/term_display/term_display.module,v retrieving revision 1.10 diff -U3 -r1.10 term_display.module --- term_display.module 26 Feb 2009 20:55:48 -0000 1.10 +++ term_display.module 15 Mar 2009 09:01:07 -0000 @@ -7,6 +7,52 @@ define('TERM_DISPLAY_NONE', 'none'); define('TERM_DISPLAY_LOAD', 'load'); + +/** + * Implementation of hook_theme(). + */ +function term_display_theme() { + return array( + 'term_display_list' => array( + 'file' => 'term_display.module', + 'arguments' => array( + 'vocabulary' => NULL, + 'terms' => NULL, + ), + ), + 'term_display_custom' => array( + 'file' => 'term_display.module', + 'arguments' => array( + 'vocabulary' => NULL, + 'terms' => NULL, + ), + ), + ); +} + +/** + * Theme terms as a list. + */ +function theme_term_display_list($vocabulary, $terms) { + $links = array(); + foreach ($terms as $term) { + $links[] = l($term->name, taxonomy_term_path($term)); + } + return theme('item_list', $links, check_plain($vocabulary->name), 'ul', array('class' => 'vocabulary-list')); +} + +/** + * Theme terms as a comma-separated list. + */ +function theme_term_display_custom($vocabulary, $terms) { + $links = array(); + foreach ($terms as $term) { + $links[] = l($term->name, taxonomy_term_path($term)); + } + return '

' . check_plain($vocabulary->name) . ': ' . implode(', ', $links) . '

'; +} + + /** * Implementation of hook_form_alter(). */ @@ -50,25 +96,6 @@ } -function term_display_theme() { - return array( - 'term_display_list' => array( - 'file' => 'term_display.module', - 'arguments' => array( - 'vocabulary' => NULL, - 'terms' => NULL, - ), - ), - 'term_display_custom' => array( - 'file' => 'term_display.module', - 'arguments' => array( - 'vocabulary' => NULL, - 'terms' => NULL, - ), - ), - ); -} - /** * Implementation of hook_taxonomy(). */ @@ -165,26 +192,3 @@ break; } } - -/** - * Theme terms as a list. - */ -function theme_term_display_list($vocabulary, $terms) { - foreach($terms as $term) { - $term_links[] = l($term->name, taxonomy_term_path($term)); - } - - return theme('item_list', $term_links, check_plain($vocabulary->name), 'ul', array('class' => 'vocabulary-list')); -} - -/** - * Theme terms as a comma-separated list. - */ -function theme_term_display_custom($vocabulary, $terms) { - $links = array(); - foreach($terms as $term) { - $links[] = l($term->name, taxonomy_term_path($term)); - } - return '

' . check_plain($vocabulary->name) .': '. implode(', ', $links) .'

'; - -}