diff --git a/core/modules/block/lib/Drupal/block/BlockFormController.php b/core/modules/block/lib/Drupal/block/BlockFormController.php
index 2be867d..08bf090 100644
--- a/core/modules/block/lib/Drupal/block/BlockFormController.php
+++ b/core/modules/block/lib/Drupal/block/BlockFormController.php
@@ -94,7 +94,7 @@ public static function create(ContainerInterface $container) {
public function form(array $form, array &$form_state) {
$entity = $this->entity;
- // Store theme settings in $form_state and use them in the theme settings below.
+ // Store theme settings in $form_state for use below.
if (!$theme = $entity->get('theme')) {
$theme = $this->configFactory->get('system.theme')->get('default');
}
diff --git a/core/modules/system/lib/Drupal/system/Plugin/Block/SystemBrandingBlock.php b/core/modules/system/lib/Drupal/system/Plugin/Block/SystemBrandingBlock.php
index 43e5026..3310023 100644
--- a/core/modules/system/lib/Drupal/system/Plugin/Block/SystemBrandingBlock.php
+++ b/core/modules/system/lib/Drupal/system/Plugin/Block/SystemBrandingBlock.php
@@ -116,16 +116,16 @@ public function blockForm($form, &$form_state) {
$site_logo_description = $this->t('Defined on the Appearance or Theme Settings page.', array('@appearance' => $appearance_url, '@theme' => $theme_settings_url));
}
else {
- // Explain that user does not have access
- // to the Appearance and Theme Settings pages.
+ // Explain that user does not have access to the Appearance and Theme
+ // Settings pages.
$site_logo_description = $this->t('Defined on the Appearance or Theme Settings page. You do not have the appropriate permissions to change the site logo.');
}
if ($administer_site_configuration_access) {
// Get paths to settings pages.
$site_information_url = $this->urlGenerator->generateFromRoute('system.site_information_settings');
- // Provide link to Site Information page
- // if user has access to administer site configuration.
+ // Provide link to Site Information page if user has access to
+ // administer site configuration.
$site_name_description = $this->t('Defined on the Site Information page.', array('@information' => $site_information_url));
$site_slogan_description = $this->t('Defined on the Site Information page.', array('@information' => $site_information_url));
}
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index 844e38b..e1c26d3 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -152,6 +152,10 @@ function system_help($path, $arg) {
*/
function system_theme() {
return array_merge(drupal_common_theme(), array(
+ // Normally theme suggestion templates are only picked up when they are in
+ // themes. We explicitly define the block__system_branding_block theme
+ // suggestion here so that the template in core/modules/system/templates
+ // is picked up.
'block__system_branding_block' => array(
'base hook' => 'block',
'template' => 'block--system-branding-block',
@@ -1422,15 +1426,15 @@ function system_preprocess_block(&$variables) {
switch ($variables['base_plugin_id']) {
case 'system_branding_block':
$variables['site_logo'] = '';
- if ($variables['content']['site_logo']['#access'] == 1 && $variables['content']['site_logo']['#uri']) {
+ if ($variables['content']['site_logo']['#access'] && $variables['content']['site_logo']['#uri']) {
$variables['site_logo'] = $variables['content']['site_logo']['#uri'];
}
$variables['site_name'] = '';
- if ($variables['content']['site_name']['#access'] == 1 && $variables['content']['site_name']['#markup']) {
+ if ($variables['content']['site_name']['#access'] && $variables['content']['site_name']['#markup']) {
$variables['site_name'] = $variables['content']['site_name']['#markup'];
}
$variables['site_slogan'] = '';
- if ($variables['content']['site_slogan']['#access'] == 1 && $variables['content']['site_slogan']['#markup']) {
+ if ($variables['content']['site_slogan']['#access'] && $variables['content']['site_slogan']['#markup']) {
$variables['site_slogan'] = $variables['content']['site_slogan']['#markup'];
}
break;
diff --git a/core/themes/bartik/bartik.theme b/core/themes/bartik/bartik.theme
index b250e3d..a222759 100644
--- a/core/themes/bartik/bartik.theme
+++ b/core/themes/bartik/bartik.theme
@@ -121,6 +121,16 @@ function bartik_preprocess_node(&$variables) {
}
/**
+ * Implements hook_preprocess_HOOK() for system branding block templates.
+ */
+function bartik_preprocess_block(&$variables) {
+ // Add a clearfix class to system branding blocks.
+ if ($variables['plugin_id'] == 'system_branding_block') {
+ $variables['attributes']['class'][] = 'clearfix';
+ }
+}
+
+/**
* Implements theme_menu_tree().
*/
function bartik_menu_tree($variables) {