function views_rss_plugin_style_fields::validate in Views RSS 6.2
Same name and namespace in other branches
- 7.2 views/views_rss_plugin_style_fields.inc \views_rss_plugin_style_fields::validate()
Make sure the display and all associated handlers are valid.
File
- views/
views_rss_plugin_style_fields.inc, line 338 - Extends the view_plugin_style class to provide new RSS view style.
Class
- views_rss_plugin_style_fields
- @file Extends the view_plugin_style class to provide new RSS view style.
Code
function validate() {
parent::validate();
$errors = array();
$channel_elements = views_rss_get('channel_elements');
$item_elements = views_rss_get('item_elements');
if (empty($channel_elements) && empty($item_elements)) {
$errors[] = t('You have not enabled any modules providing feed elements. Please enable at least <a href="@modules_url">Views RSS: Core Elements</a> module.', array(
'@modules_url' => url('admin/build/modules', array(
'fragment' => 'edit-status-views-rss-wrapper',
)),
));
}
return $errors;
}