You are here

function views_rss_theme in Views RSS 6

Same name and namespace in other branches
  1. 6.2 views_rss.module \views_rss_theme()
  2. 7 views_rss.module \views_rss_theme()

Implementation of hook_theme().

File

./views_rss.module, line 16

Code

function views_rss_theme() {
  $path = drupal_get_path('module', 'views_rss');
  $theme = array(
    'views_rss_fields_item' => array(
      'arguments' => array(
        'item' => array(),
      ),
      'file' => 'views_rss_views_fields.theme.inc',
      'template' => 'views-rss-fields-item',
      'path' => "{$path}/views",
    ),
    'views_rss_feed_icon' => array(
      'arguments' => array(
        'url',
        'title',
        'icon',
      ),
      'file' => 'views_rss_views_fields.theme.inc',
      'path' => "{$path}/views",
    ),
    'views_rss_feed_description' => array(
      'arguments' => array(
        'description',
        'view',
      ),
      'file' => 'views_rss_views_fields.theme.inc',
      'path' => "{$path}/views",
    ),
    'views_rss_feed_item_source' => array(
      'arguments' => array(
        'view',
      ),
      'file' => 'views_rss_views_fields.theme.inc',
      'path' => "{$path}/views",
    ),
    // CCK field formatters.
    'views_rss_formatter_views_rss_enclosure_image' => array(
      'arguments' => array(
        'element' => NULL,
      ),
      'function' => 'theme_views_rss_formatter_enclosure_image',
      'file' => 'views_rss_views_fields.theme.inc',
      'path' => "{$path}/views",
    ),
    'views_rss_formatter_views_rss_enclosure_file' => array(
      'arguments' => array(
        'element' => NULL,
      ),
      'function' => 'theme_views_rss_formatter_enclosure_file',
      'file' => 'views_rss_views_fields.theme.inc',
      'path' => "{$path}/views",
    ),
  );
  if (module_exists('imagecache')) {
    foreach (imagecache_presets() as $preset) {
      $theme['views_rss_formatter_views_rss_enclosure_image' . $preset['presetname']] = array(
        'arguments' => array(
          'element' => NULL,
        ),
        'function' => 'theme_views_rss_formatter_enclosure_image',
        'file' => 'views_rss_views_fields.theme.inc',
        'path' => "{$path}/views",
      );
    }
  }
  return $theme;
}