diff --git a/plugins/views_plugin_row_rss_fields.inc b/plugins/views_plugin_row_rss_fields.inc index 87f54ae..f3d93c8 100644 --- a/plugins/views_plugin_row_rss_fields.inc +++ b/plugins/views_plugin_row_rss_fields.inc @@ -5,7 +5,7 @@ */ /** - * Plugin which render an RSS item based on fields. + * Renders an RSS item based on fields. */ class views_plugin_row_rss_fields extends views_plugin_row { function option_definition() { @@ -15,7 +15,7 @@ class views_plugin_row_rss_fields extends views_plugin_row { $options['description_field'] = array('default' => 'none'); $options['creator_field'] = array('default' => 'none'); $options['date_field'] = array('default' => 'none'); - $options['guid_field_options']['guid_field'] = array('default' => 'none'); + $options['guid_field_options']['guid_field'] = array('default' => 'none', 'bool' => TRUE); $options['guid_field_options']['guid_field_is_permalink'] = array('default' => TRUE); return $options; } @@ -59,7 +59,7 @@ class views_plugin_row_rss_fields extends views_plugin_row { $form['date_field'] = array( '#type' => 'select', '#title' => t('Publication date field'), - '#description' => t('The field that is going to be used as the RSS item pubDate for each row. It need to be in RFC 2822 format.'), + '#description' => t('The field that is going to be used as the RSS item pubDate for each row. It needs to be in RFC 2822 format.'), '#options' => $view_fields, '#default_value' => $this->options['date_field'], ); @@ -72,7 +72,7 @@ class views_plugin_row_rss_fields extends views_plugin_row { $form['guid_field_options']['guid_field'] = array( '#type' => 'select', '#title' => t('GUID field'), - '#description' => t('The Globally unique identifier of the RSS item.'), + '#description' => t('The globally unique identifier of the RSS item.'), '#options' => $view_fields, '#default_value' => $this->options['guid_field_options']['guid_field'], ); @@ -115,6 +115,7 @@ class views_plugin_row_rss_fields extends views_plugin_row { $this->view->style_plugin->namespaces += $xml_rdf_namespaces; } + // Create the RSS item object. $item = new stdClass(); $item->title = $this->get_field($row_index, $this->options['title_field']); $item->link = url($this->get_field($row_index, $this->options['link_field']), array('absolute' => TRUE)); @@ -136,7 +137,7 @@ class views_plugin_row_rss_fields extends views_plugin_row { $item->elements[] = array( 'key' => 'guid', 'value' => $item_guid, - 'attributes' => array('isPermaLink' => $guid_is_permalink_string) + 'attributes' => array('isPermaLink' => $guid_is_permalink_string), ); $row_index++; @@ -157,7 +158,7 @@ class views_plugin_row_rss_fields extends views_plugin_row { } /** - * Convinience method to retrieve field output. + * Retrieves a views field value from the style plugin. * * @param $index * The index count of the row as expected by views_plugin_style::get_field().