View source
<?php
define('VIEWS_RSS_MEDIA_PATH', drupal_get_path('module', 'views_rss_media'));
include_once VIEWS_RSS_MEDIA_PATH . '/views_rss_media.field.inc';
include_once VIEWS_RSS_MEDIA_PATH . '/views_rss_media.inc';
function views_rss_media_help($path, $arg) {
switch ($path) {
case 'admin/help#views_rss_media':
$output = '<p>' . t('This project provides media elements for the <strong>Views RSS</strong> project.') . '</p>';
if (function_exists('advanced_help_hint_docs')) {
$output .= '<p>' . advanced_help_hint_docs('views_rss_media', 'https://www.drupal.org/docs/7/modules/views-rss-media-mrss-elements', TRUE) . '</p>';
}
else {
$output .= '<p>' . t('If you install and enable the module <strong>!url</strong>, you will get more help for <strong>Views RSS: Media Elements</strong>.', array(
'!url' => l('Advanced Help Hint', 'https://www.drupal.org/project/advanced_help_hint'),
)) . '</p>';
}
return $output;
}
}
function views_rss_media_views_rss_namespaces() {
$namespaces['media'] = array(
'prefix' => 'xmlns',
'uri' => 'http://search.yahoo.com/mrss/',
);
return $namespaces;
}
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.'),
'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;
}