--- taxonomy_image_blocks.module +++ (clipboard) @@ -48,7 +48,7 @@ $edit_link = NULL; } - $rows[] = array(l($img, $term_path, array('html' => true)) . $name_link . $edit_link); + $rows[] = theme('taxonomy_image_block_rows', $img, $term_path, $name_link, $edit_link); ++$count; } // Have we hit the limit? @@ -66,7 +66,7 @@ ); $block = array( 'subject' => strtr(variable_get('taxonomy_image_block_title', 'Term Images for "@title"'), $subs), - 'content' => theme('table', array() , $rows, array('id' => 'taxonomy_image_terms')), + 'content' => theme('taxonomy_image_block', $rows), ); } break; @@ -161,3 +161,22 @@ } } } + +function taxonomy_image_blocks_theme($existing, $type, $theme, $path) { + return array( + 'taxonomy_image_block' => array( + 'arguments' => array('rows' => NULL), + ), + 'taxonomy_image_block_rows' => array( + 'arguments' => array('img' => NULL, 'term_path' => NULL, 'name_link' => NULL, 'edit_link' => NULL, ), + ), + ); +} + +function theme_taxonomy_image_block($rows) { + return theme('table', array() , $rows, array('id' => 'taxonomy_image_terms')); +} + +function theme_taxonomy_image_block_rows($img, $term_path, $name_link, $edit_link) { + return array(l($img, $term_path, array('html' => true)) . $name_link . $edit_link); +} \ No newline at end of file