Commit 653918e0 authored by Sascha Grossenbacher's avatar Sascha Grossenbacher Committed by Ivica Puljic
Browse files

Issue #3296696 by Project Update Bot, Berdir: Automated Drupal 10 compatibility fixes

parent 9e7bcbe3
Loading
Loading
Loading
Loading
+2 −1
Changes for bs_base.bs_base.install: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
<?php

use Drush\Log\LogLevel;
/**
 * @file
 * Update hooks for bs_base base themes.
@@ -137,7 +138,7 @@ function bs_base_bs_update_8006($target_theme_name) {
        file_put_contents($themes_info[$target_theme_name]->pathname, $yml_content);

        // Notify user that he needs to execute update one more time.
        drush_log("Bad update is fixed, please run `drush bs-tu $target_theme_name` one more time to update theme correctly.", \Drush\Log\LogLevel::ALERT);
        drush_log("Bad update is fixed, please run `drush bs-tu $target_theme_name` one more time to update theme correctly.", LogLevel::ALERT);
      }
    }
  }
+1 −1
Changes for bs_base.info.yml: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@ name: BS Base
description: BS Base theme.
type: theme
base theme: false
core_version_requirement: ^8.8 || ^9
core_version_requirement: ^9.3 || ^10
dependencies:
  - bs_lib:bs_lib

+3 −5
Changes for bs_base.theme: 3 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -119,7 +119,7 @@ function bs_base_preprocess_maintenance_page(&$variables) {
  // Add maintenance image path.
  $maintenance_image = theme_get_setting('bs_base.maintenance_image');
  if (!empty($maintenance_image['path'])) {
    $variables['maintenance_image_path'] = file_url_transform_relative(file_create_url($maintenance_image['path']));
    $variables['maintenance_image_path'] = \Drupal::service('file_url_generator')->generateString($maintenance_image['path']);
  }
}

@@ -146,7 +146,7 @@ function bs_base_preload_fonts(array $fonts, array &$attachments) {
    }
    // Support twig expansion syntax like @custom_theme/fonts/font1.woff.
    elseif (preg_match('/^\@([^\/]+)(\/.+)$/', $font, $match)) {
      $uri = drupal_get_path('theme', $match[1]) . $match[2];
      $uri = \Drupal::service('extension.list.theme')->getPath($match[1]) . $match[2];
    }
    // Support relative font path from the current active theme.
    elseif (strpos($font, '/') !== 0) {
@@ -161,9 +161,7 @@ function bs_base_preload_fonts(array $fonts, array &$attachments) {
    $attachments['#attached']['html_head_link'][] = [[
      'rel' => 'preload',
      'as' => 'font',
      // @todo this two functions are depreciated in Drupal 9.3, fix it later.
      // @see https://www.drupal.org/node/2940031
      'href' => file_url_transform_relative(file_create_url($uri)),
      'href' => \Drupal::service('file_url_generator')->generateString($uri),
      'type' => 'font/' . pathinfo($font, PATHINFO_EXTENSION),
      'crossorigin' => 'anonymous',
    ], FALSE];
+1 −1
Changes for composer.json: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@
    "license": "GPL-2.0+",
    "minimum-stability": "dev",
    "require": {
        "drupal/core": "^8.7.7 || ^9",
        "drupal/core": "^9.3 || ^10",
        "drupal/bs_lib": "^1"
    }
}
+1 −1
Changes for themes/bs_bootstrap/bs_bootstrap.info.yml: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@ name: BS Bootstrap
description: BS Bootstrap theme based on bs_base.
type: theme
base theme: bs_base
core_version_requirement: ^8.7.7 || ^9
core_version_requirement: ^9.3 || ^10

bs_versions:
  bs_base: 8008
Loading