';
if (!empty($title) && isset($options['show_titles'])) {
$output .= '
' . $title . '
';
}
if (!empty($content)) {
$output .= '
' . $content . '
';
}
$output .= '
';
}
return $output;
}
/**
* Returns HTML for a feed icon with link.
*
* @param array $variables
* An associative array containing:
* - url: The url of the feed.
* - name: The name of the feed.
* - type: The type of feed icon.
*
* @return string
* Constructs and returns html with feed image icon.
*/
function theme_site_map_feed_icon($variables) {
$output = '';
switch ($variables['type']) {
case 'node':
$output = theme('image', array(
'path' => drupal_get_path('module', 'site_map') . '/feed-small.png',
'alt' => t('Syndicated feed icon'),
)
);
break;
case 'comment':
$output = theme('image', array(
'path' => drupal_get_path('module', 'site_map') . '/feed-small-comment.png',
'alt' => t('Syndicated feed icon'),
)
);
break;
}
if (!empty($variables['url'])) {
$output = l($output, $variables['url'], array(
'attributes' => array(
'class' => array('feed-link'),
'title' => t('Syndicated feed for') . ' ' . $variables['name'],
),
'html' => TRUE));
}
return $output;
}
/**
* Preprocesses the rendered tree for theme_site_map_menu_tree().
*
* This is a clone of the core template_preprocess_menu_tree() function
* with the exception of the site_map specific class name used in the
* UL that also allow themers to override the function only
* for the site map page.
*/
function template_preprocess_site_map_menu_tree(&$variables) {
$variables['tree'] = $variables['tree']['#children'];
}
/**
* Returns HTML for a wrapper for a menu sub-tree.
*
* This is a clone of the core theme_menu_tree() function with the exception of
* the site_map specific class name used in the UL that also allow themers to
* override the function only for the site map page.
*
* @param array $variables
* An associative array containing:
* - tree: An HTML string containing the tree's items.
*
* @return string
* Returns the html string with the