From 19a7617234c11b07424ad3c5ce5885a0f44c3e77 Mon Sep 17 00:00:00 2001
From: TravisCarden <TravisCarden@236758.no-reply.drupal.org>
Date: Mon, 2 Apr 2012 21:49:55 -0500
Subject: [PATCH] Issue #1256994: Added breadcrumb to toggle display settings.

---
 core/includes/theme.inc              |    6 +++++-
 core/modules/system/system.admin.inc |    1 +
 core/modules/system/system.module    |    1 +
 3 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index 57b45d8..f7f4751 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -2485,6 +2485,9 @@ function template_preprocess_html(&$variables) {
     $variables['classes_array'][] = 'no-sidebars';
   }
 
+  // Add a class indicating whether or not the breadcrumb toggled on.
+  $variables['classes_array'][] = (theme_get_setting('toggle_breadcrumb')) ? 'has-breadcrumb' : 'no-breadcrumb';
+
   // Populate the body classes.
   if ($suggestions = theme_get_suggestions(arg(), 'page', '-')) {
     foreach ($suggestions as $suggestion) {
@@ -2608,7 +2611,8 @@ function template_preprocess_page(&$variables) {
  * @see page.tpl.php
  */
 function template_process_page(&$variables) {
-  if (!isset($variables['breadcrumb'])) {
+  $variables['breadcrumb'] = NULL;
+  if (!isset($variables['breadcrumb']) && theme_get_setting('toggle_breadcrumb')) {
     // Build the breadcrumb last, so as to increase the chance of being able to
     // re-use the cache of an already rendered menu containing the active link
     // for the current page.
diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc
index 978b0f4..67a9d46 100644
--- a/core/modules/system/system.admin.inc
+++ b/core/modules/system/system.admin.inc
@@ -383,6 +383,7 @@ function system_theme_settings($form, &$form_state, $key = '') {
     'logo'                      => t('Logo'),
     'name'                      => t('Site name'),
     'slogan'                    => t('Site slogan'),
+    'breadcrumb'                => t('Breadcrumb'),
     'node_user_picture'         => t('User pictures in posts'),
     'comment_user_picture'      => t('User pictures in comments'),
     'comment_user_verification' => t('User verification status in comments'),
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index 151d299..9382231 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -2691,6 +2691,7 @@ function _system_default_theme_features() {
     'favicon',
     'name',
     'slogan',
+    'breadcrumb',
     'node_user_picture',
     'comment_user_picture',
     'comment_user_verification',
-- 
1.7.4.1

