diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index 1768a76..306f2b7 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -2368,18 +2368,6 @@ function theme_feed_icon($variables) {
}
/**
- * Returns HTML for a "more" link, like those used in blocks.
- *
- * @param $variables
- * An associative array containing:
- * - url: The URL of the main page.
- * - title: A descriptive verb for the link, like 'Read more'.
- */
-function theme_more_link($variables) {
- return '
' . l(t('More'), $variables['url'], array('attributes' => array('title' => $variables['title']))) . '
';
-}
-
-/**
* Returns HTML for a progress bar.
*
* Note that the core Batch API uses this only for non-JavaScript batch jobs.
@@ -3124,9 +3112,6 @@ function drupal_common_theme() {
'feed_icon' => array(
'variables' => array('url' => NULL, 'title' => NULL),
),
- 'more_link' => array(
- 'variables' => array('url' => NULL, 'title' => NULL)
- ),
'progress_bar' => array(
'variables' => array('percent' => NULL, 'message' => NULL),
),
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Block/AggregatorCategoryBlock.php b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Block/AggregatorCategoryBlock.php
index c9fe040..dd2c9eb 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Block/AggregatorCategoryBlock.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Block/AggregatorCategoryBlock.php
@@ -69,11 +69,21 @@ public function build() {
if ($category = db_query('SELECT cid, title, block FROM {aggregator_category} WHERE cid = :cid', array(':cid' => $id))->fetchObject()) {
$result = db_query_range('SELECT i.* FROM {aggregator_category_item} ci LEFT JOIN {aggregator_item} i ON ci.iid = i.iid WHERE ci.cid = :cid ORDER BY i.timestamp DESC, i.iid DESC', 0, $this->configuration['block_count'], array(':cid' => $category->cid));
$more_link = array(
- '#theme' => 'more_link',
- '#url' => 'aggregator/categories/' . $category->cid,
- '#title' => t("View this category's recent news."),
+ '#type' => 'link',
+ '#href' => 'aggregator/categories/' . $category->cid,
+ '#title' => t('More'),
+ '#attributes' => array(
+ '#title' => t("View this category's recent news."),
+ ),
);
- $read_more = drupal_render($more_link);
+ $container = array(
+ '#theme' => 'container',
+ '#children' => drupal_render($more_link),
+ '#attributes' => array(
+ 'class' => array('more-link'),
+ ),
+ );
+ $read_more = drupal_render($container);
$items = array();
foreach ($result as $item) {
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Block/AggregatorFeedBlock.php b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Block/AggregatorFeedBlock.php
index 4b002a2..ed68526 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Block/AggregatorFeedBlock.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Block/AggregatorFeedBlock.php
@@ -70,11 +70,21 @@ public function build() {
if ($feed = db_query('SELECT fid, title, block FROM {aggregator_feed} WHERE block <> 0 AND fid = :fid', array(':fid' => $id))->fetchObject()) {
$result = db_query_range("SELECT * FROM {aggregator_item} WHERE fid = :fid ORDER BY timestamp DESC, iid DESC", 0, $this->configuration['block_count'], array(':fid' => $id));
$more_link = array(
- '#theme' => 'more_link',
- '#url' => 'aggregator/sources/' . $feed->fid,
- '#title' => t("View this feed's recent news."),
+ '#type' => 'link',
+ '#href' => 'aggregator/sources/' . $feed->fid,
+ '#title' => t('More'),
+ '#attributes' => array(
+ '#title' => t("View this feed's recent news."),
+ ),
);
- $read_more = drupal_render($more_link);
+ $container = array(
+ '#theme' => 'container',
+ '#children' => drupal_render($more_link),
+ '#attributes' => array(
+ 'class' => array('more-link'),
+ ),
+ );
+ $read_more = drupal_render($container);
$items = array();
foreach ($result as $item) {
$aggregator_block_item = array(
diff --git a/core/modules/forum/forum.module b/core/modules/forum/forum.module
index 11a1054..388d6b3 100644
--- a/core/modules/forum/forum.module
+++ b/core/modules/forum/forum.module
@@ -636,7 +636,21 @@ function forum_block_view_pre_render($elements) {
$result = $elements['#query']->execute();
if ($node_title_list = node_title_list($result)) {
$elements['forum_list'] = $node_title_list;
- $elements['forum_more'] = array('#theme' => 'more_link', '#url' => 'forum', '#title' => t('Read the latest forum topics.'));
+ $more_link = array(
+ '#type' => 'link',
+ '#href' => 'forum',
+ '#title' => t('More'),
+ '#attributes' => array(
+ '#title' => t('Read the latest forum topics.'),
+ ),
+ );
+ $elements['forum_more'] = array(
+ '#theme' => 'container',
+ '#children' => drupal_render($more_link),
+ '#attributes' => array(
+ 'class' => array('more-link'),
+ ),
+ );
}
return $elements;
}
diff --git a/core/modules/node/node.module b/core/modules/node/node.module
index 9d9d48f..7c57b5e 100644
--- a/core/modules/node/node.module
+++ b/core/modules/node/node.module
@@ -1544,11 +1544,21 @@ function theme_node_recent_block($variables) {
$output = drupal_render($table);
if (user_access('access content overview')) {
$more_link = array(
- '#theme' => 'more_link',
- '#url' => 'admin/content',
- '#title' => t('Show more content'),
+ '#type' => 'link',
+ '#href' => 'admin/content',
+ '#title' => t('More'),
+ '#attributes' => array(
+ '#title' => t('Show more content'),
+ ),
+ );
+ $container = array(
+ '#theme' => 'container',
+ '#children' => drupal_render($more_link),
+ '#attributes' => array(
+ 'class' => array('more-link'),
+ ),
);
- $output .= drupal_render($more_link);
+ $output .= drupal_render($container);
}
}
diff --git a/core/modules/system/tests/modules/theme_test/lib/Drupal/theme_test/EventSubscriber/ThemeTestSubscriber.php b/core/modules/system/tests/modules/theme_test/lib/Drupal/theme_test/EventSubscriber/ThemeTestSubscriber.php
index bea8b13..794ae0a 100644
--- a/core/modules/system/tests/modules/theme_test/lib/Drupal/theme_test/EventSubscriber/ThemeTestSubscriber.php
+++ b/core/modules/system/tests/modules/theme_test/lib/Drupal/theme_test/EventSubscriber/ThemeTestSubscriber.php
@@ -34,7 +34,22 @@ public function onRequest(GetResponseEvent $event) {
// theme_test_request_listener_page_callback() to test that even when the
// theme system is initialized this early, it is still capable of
// returning output and theming the page as a whole.
- $GLOBALS['theme_test_output'] = theme('more_link', array('url' => 'user', 'title' => 'Themed output generated in a KernelEvents::REQUEST listener'));
+ $more_link = array(
+ '#type' => 'link',
+ '#href' => 'user',
+ '#title' => t('More'),
+ '#attributes' => array(
+ '#title' => t('Themed output generated in a KernelEvents::REQUEST listener'),
+ ),
+ );
+ $container = array(
+ '#theme' => 'container',
+ '#children' => drupal_render($more_link),
+ '#attributes' => array(
+ 'class' => array('more-link'),
+ ),
+ );
+ $GLOBALS['theme_test_output'] = drupal_render($container);
}
if (strpos($current_path, 'user/autocomplete') === 0) {
// Register a fake registry loading callback. If it gets called by