diff --git a/core/modules/aggregator/aggregator.module b/core/modules/aggregator/aggregator.module index 238ead502f29373247f626c850ec9c5a8cb38cfd..33da2f7370bc03d39c63560bd6f485a07d70869d 100644 --- a/core/modules/aggregator/aggregator.module +++ b/core/modules/aggregator/aggregator.module @@ -66,10 +66,6 @@ function aggregator_theme() { 'render element' => 'elements', 'file' => 'aggregator.theme.inc', ), - 'aggregator_block_item' => array( - 'variables' => array('item' => NULL, 'feed' => 0), - 'file' => 'aggregator.theme.inc', - ), 'aggregator_item' => array( 'render element' => 'elements', 'file' => 'aggregator.theme.inc', diff --git a/core/modules/aggregator/aggregator.theme.inc b/core/modules/aggregator/aggregator.theme.inc index 706a01e57a03731a7c172800c99757474e85cc5c..75c31ddf0d4839c618663255a1536045385baadc 100644 --- a/core/modules/aggregator/aggregator.theme.inc +++ b/core/modules/aggregator/aggregator.theme.inc @@ -48,20 +48,3 @@ function template_preprocess_aggregator_feed(&$variables) { $variables['full'] = $variables['elements']['#view_mode'] == 'full'; $variables['title'] = String::checkPlain($feed->label()); } - -/** - * Prepares variables for individual feed item block templates. - * - * Default template: aggregator-block-item.html.twig. - * - * @param array $variables - * An associative array containing: - * - item: The item to be displayed. - * - feed: Not used. - */ -function template_preprocess_aggregator_block_item(&$variables) { - // Display the external link to the item. - $item = $variables['item']; - $variables['url'] = check_url($item->getLink()); - $variables['title'] = String::checkPlain($item->label()); -} diff --git a/core/modules/aggregator/src/Plugin/Block/AggregatorFeedBlock.php b/core/modules/aggregator/src/Plugin/Block/AggregatorFeedBlock.php index 16ca1affa117ac404d2950a026ebbca8dcd50b10..b4b08b20bc89ab4e4310e3c7693cfcb855e43491 100644 --- a/core/modules/aggregator/src/Plugin/Block/AggregatorFeedBlock.php +++ b/core/modules/aggregator/src/Plugin/Block/AggregatorFeedBlock.php @@ -171,8 +171,9 @@ public function build() { $rendered_items = array(); foreach ($items as $item) { $aggregator_block_item = array( - '#theme' => 'aggregator_block_item', - '#item' => $item, + '#type' => 'link', + '#href' => $item->getLink(), + '#title' => $item->label(), ); $rendered_items[] = drupal_render($aggregator_block_item); } diff --git a/core/modules/aggregator/templates/aggregator-block-item.html.twig b/core/modules/aggregator/templates/aggregator-block-item.html.twig deleted file mode 100644 index c5a7f3c155e083fa1c3d8214f2f1be90831f2f78..0000000000000000000000000000000000000000 --- a/core/modules/aggregator/templates/aggregator-block-item.html.twig +++ /dev/null @@ -1,15 +0,0 @@ -{# -/** - * @file - * Default theme implementation for feed item for display in the block. - * - * Available variables: - * - url: URL to the feed item. - * - title: Title of the feed item. - * - * @see template_preprocess_aggregator_block_item() - * - * @ingroup themeable - */ -#} -<a href="{{ url }}">{{ title }}</a> diff --git a/core/themes/classy/templates/aggregator/aggregator-block-item.html.twig b/core/themes/classy/templates/aggregator/aggregator-block-item.html.twig deleted file mode 100644 index c5a7f3c155e083fa1c3d8214f2f1be90831f2f78..0000000000000000000000000000000000000000 --- a/core/themes/classy/templates/aggregator/aggregator-block-item.html.twig +++ /dev/null @@ -1,15 +0,0 @@ -{# -/** - * @file - * Default theme implementation for feed item for display in the block. - * - * Available variables: - * - url: URL to the feed item. - * - title: Title of the feed item. - * - * @see template_preprocess_aggregator_block_item() - * - * @ingroup themeable - */ -#} -<a href="{{ url }}">{{ title }}</a>