You are here

views_rss_media.module in Views RSS: Media (MRSS) Elements 8

Same filename and directory in other branches
  1. 7 views_rss_media.module

Provides Media RSS namespace, <channel> and <item> elements for Views RSS module.

File

views_rss_media.module
View source
<?php

/**
 * @file
 * Provides Media RSS namespace, <channel> and <item> elements for Views RSS module.
 */

/**
 * Include file with all preprocess functions.
 */
include_once drupal_get_path('module', 'views_rss_media') . '/views_rss_media.inc';

/**
 * Implements hook_views_rss_namespaces().
 */
function views_rss_media_views_rss_namespaces() {
  $namespaces['media'] = array(
    'prefix' => 'xmlns',
    'uri' => 'http://search.yahoo.com/mrss/',
  );
  return $namespaces;
}

/**
 * Implements hook_views_rss_item_elements().
 */
function views_rss_media_views_rss_item_elements() {
  $elements['media:content'] = array(
    'description' => t('Contains the primary metadata entries needed to index and organize media content.'),
    'preprocess functions' => array(
      'views_rss_media_preprocess_item_content',
    ),
    'help' => 'http://www.rssboard.org/media-rss#media-content',
  );
  $elements['media:title'] = array(
    'description' => t('The title of the particular media object.'),
    'preprocess functions' => array(
      'views_rss_htmlspecialchars',
      'views_rss_media_preprocess_item_text',
    ),
    'help' => 'http://www.rssboard.org/media-rss#media-title',
  );
  $elements['media:description'] = array(
    'description' => t('Short description describing the media object typically a sentence in length.'),
    'preprocess functions' => array(
      'views_rss_htmlspecialchars',
      'views_rss_media_preprocess_item_text',
    ),
    'help' => 'http://www.rssboard.org/media-rss#media-description',
  );
  $elements['media:keywords'] = array(
    'description' => t('Highly relevant keywords describing the media object with typically a maximum of 10 words. The keywords and phrases should be comma-delimited.'),
    'help' => 'http://www.rssboard.org/media-rss#media-keywords',
  );
  $elements['media:thumbnail'] = array(
    'description' => t('Allows particular images to be used as representative images for the media object.'),
    'preprocess functions' => array(
      'views_rss_media_preprocess_item_thumbnail',
    ),
    'help' => 'http://www.rssboard.org/media-rss#media-thumbnails',
  );
  $elements['media:category'] = array(
    'description' => t('Allows a taxonomy to be set that gives an indication of the type of media content, and its particular contents.'),
    'preprocess functions' => array(
      'views_rss_media_preprocess_item_category',
    ),
    'help' => 'http://www.rssboard.org/media-rss#media-category',
  );
  return $elements;
}

Functions

Namesort descending Description
views_rss_media_views_rss_item_elements Implements hook_views_rss_item_elements().
views_rss_media_views_rss_namespaces Implements hook_views_rss_namespaces().