diff --git a/core/includes/batch.inc b/core/includes/batch.inc
index 786ee3cac490ac5fd6012f2ffdbb1d37350b9aaa..68fc14b5cf9600cba1c9cdf0d7d3263500255fc4 100644
--- a/core/includes/batch.inc
+++ b/core/includes/batch.inc
@@ -165,7 +165,7 @@ function _batch_progress_page() {
     '#message' => $message,
     '#label' => $label,
     '#attached' => array(
-      'drupal_add_html_head' => array(
+      'html_head' => array(
         array(
           array(
             // Redirect through a 'Refresh' meta tag if JavaScript is disabled.
diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index 78c4a3217d1b21b6431740df5389ce38faf3d99c..ea2a7420978b0f09b3227e622246a9f40986ad96 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -414,7 +414,7 @@ function drupal_page_get_cache(Request $request) {
  *   Use \Symfony\Component\HttpFoundation\Response->headers->set().
  *   See https://drupal.org/node/2181523.
  */
-function drupal_add_http_header($name, $value, $append = FALSE) {
+function _drupal_add_http_header($name, $value, $append = FALSE) {
   // The headers as name/value pairs.
   $headers = &drupal_static('drupal_http_headers', array());
 
@@ -481,8 +481,8 @@ function _drupal_set_preferred_header_name($name = NULL) {
 /**
  * Sends the HTTP response headers that were previously set, adding defaults.
  *
- * Headers are set in drupal_add_http_header(). Default headers are not set
- * if they have been replaced or unset using drupal_add_http_header().
+ * Headers are set in _drupal_add_http_header(). Default headers are not set
+ * if they have been replaced or unset using _drupal_add_http_header().
  *
  * @param array $default_headers
  *   (optional) An array of headers as name/value pairs.
@@ -571,7 +571,7 @@ function drupal_page_header() {
  *
  * The headers allow as much as possible in proxies and browsers without any
  * particular knowledge about the pages. Modules can override these headers
- * using drupal_add_http_header().
+ * using _drupal_add_http_header().
  *
  * If the request is conditional (using If-Modified-Since and If-None-Match),
  * and the conditions match those currently in the cache, a 304 Not Modified
diff --git a/core/includes/common.inc b/core/includes/common.inc
index ad7954289110abeffd95047f9c8d9d3f178a5ee8..9589aa12117380cbd8d8872f2f7dc8aaa0503849 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -144,49 +144,6 @@
  */
 const LOCALE_PLURAL_DELIMITER = "\03";
 
-/**
- * Adds content to a specified region.
- *
- * @param $region
- *   Page region the content is added to.
- * @param $data
- *   Content to be added.
- */
-function drupal_add_region_content($region = NULL, $data = NULL) {
-  static $content = array();
-
-  if (isset($region) && isset($data)) {
-    $content[$region][] = $data;
-  }
-  return $content;
-}
-
-/**
- * Gets assigned content for a given region.
- *
- * @param $region
- *   A specified region to fetch content for. If NULL, all regions will be
- *   returned.
- * @param $delimiter
- *   Content to be inserted between imploded array elements.
- */
-function drupal_get_region_content($region = NULL, $delimiter = ' ') {
-  $content = drupal_add_region_content();
-  if (isset($region)) {
-    if (isset($content[$region]) && is_array($content[$region])) {
-      return implode($delimiter, $content[$region]);
-    }
-  }
-  else {
-    foreach (array_keys($content) as $region) {
-      if (is_array($content[$region])) {
-        $content[$region] = implode($delimiter, $content[$region]);
-      }
-    }
-    return $content;
-  }
-}
-
 /**
  * Gets the name of the currently active installation profile.
  *
@@ -237,8 +194,11 @@ function drupal_get_profile() {
  *   An array of all stored HEAD elements.
  *
  * @see \Drupal\Core\Render\Element\HtmlTag::preRenderHtmlTag()
+ *
+ * @deprecated in Drupal 8.0.x, will be removed before Drupal 8.0.0
+ *   Use #attached on render arrays.
  */
-function drupal_add_html_head($data = NULL, $key = NULL) {
+function _drupal_add_html_head($data = NULL, $key = NULL) {
   $stored_head = &drupal_static(__FUNCTION__, array());
 
   if (isset($data) && isset($key)) {
@@ -258,9 +218,12 @@ function drupal_add_html_head($data = NULL, $key = NULL) {
  *
  * @return string|array
  *   Return the rendered HTML head or the elements itself.
+ *
+ * @deprecated in Drupal 8.0.x, will be removed before Drupal 8.0.0
+ *   Use #attached on render arrays.
  */
 function drupal_get_html_head($render = TRUE) {
-  $elements = drupal_add_html_head();
+  $elements = _drupal_add_html_head();
   \Drupal::moduleHandler()->alter('html_head', $elements);
   if ($render) {
     return drupal_render($elements);
@@ -279,8 +242,11 @@ function drupal_get_html_head($render = TRUE) {
  *   An internal system path or a fully qualified external URL of the feed.
  * @param $title
  *   The title of the feed.
+ *
+ * @deprecated in Drupal 8.0.x, will be removed before Drupal 8.0.0
+ *   Use #attached on render arrays.
  */
-function drupal_add_feed($url = NULL, $title = '') {
+function _drupal_add_feed($url = NULL, $title = '') {
   $stored_feed_links = &drupal_static(__FUNCTION__, array());
 
   if (isset($url)) {
@@ -291,9 +257,12 @@ function drupal_add_feed($url = NULL, $title = '') {
 
 /**
  * Gets the feed URLs for the current page.
+ *
+ * @deprecated in Drupal 8.0.x, will be removed before Drupal 8.0.0
+ *   Use #attached on render arrays.
  */
 function drupal_get_feeds() {
-  $feeds = drupal_add_feed();
+  $feeds = _drupal_add_feed();
   return $feeds;
 }
 
@@ -906,8 +875,11 @@ function base_path() {
  *   Associative array of element attributes including 'href' and 'rel'.
  * @param $header
  *   Optional flag to determine if a HTTP 'Link:' header should be sent.
+ *
+ * @deprecated in Drupal 8.0.x, will be removed before Drupal 8.0.0
+ *   Use #attached on render arrays.
  */
-function drupal_add_html_head_link($attributes, $header = FALSE) {
+function _drupal_add_html_head_link($attributes, $header = FALSE) {
   $element = array(
     '#tag' => 'link',
     '#attributes' => $attributes,
@@ -918,10 +890,10 @@ function drupal_add_html_head_link($attributes, $header = FALSE) {
     // Also add a HTTP header "Link:".
     $href = '<' . String::checkPlain($attributes['href']) . '>;';
     unset($attributes['href']);
-    $element['#attached']['drupal_add_http_header'][] = array('Link',  $href . drupal_http_header_attributes($attributes), TRUE);
+    $element['#attached']['http_header'][] = array('Link',  $href . drupal_http_header_attributes($attributes), TRUE);
   }
 
-  drupal_add_html_head($element, 'drupal_add_html_head_link:' . $attributes['rel'] . ':' . $href);
+  _drupal_add_html_head($element, 'html_head_link:' . $attributes['rel'] . ':' . $href);
 }
 
 /**
@@ -1816,7 +1788,7 @@ function drupal_merge_attached(array $a, array $b) {
  * other kind of attached data, the array key must be the full name of the
  * callback function and each value an array of arguments. For example:
  * @code
- * $build['#attached']['drupal_add_http_header'] = array(
+ * $build['#attached']['http_header'] = array(
  *   array('Content-Type', 'application/rss+xml; charset=utf-8'),
  * );
  * @endcode
@@ -1894,7 +1866,23 @@ function drupal_process_attached($elements, $dependency_check = FALSE) {
   // special handling.
   foreach ($elements['#attached'] as $callback => $options) {
     foreach ($elements['#attached'][$callback] as $args) {
-      call_user_func_array($callback, $args);
+      // Limit the amount allowed entries.
+      switch ($callback) {
+        case 'html_head':
+          call_user_func_array('_drupal_add_html_head', $args);
+          break;
+        case 'feed':
+          call_user_func_array('_drupal_add_feed', $args);
+          break;
+        case 'html_head_link':
+          call_user_func_array('_drupal_add_html_head_link', $args);
+          break;
+        case 'http_header':
+          call_user_func_array('_drupal_add_http_header', $args);
+          break;
+        default:
+          throw new \LogicException(sprintf('You are not allowed to use %s in #attached', $callback));
+      }
     }
   }
 
@@ -2055,6 +2043,9 @@ function drupal_process_states(&$elements) {
  *
  * @see \Drupal\Core\Asset\LibraryDiscovery
  * @see hook_library_info_alter()
+ *
+ * @deprecated in Drupal 8.0.x, will be removed before Drupal 8.0.0
+ *   Use #attached on render arrays.
  */
 function _drupal_add_library($library_name, $every_page = NULL) {
   $added = &drupal_static(__FUNCTION__, array());
diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc
index d8dd3e9e1c3c69a978700ed181c290ad4536a812..4997a23991b5af7b8c4fcb09ecf4c434bbf9010e 100644
--- a/core/includes/install.core.inc
+++ b/core/includes/install.core.inc
@@ -902,7 +902,7 @@ function install_display_output($output, $install_state) {
       'content' => 'noindex, nofollow',
     ),
   );
-  drupal_add_html_head($noindex_meta_tag, 'install_meta_robots');
+  $output['#attached']['html_head'][] = [$noindex_meta_tag, 'install_meta_robots'];
 
   // Only show the task list if there is an active task; otherwise, the page
   // request has ended before tasks have even been started, so there is nothing
diff --git a/core/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php
index c5a7be1afe1ffe103054bf670c2d768134e07f8c..55330918b85b43fcf98b83a1b9ee01a5d7d53e6d 100644
--- a/core/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php
@@ -98,7 +98,7 @@ public function onRespond(FilterResponseEvent $event) {
 
     // Attach globally-declared headers to the response object so that Symfony
     // can send them for us correctly.
-    // @todo remove this once we have removed all drupal_add_http_header()
+    // @todo remove this once we have removed all _drupal_add_http_header()
     //   calls.
     $headers = drupal_get_http_header();
     foreach ($headers as $name => $value) {
diff --git a/core/lib/Drupal/Core/Page/RenderHtmlRenderer.php b/core/lib/Drupal/Core/Page/RenderHtmlRenderer.php
index f3c166c8516ab2937666cabdc46c28db5f47fd2e..6954f069124f5ff2e20477c1a20386bce7b20000 100644
--- a/core/lib/Drupal/Core/Page/RenderHtmlRenderer.php
+++ b/core/lib/Drupal/Core/Page/RenderHtmlRenderer.php
@@ -52,23 +52,23 @@ public function render(array $render_array) {
 
     $attached = isset($render_array['#attached']) ? $render_array['#attached'] : [];
     $attached += [
-      'drupal_add_feed' => [],
-      'drupal_add_html_head' => [],
-      'drupal_add_html_head_link' => [],
+      'feed' => [],
+      'html_head' => [],
+      'html_head_link' => [],
     ];
 
 
     // Add feed links from the page content.
-    foreach ($attached['drupal_add_feed'] as $feed) {
+    foreach ($attached['feed'] as $feed) {
       $fragment->addLinkElement(new FeedLinkElement($feed[1], $this->urlGenerator->generateFromPath($feed[0])));
     }
 
     // Add generic links from the page content.
-    foreach ($attached['drupal_add_html_head_link'] as $link) {
+    foreach ($attached['html_head_link'] as $link) {
       $fragment->addLinkElement(new LinkElement($this->urlGenerator->generateFromPath($link[0]['href']), $link[0]['rel']));
     }
 
-    // @todo Also transfer the contents of "drupal_add_html_head" once
+    // @todo Also transfer the contents of "_drupal_add_html_head" once
     // https://www.drupal.org/node/2296951 lands.
 
     // @todo Transfer CSS and JS over to the fragment once those are supported
diff --git a/core/modules/aggregator/src/Controller/AggregatorController.php b/core/modules/aggregator/src/Controller/AggregatorController.php
index a7e25fff804ae8abd3961d9660688c8e0d484129..b49f3f583f4d15a83d7b3e2cab470289502ac2e8 100644
--- a/core/modules/aggregator/src/Controller/AggregatorController.php
+++ b/core/modules/aggregator/src/Controller/AggregatorController.php
@@ -173,7 +173,7 @@ public function adminOverview() {
   public function pageLast() {
     $items = $this->entityManager()->getStorage('aggregator_item')->loadAll(20);
     $build = $this->buildPageList($items);
-    $build['#attached']['drupal_add_feed'][] = array('aggregator/rss', $this->config('system.site')->get('name') . ' ' . $this->t('aggregator'));
+    $build['#attached']['feed'][] = array('aggregator/rss', $this->config('system.site')->get('name') . ' ' . $this->t('aggregator'));
     return $build;
   }
 
diff --git a/core/modules/book/book.module b/core/modules/book/book.module
index 669a26a370592344004e3de68a6be7d199b2001d..2c936de65b1c002e713f64ebd6d838f6459bbfe2 100644
--- a/core/modules/book/book.module
+++ b/core/modules/book/book.module
@@ -405,7 +405,7 @@ function template_preprocess_book_navigation(&$variables) {
 
     if ($prev = $book_outline->prevLink($book_link)) {
       $prev_href = \Drupal::url('entity.node.canonical', array('node' => $prev['nid']));
-      $build['#attached']['drupal_add_html_head_link'][][] = array(
+      $build['#attached']['html_head_link'][][] = array(
         'rel' => 'prev',
         'href' => $prev_href,
       );
@@ -417,7 +417,7 @@ function template_preprocess_book_navigation(&$variables) {
     $book_manager = \Drupal::service('book.manager');
     if ($book_link['pid'] && $parent = $book_manager->loadBookLink($book_link['pid'])) {
       $parent_href = \Drupal::url('entity.node.canonical', array('node' => $book_link['pid']));
-      $build['#attached']['drupal_add_html_head_link'][][] = array(
+      $build['#attached']['html_head_link'][][] = array(
         'rel' => 'up',
         'href' => $parent_href,
       );
@@ -427,7 +427,7 @@ function template_preprocess_book_navigation(&$variables) {
 
     if ($next = $book_outline->nextLink($book_link)) {
       $next_href = \Drupal::url('entity.node.canonical', array('node' => $next['nid']));
-      $build['#attached']['drupal_add_html_head_link'][][] = array(
+      $build['#attached']['html_head_link'][][] = array(
         'rel' => 'next',
         'href' => $next_href,
       );
diff --git a/core/modules/content_translation/content_translation.module b/core/modules/content_translation/content_translation.module
index 4d3c794429b6c1da5dfaf865268cf0bbd22e2a6a..3f6d9dae21a37d0a6e29e4afc042ca9e4bca9994 100644
--- a/core/modules/content_translation/content_translation.module
+++ b/core/modules/content_translation/content_translation.module
@@ -746,7 +746,7 @@ function content_translation_page_alter(&$page) {
           ->setOption('language', $language)
           ->setAbsolute()
           ->toString();
-        $page['#attached']['drupal_add_html_head_link'][] = array(
+        $page['#attached']['html_head_link'][] = array(
           array(
             'rel' => 'alternate',
             'hreflang' => $language->id,
diff --git a/core/modules/forum/src/Controller/ForumController.php b/core/modules/forum/src/Controller/ForumController.php
index 5de156cf03d342a8b618c2167433aa7515e8fe45..2ca2e8eb5bcae9b48d06bc442ce0fb0308c023de 100644
--- a/core/modules/forum/src/Controller/ForumController.php
+++ b/core/modules/forum/src/Controller/ForumController.php
@@ -145,7 +145,7 @@ protected function build($forums, TermInterface $term, $topics = array(), $paren
     );
     $build['#attached']['library'][] = 'forum/forum.index';
     if (empty($term->forum_container->value)) {
-      $build['#attached']['drupal_add_feed'][] = array('taxonomy/term/' . $term->id() . '/feed', 'RSS - ' . $term->getName());
+      $build['#attached']['feed'][] = array('taxonomy/term/' . $term->id() . '/feed', 'RSS - ' . $term->getName());
     }
 
     return $build;
diff --git a/core/modules/node/src/Controller/NodePreviewController.php b/core/modules/node/src/Controller/NodePreviewController.php
index 35c65d9654f09ccda0cb74b89a509a17f91b2b8b..2134abe5d502cd3e346c2363a5ccc3236f89c2cf 100644
--- a/core/modules/node/src/Controller/NodePreviewController.php
+++ b/core/modules/node/src/Controller/NodePreviewController.php
@@ -33,7 +33,7 @@ public function view(EntityInterface $node_preview, $view_mode_id = 'full', $lan
 
     foreach ($node_preview->uriRelationships() as $rel) {
       // Set the node path as the canonical URL to prevent duplicate content.
-      $build['#attached']['drupal_add_html_head_link'][] = array(
+      $build['#attached']['html_head_link'][] = array(
         array(
         'rel' => $rel,
         'href' => $node_preview->url($rel),
@@ -42,7 +42,7 @@ public function view(EntityInterface $node_preview, $view_mode_id = 'full', $lan
 
       if ($rel == 'canonical') {
         // Set the non-aliased canonical path as a default shortlink.
-        $build['#attached']['drupal_add_html_head_link'][] = array(
+        $build['#attached']['html_head_link'][] = array(
           array(
             'rel' => 'shortlink',
             'href' => $node_preview->url($rel, array('alias' => TRUE)),
diff --git a/core/modules/node/src/Controller/NodeViewController.php b/core/modules/node/src/Controller/NodeViewController.php
index 84559a5c930c9f9f91bba1c4bb956783038748f8..2e6839122de19d4be9f994f98580250760db3250 100644
--- a/core/modules/node/src/Controller/NodeViewController.php
+++ b/core/modules/node/src/Controller/NodeViewController.php
@@ -27,7 +27,7 @@ public function view(EntityInterface $node, $view_mode = 'full', $langcode = NUL
 
     foreach ($node->uriRelationships() as $rel) {
       // Set the node path as the canonical URL to prevent duplicate content.
-      $build['#attached']['drupal_add_html_head_link'][] = array(
+      $build['#attached']['html_head_link'][] = array(
         array(
           'rel' => $rel,
           'href' => $node->url($rel),
@@ -37,7 +37,7 @@ public function view(EntityInterface $node, $view_mode = 'full', $langcode = NUL
 
       if ($rel == 'canonical') {
         // Set the non-aliased canonical path as a default shortlink.
-        $build['#attached']['drupal_add_html_head_link'][] = array(
+        $build['#attached']['html_head_link'][] = array(
           array(
             'rel' => 'shortlink',
             'href' => $node->url($rel, array('alias' => TRUE)),
diff --git a/core/modules/rdf/rdf.module b/core/modules/rdf/rdf.module
index 09bb89966e2cb05dcfbaa614ed694cf235b257cb..371be2c195a3e9de6c2702abf788395b3036e3be 100644
--- a/core/modules/rdf/rdf.module
+++ b/core/modules/rdf/rdf.module
@@ -366,7 +366,7 @@ function rdf_preprocess_user(&$variables) {
           'lang' => '',
         ),
       );
-      drupal_add_html_head($username_meta, 'rdf_user_username');
+      $variables['#attached']['html_head'][] = [$username_meta, 'rdf_user_username'];
     }
   }
 }
diff --git a/core/modules/system/src/Tests/Common/AddFeedTest.php b/core/modules/system/src/Tests/Common/AddFeedTest.php
index a24581d2f6633600cf2c5e880e30be7c703d133e..3b495b3695b837266c20bbb1040f6679efc22d1e 100644
--- a/core/modules/system/src/Tests/Common/AddFeedTest.php
+++ b/core/modules/system/src/Tests/Common/AddFeedTest.php
@@ -12,13 +12,13 @@
 use Drupal\simpletest\WebTestBase;
 
 /**
- * Make sure that drupal_add_feed() works correctly with various constructs.
+ * Make sure that _drupal_add_feed() works correctly with various constructs.
  *
  * @group Common
  */
 class AddFeedTest extends WebTestBase {
   /**
-   * Tests drupal_add_feed() with paths, URLs, and titles.
+   * Tests _drupal_add_feed() with paths, URLs, and titles.
    */
   function testBasicFeedAddNoTitle() {
     $path = $this->randomMachineName(12);
@@ -29,10 +29,10 @@ function testBasicFeedAddNoTitle() {
     $external_for_title = 'http://' . $this->randomMachineName(12) . '/' . $this->randomMachineName(12);
     $fully_qualified_for_title = _url($this->randomMachineName(12), array('absolute' => TRUE));
 
-    // Possible permutations of drupal_add_feed() to test.
-    // - 'input_url': the path passed to drupal_add_feed(),
+    // Possible permutations of _drupal_add_feed() to test.
+    // - 'input_url': the path passed to _drupal_add_feed(),
     // - 'output_url': the expected URL to be found in the header.
-    // - 'title' == the title of the feed as passed into drupal_add_feed().
+    // - 'title' == the title of the feed as passed into _drupal_add_feed().
     $urls = array(
       'path without title' => array(
         'url' => _url($path, array('absolute' => TRUE)),
diff --git a/core/modules/system/src/Tests/Common/RegionContentTest.php b/core/modules/system/src/Tests/Common/RegionContentTest.php
deleted file mode 100644
index 9b21924727265d691125766af59c620999b1ff6b..0000000000000000000000000000000000000000
--- a/core/modules/system/src/Tests/Common/RegionContentTest.php
+++ /dev/null
@@ -1,49 +0,0 @@
-<?php
-
-/**
- * @file
- * Definition of Drupal\system\Tests\Common\RegionContentTest.
- */
-
-namespace Drupal\system\Tests\Common;
-
-use Drupal\simpletest\WebTestBase;
-
-/**
- * Tests setting and retrieving content from theme regions.
- *
- * @group Common
- */
-class RegionContentTest extends WebTestBase {
-  /**
-   * Tests setting and retrieving content for theme regions.
-   */
-  function testRegions() {
-    $theme_key = \Drupal::theme()->getActiveTheme()->getName();
-
-    $block_regions = array_keys(system_region_list($theme_key));
-    $delimiter = $this->randomMachineName(32);
-    $values = array();
-    // Set some random content for each region available.
-    foreach ($block_regions as $region) {
-      $first_chunk = $this->randomMachineName(32);
-      drupal_add_region_content($region, $first_chunk);
-      $second_chunk = $this->randomMachineName(32);
-      drupal_add_region_content($region, $second_chunk);
-      // Store the expected result for a drupal_get_region_content call for this region.
-      $values[$region] = $first_chunk . $delimiter . $second_chunk;
-    }
-
-    // Ensure drupal_get_region_content returns expected results when fetching all regions.
-    $content = drupal_get_region_content(NULL, $delimiter);
-    foreach ($content as $region => $region_content) {
-      $this->assertEqual($region_content, $values[$region], format_string('@region region text verified when fetching all regions', array('@region' => $region)));
-    }
-
-    // Ensure drupal_get_region_content returns expected results when fetching a single region.
-    foreach ($block_regions as $region) {
-      $region_content = drupal_get_region_content($region, $delimiter);
-      $this->assertEqual($region_content, $values[$region], format_string('@region region text verified when fetching single region.', array('@region' => $region)));
-    }
-  }
-}
diff --git a/core/modules/system/src/Tests/Common/RenderTest.php b/core/modules/system/src/Tests/Common/RenderTest.php
index 56c2f3909b187473a5ab86dd34cdd19fc023dcc8..15da0e55a318c9323078d7eab7468e37dd123251 100644
--- a/core/modules/system/src/Tests/Common/RenderTest.php
+++ b/core/modules/system/src/Tests/Common/RenderTest.php
@@ -1181,4 +1181,20 @@ protected function randomContextValue() {
     return $tokens[mt_rand(0, 4)];
   }
 
+  /**
+   * Tests drupal_process_attached().
+   */
+  public function testDrupalProcessAttached() {
+    // Specify invalid attachments in a render array.
+    $build['#attached']['library'][] = 'core/drupal.states';
+    $build['#attached']['drupal_process_states'][] = [];
+    try {
+      drupal_process_attached($build);
+      $this->fail("Invalid #attachment 'drupal_process_states' allowed");
+    }
+    catch (\Exception $e) {
+      $this->pass("Invalid #attachment 'drupal_process_states' not allowed");
+    }
+  }
+
 }
diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module
index 584b80a85d117957b8cdd110400563f7fa3a360c..e4ecc3bc0560c0a909b1a5dd3c3b6fa16ebbb576 100644
--- a/core/modules/taxonomy/taxonomy.module
+++ b/core/modules/taxonomy/taxonomy.module
@@ -110,7 +110,7 @@ function taxonomy_page_build(&$page) {
   if ($route_match->getRouteName() == 'entity.taxonomy_term.canonical' && ($term = $route_match->getParameter('taxonomy_term')) && $term instanceof TermInterface) {
     foreach ($term->uriRelationships() as $rel) {
       // Set the URI relationships, like canonical.
-      $page['#attached']['drupal_add_html_head_link'][] = array(
+      $page['#attached']['html_head_link'][] = array(
         array(
           'rel' => $rel,
           'href' => $term->url($rel),
@@ -121,7 +121,7 @@ function taxonomy_page_build(&$page) {
       // Set the term path as the canonical URL to prevent duplicate content.
       if ($rel == 'canonical') {
         // Set the non-aliased canonical path as a default shortlink.
-        $page['#attached']['drupal_add_html_head_link'][] = array(
+        $page['#attached']['html_head_link'][] = array(
           array(
             'rel' => 'shortlink',
             'href' => $term->url($rel, array('alias' => TRUE)),
diff --git a/core/modules/views/src/Plugin/views/cache/CachePluginBase.php b/core/modules/views/src/Plugin/views/cache/CachePluginBase.php
index 3a782107a69d974e8d384f3ee4737f8fb7e1d208..57873e45a2582a4bf04b4f9dca14f2101002ac72 100644
--- a/core/modules/views/src/Plugin/views/cache/CachePluginBase.php
+++ b/core/modules/views/src/Plugin/views/cache/CachePluginBase.php
@@ -231,10 +231,10 @@ public function postRender(&$output) { }
    * duplicate it. Later on, when gatherHeaders() is run, this information
    * will be removed so that we don't hold onto it.
    *
-   * @see drupal_add_html_head()
+   * @see _drupal_add_html_head()
    */
   public function cacheStart() {
-    $this->storage['head'] = drupal_add_html_head();
+    $this->storage['head'] = _drupal_add_html_head();
   }
 
   /**
@@ -246,7 +246,7 @@ public function cacheStart() {
   protected function gatherHeaders(array $render_array = []) {
     // Simple replacement for head
     if (isset($this->storage['head'])) {
-      $this->storage['head'] = str_replace($this->storage['head'], '', drupal_add_html_head());
+      $this->storage['head'] = str_replace($this->storage['head'], '', _drupal_add_html_head());
     }
     else {
       $this->storage['head'] = '';
@@ -261,7 +261,7 @@ protected function gatherHeaders(array $render_array = []) {
    */
   public function restoreHeaders() {
     if (!empty($this->storage['head'])) {
-      drupal_add_html_head($this->storage['head']);
+      _drupal_add_html_head($this->storage['head']);
     }
     if (!empty($this->storage['css'])) {
       foreach ($this->storage['css'] as $args) {
diff --git a/core/modules/views/src/Plugin/views/style/Opml.php b/core/modules/views/src/Plugin/views/style/Opml.php
index ad23aae80d8aeaf66e4348f1234116e6232a74fa..229e4c281be317fb499d69dfab83a8549cbe20b8 100644
--- a/core/modules/views/src/Plugin/views/style/Opml.php
+++ b/core/modules/views/src/Plugin/views/style/Opml.php
@@ -44,7 +44,7 @@ public function attachTo(array &$build, $display_id, $path, $title) {
     $url = _url($this->view->getUrl(NULL, $path), $url_options);
     if ($display->hasPath()) {
       if (empty($this->preview)) {
-        $build['#attached']['drupal_add_feed'][] = array($url, $title);
+        $build['#attached']['feed'][] = array($url, $title);
       }
     }
     else {
diff --git a/core/modules/views/src/Plugin/views/style/Rss.php b/core/modules/views/src/Plugin/views/style/Rss.php
index 99dc0c3320f5e2aa6795639bb3176596c722bec7..88c6e46f05da251724d43692c64c928659f5c0aa 100644
--- a/core/modules/views/src/Plugin/views/style/Rss.php
+++ b/core/modules/views/src/Plugin/views/style/Rss.php
@@ -44,11 +44,12 @@ public function attachTo(array &$build, $display_id, $path, $title) {
     $url = _url($this->view->getUrl(NULL, $path), $url_options);
     if ($display->hasPath()) {
       if (empty($this->preview)) {
-        // Add a call for drupal_add_feed to the view attached data.
-        $build['#attached']['drupal_add_feed'][] = array($url, $title);
+        // Add a call for _drupal_add_feed to the view attached data.
+        $build['#attached']['feed'][] = array($url, $title);
       }
     }
     else {
+      // Add the RSS icon to the view.
       $feed_icon = array(
         '#theme' => 'feed_icon',
         '#url' => $url,
@@ -56,8 +57,8 @@ public function attachTo(array &$build, $display_id, $path, $title) {
       );
       $this->view->feed_icon = $feed_icon;
 
-      // Add a call for drupal_add_html_head_link to the view attached data.
-      $build['#attached']['drupal_add_html_head_link'][][] = array(
+      // Attach a link to the RSS feed, which is an alternate representation.
+      $build['#attached']['html_head_link'][][] = array(
         'rel' => 'alternate',
         'type' => 'application/rss+xml',
         'title' => $title,