From 60a1055049ac218322c09b9bd753289ac39a2259 Mon Sep 17 00:00:00 2001
From: Nathaniel Catchpole <catch@35733.no-reply.drupal.org>
Date: Tue, 11 Jun 2013 15:19:03 +0100
Subject: [PATCH] Issue #2012836 by tim.plunkett: Replace drupal_region_class()
 with direct calls to drupal_html_class().

---
 core/includes/common.inc            | 22 ----------------------
 core/includes/theme.inc             |  3 +--
 core/modules/overlay/overlay.module |  2 +-
 3 files changed, 2 insertions(+), 25 deletions(-)

diff --git a/core/includes/common.inc b/core/includes/common.inc
index 4be06e252e16..fb38812e7864 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -2790,28 +2790,6 @@ function drupal_html_id($id) {
   return $id;
 }
 
-/**
- * Provides a standard HTML class name that identifies a page region.
- *
- * It is recommended that template preprocess functions apply this class to any
- * page region that is output by the theme (Drupal core already handles this in
- * the standard template preprocess implementation). Standardizing the class
- * names in this way allows modules to implement certain features, such as
- * drag-and-drop or dynamic Ajax loading, in a theme-independent way.
- *
- * @param $region
- *   The name of the page region (for example, 'page_top' or 'content').
- *
- * @return
- *   An HTML class that identifies the region (for example, 'region-page-top'
- *   or 'region-content').
- *
- * @see template_preprocess_region()
- */
-function drupal_region_class($region) {
-  return drupal_html_class("region-$region");
-}
-
 /**
  * Adds a JavaScript file, setting, or inline code to the page.
  *
diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index 0bfdc221cf26..1d72f44c1c68 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -3098,7 +3098,6 @@ function template_process_maintenance_page(&$variables) {
  * pluggable template engine. Uses the region name to generate a template file
  * suggestions. If none are found, the default region.tpl.php is used.
  *
- * @see drupal_region_class()
  * @see region.tpl.php
  */
 function template_preprocess_region(&$variables) {
@@ -3107,7 +3106,7 @@ function template_preprocess_region(&$variables) {
   $variables['region'] = $variables['elements']['#region'];
 
   $variables['attributes']['class'][] = 'region';
-  $variables['attributes']['class'][] = drupal_region_class($variables['region']);
+  $variables['attributes']['class'][] = drupal_html_class('region-' . $variables['region']);
   $variables['theme_hook_suggestions'][] = 'region__' . $variables['region'];
 }
 
diff --git a/core/modules/overlay/overlay.module b/core/modules/overlay/overlay.module
index 8e5ba9db221b..1daf3ed7c49c 100644
--- a/core/modules/overlay/overlay.module
+++ b/core/modules/overlay/overlay.module
@@ -875,7 +875,7 @@ function overlay_store_rendered_content($id = NULL, $content = NULL) {
  * @see Drupal.overlay.refreshRegions()
  */
 function overlay_request_refresh($region) {
-  $class = drupal_region_class($region);
+  $class = drupal_html_class("region-$region");
   $_SESSION['overlay_regions_to_refresh'][] = array($class => $region);
 }
 
-- 
GitLab