Commit c5f4a455 authored by Damien McKenna's avatar Damien McKenna Committed by Damien McKenna
Browse files

Issue #3277978 by DamienMcKenna: Merge Views RSS Content into Views RSS Core.

parent f00eb1e3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ Views RSS 8.x-2.x-dev, 2022-xx-xx
#3268146 by DamienMcKenna: Remove unnecessary whitespace from new twig
  file.
#3268143 by DamienMcKenna: Add a CHANGELOG.txt.
#3277978 by DamienMcKenna: Merge Views RSS Content into Views RSS Core.


Views RSS 8.x-2.0-unstable1, 2017-11-18
+0 −6
Original line number Diff line number Diff line
Views RSS Content
-----------------

Extension module for Views RSS module that provides Content  namespace
(http://web.resource.org/rss/1.0/modules/content/) and content:encoded item
element.
+0 −7
Original line number Diff line number Diff line
name: 'Views RSS: Content Elements'
type: module
description: 'Provides Content element set for Views RSS module.'
package: Views
core_version_requirement: ^9
dependencies:
  - views_rss:views_rss_format
+0 −22
Original line number Diff line number Diff line
<?php

/**
 * @file
 * (Un)installation functions for Views RSS Content module.
 */

use Drupal\Core\Cache\Cache;

/**
 * Implements hook_install().
 */
function views_rss_content_install() {
  Cache::invalidateTags(['views_rss']);
}

/**
 * Implements hook_uninstall().
 */
function views_rss_content_uninstall() {
  Cache::invalidateTags(['views_rss']);
}
+0 −33
Original line number Diff line number Diff line
<?php

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

/**
 * Implements hook_views_rss_namespaces().
 */
function views_rss_content_views_rss_namespaces() {
  $namespaces['content'] = array(
    'prefix' => 'xmlns',
    'uri' => 'http://purl.org/rss/1.0/modules/content/',
  );
  return $namespaces;
}

/**
 * Implements hook_views_rss_item_elements().
 */
function views_rss_content_views_rss_item_elements() {
  $elements['content:encoded'] = array(
    'description' => t("The &lt;content:encoded&gt; element can be used in conjunction with the &lt;description&gt; element to provide an item's full content along with a shorter summary. Under this approach, the complete text of the item is presented in &lt;content:encoded&gt; and the summary in &lt;description&gt;."),
    'preprocess functions' => array(
      'views_rss_rewrite_relative_paths',
      'views_rss_content_preprocess_item_encoded',
    ),
    'cdata' => TRUE,
    'help' => 'http://www.rssboard.org/rss-profile#namespace-elements-content-encoded',
  );
  return $elements;
}
Loading