views_rss.views.inc 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. /**
  3. * @file
  4. * Views plugins, handlers and hooks definition for Views RSS module.
  5. */
  6. /**
  7. * Implements hook_views_style_plugins().
  8. * Adds view types to views UI interface.
  9. */
  10. function views_rss_views_plugins() {
  11. return array(
  12. 'style' => array(
  13. 'rss_fields' => array(
  14. 'type' => 'feed',
  15. 'title' => t('RSS Feed - Fields'),
  16. 'help' => t('Outputs a RSS formatted feed'),
  17. 'handler' => 'views_rss_plugin_style_fields',
  18. 'path' => VIEWS_RSS_PATH . '/views',
  19. 'theme' => 'views_view_views_rss',
  20. 'theme file' => 'theme.inc',
  21. 'theme path' => VIEWS_RSS_PATH . '/theme',
  22. 'uses row plugin' => FALSE,
  23. 'uses fields' => TRUE,
  24. 'uses options' => TRUE,
  25. 'uses grouping' => FALSE,
  26. ),
  27. ),
  28. );
  29. }
  30. /**
  31. * Implements hook_views_handlers().
  32. */
  33. function views_rss_views_handlers() {
  34. return array(
  35. 'info' => array(
  36. 'path' => VIEWS_RSS_PATH . '/views',
  37. ),
  38. 'handlers' => array(
  39. 'views_rss_handler_field_user_mail' => array(
  40. 'parent' => 'views_handler_field_user_mail',
  41. ),
  42. 'views_rss_handler_field_term_node_tid' => array(
  43. 'parent' => 'views_handler_field_term_node_tid',
  44. ),
  45. ),
  46. );
  47. }
  48. /**
  49. * Implements hook_views_data_alter().
  50. */
  51. function views_rss_views_data_alter(&$data) {
  52. $data['users']['mail']['field']['handler'] = 'views_rss_handler_field_user_mail';
  53. $data['node']['term_node_tid']['field']['handler'] = 'views_rss_handler_field_term_node_tid';
  54. }