You are here

function theme_site_map_feed_icon in Site map 6

Same name and namespace in other branches
  1. 5 site_map.module \theme_site_map_feed_icon()
  2. 6.2 site_map.theme.inc \theme_site_map_feed_icon()
  3. 7 includes/site_map.theme.inc \theme_site_map_feed_icon()

Return a themed feed icon.

Parameters

string $url: The feed URL.

string $type: The type of feed icon.

Return value

string A string containing the linked image.

6 theme calls to theme_site_map_feed_icon()
theme_site_map_display in ./site_map.module
Return a themed site map.
_site_map_audio in ./site_map.module
Returns audio content if audio module is enabled.
_site_map_blogs in ./site_map.module
Render the latest blog authors.
_site_map_front_page in ./site_map.module
Returns front page details.
_site_map_taxonomy_tree in ./site_map.module
Render taxonomy tree.

... See full list

File

./site_map.module, line 184
Original author: Nic Ivy Now maintained by by Fredrik Jonsson fredrik at combonet dot se

Code

function theme_site_map_feed_icon($url, $type = 'node') {
  $output = '';
  switch ($type) {
    case 'node':
      $output = theme('image', drupal_get_path('module', 'site_map') . '/feed-small.png', t('Syndicate content'), t('Syndicate content'));
      break;
    case 'comment':
      $output = theme('image', drupal_get_path('module', 'site_map') . '/feed-small-comment.png', t('Syndicate comments'), t('Syndicate comments'));
      break;
  }
  if ($url) {
    $output = l($output, $url, array(
      'attributes' => array(
        'class' => 'feed-link',
      ),
      'html' => TRUE,
    ));
  }
  return $output;
}